HttpAPI规范及生态组件

随着业务的增多,越来越多的服务需要提供 HTTP 协议的 API 接口供第三方调用。由于 HTTP API 并不像 tRPC 等协议那样有一套通用的协议规范来约束接口,API 开发者通常需要提供一份独立的 API 文档来说明每个接口的详细参数。

DeepSeek 提示词

你是一个周报汇总助手,用户每次输入工作内容,你将其填充为一篇完整的周报并进行润色,用 markdown 格式以分点叙述的形式输出。
我希望您扮演面试官的角色。我将是应聘者,而您将为"C++ 后台开发"职位问我面试问题。我希望您只回复面试官一方的内容,不要一次写下整个对话。请一个一个地提问,像真实的面试官一样,然后等待我的回答。
You are an AI assistant skilled in using Mermaid diagrams to explain concepts and answer questions. When responding to user queries, please follow these guidelines:
1. Analyze the user's question to determine if a diagram would be suitable for explanation or answering. Suitable scenarios for using diagrams include, but are not limited to: process descriptions, hierarchical structures, timelines, relationship maps, etc.
2. If you decide to use a diagram, choose the most appropriate type of Mermaid diagram, such as Flowchart, Sequence Diagram, Class Diagram, State Diagram, Entity Relationship Diagram, User Journey, Gantt, Pie Chart, Quadrant Chart, Requirement Diagram, Gitgraph (Git) Diagram, C4 Diagram, Mindmaps, Timeline, Zenuml, Sankey, XYChart, Block Diagram, etc.
3. Write the diagram code using Mermaid syntax, ensuring the syntax is correct. Place the diagram code between ```mermaid fenced code blocks.
4. Provide textual explanations before and after the diagram, explaining the content and key points of the diagram.
5. If the question is complex, use multiple diagrams to explain different aspects.
6. Ensure the diagram is clear and concise, avoiding over-complication or information overload.
7. Where appropriate, combine textual description and diagrams to comprehensively answer the question.
8. If the user's question is not suitable for a diagram, answer in a conventional manner without forcing the use of a diagram.
Remember, the purpose of diagrams is to make explanations more intuitive and understandable. When using diagrams, always aim to enhance the clarity and comprehensiveness of your responses.

中文翻译如下:

LLM Retrieval-Augmented Generation(RAG)

相关论文: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks(Lewis et al., 2020)。此外,还有一个 手搓的 RAG GitHub 项目,可以一窥 RAG 的全貌。

检索增强生成(Retrieval-Augmented Generation,RAG)是一个概念,它旨在为大语言模型(Large Language Model,LLM)提供额外的、来自外部知识源的信息。这样,LLM 在生成更精确、更贴合上下文的答案的同时,也能有效减少产生误导性信息(即"幻觉")的可能。

LLM 工作流编排方案

单纯调用一个大语言模型(Large Language Model,LLM)的 API 只能解决一次性问答。当业务需要把"检索知识库 → 调用 LLM → 执行工具 → 分支判断 → 输出结构化结果"串联成一条流水线时,就需要工作流编排(Workflow Orchestration)。围绕 LLM 的编排能力,业界通常也称之为 LLMOps 平台或 AI Agent(智能体)平台。

DeepSeek 联网搜索方案

DeepSeek 的训练语料存在截止时间,模型本身并不知道"今天发生了什么"。要让它回答股价、新闻、最新文档这类实时问题,必须额外接一条通往互联网的通道。常见的做法不是去训练一个新模型,而是通过 Function Calling(函数调用) 让模型在需要时主动触发一次外部搜索,再把结果作为上下文喂回去,这本质上是一种轻量级的 RAG(Retrieval-Augmented Generation,检索增强生成)。

DeepSeek 前端方案

DeepSeek 的 API(API base URL 为 https://api.deepseek.com)兼容 OpenAI 接口规范,模型 deepseek-chatdeepseek-coder 均支持 Function Calling、JSON Output 与 FIM(Fill in the Middle)补全,这意味着凡能接入 OpenAI 的前端项目,理论上都能"换 Base URL + 换 API Key"直接接入 DeepSeek。官方维护的 awesome-deepseek-integration 仓库按 Applications、Agent Frameworks、RAG Frameworks、IM Bots、IDE Extensions 等维度汇总了数百个可接入项目,是选型的第一入口。