Claude的系统提示:聊天机器人不仅仅是模型
A couple days ago, Ásgeir Thor Johnson convinced Claude to give up its system prompt. The prompt is a good reminder that chatbots are more than just their model. They’re tools and instructions that accrue and are honed, through user feedback and design.
几天前,Ásgeir Thor Johnson 说服 Claude 放弃其 系统提示。这个提示很好地提醒我们,聊天机器人不仅仅是它们的模型。它们是通过用户反馈和设计积累和完善的工具和指令。
For those who don’t know, a system prompt is a (generally) constant prompt that tells an LLM how it should reply to a user’s prompt. A system prompt is kind of like the “settings” or “preferences” for an LLM. It might describe the tone it should respond with, define tools it can use to answer the user’s prompt, set contextual information not in the training data, and more.
对于那些不知道的人,系统提示是一个(通常)恒定的提示,告诉LLM它应该如何回复用户的提示。系统提示有点像LLM的“设置”或“偏好”。它可能描述它应该以何种语气回应,定义它可以用来回答用户提示的工具,设置不在训练数据中的上下文信息等等。
Claude’s system prompt is long. It’s 16,739 words, or 110kb. For comparison, the system prompt for OpenAI’s o4-mini in ChatGPT is 2,218 words long, or 15.1kb – ~13% the length of Claude’s.
Claude的系统提示是长的。它有16,739个单词,或110kb。作为比较,OpenAI的o4-mini在ChatGPT中的系统提示长度为2,218个单词,或15.1kb - 大约是Claude的13%。
Here’s what’s in Claude’s prompt:
以下是Claude提示中的内容:
Let’s break down each component.
让我们逐一分析每个组件。
The biggest component, the Tool Definitions, is populated by information from MCP servers. MCP servers differ from your bog-standard APIs in that they provide instructions to the LLMs detailing how and when to use them.
最大的组成部分工具定义,由来自 MCP服务器 的信息填充。MCP服务器与普通的API不同,因为它们向LLM提供详细说明,说明如何以及何时使用它们。
In this prompt, there are 14 different tools detailed by MCPs. Here’s an example of one:
在这个提示中,有14种不同的工具由MCP详细说明。以下是一个示例:
{ "description": "Search the web", "name": "web_search", "parameters": { "additionalProperties": false, "properties": { "query": { "description": "Search query", "title": "Query", "type": "string" } }, "required": ["query"], "title": "BraveSearchParams", "type": "object" }
}
This example is simple and has a very short “description” field. The Google Drive search tool, for example, has a descriptio...