跳到主内容
@wquguru
精选88Hacker News Best(web_list)产品发布/更新

Anthropic发布Claude Opus 5.5提示词指南与能力详解

Prompting Claude Opus 5.5

原文
发到 X
推荐理由

Opus 5.5是最新旗舰版本,这篇指南直接给出了从5代迁移到5.5的具体参数调整与Prompt写法变更,对正在使用或计划升级的企业开发者极具实操价值,建议收藏对照检查现有集成。

Copy page

复制页面

This guide covers the prompting patterns specific to Claude Opus 5.5. For the model's capabilities and API changes, see What's new in Claude Opus 5.5. For techniques that apply across all current Claude models, see Prompting best practices.

本指南涵盖专用于 Claude Opus 5.5 的提示模式。如需了解模型的功能和 API 变更,请参阅《Claude Opus 5.5 新功能》。如需适用于所有当前 Claude 模型的技术,请参阅《提示最佳实践》。

Claude Opus 5.5 generates output tokens more than 30 percent faster than Claude Opus 5 and tends to finish the same task with fewer tokens. Existing Claude Opus 5 prompts should perform well without changes, and the patterns in Prompting Claude Opus 5 remain a reasonable starting point. Start with the section that matches what you observe:

与 Claude Opus 5 相比,Claude Opus 5.5 生成输出令牌的速度提升了 30% 以上,并且往往能用更少的令牌完成相同的任务。现有的 Claude Opus 5 提示词无需更改即可表现良好,《提示 Claude Opus 5》中的模式仍然是一个合理的起点。请根据您观察到的情况选择对应的章节开始:

  • Unsure which effort level to run, or turns run longer and cost more than they did on Claude Opus 5: Calibrate effort
  • Your Claude Opus 5 integration ran with thinking disabled: Prompts written for thinking disabled
  • An unattended agent stops partway through a long task after reporting progress: Unattended agentic runs
  • Requests return stop_reason: "refusal": Safeguard refusals
  • Long agentic turns look silent, or you want updates at predictable points: User-facing progress updates
  • An agent that works across several connected apps misses information the task didn't point to: Explore context in multi-app workflows
  • You run a team of agents and want it to finish sooner: Time signals for multiagent harnesses
  • Replies in a chat application start slowly because the model thinks at length first: Thinking instructions in chat system prompts
  • The model follows instructions that arrived inside text a user pasted: Mark pasted text in user messages
  • Answers about dense charts, diagrams, or screenshots miss detail: Tools for complex visual inputs
  • Frontend output looks generic: Frontend design defaults
  • 不确定应运行哪种努力级别,或者运行轮次比在 Claude Opus 5 上更长且成本更高:校准努力程度
  • 您的 Claude Opus 5 集成是在禁用思考功能的情况下运行的:为禁用思考功能编写的提示词
  • 无人值守代理在报告进度后,在长任务中途停止:无人值守代理式运行
  • 请求返回 stop_reason: "refusal":安全护栏拒绝
  • 长代理式轮次看起来处于静默状态,或者您希望在可预测的时间点获取更新:面向用户的进度更新
  • 跨多个连接应用工作的代理遗漏了任务未指向的信息:在多应用工作流中探索上下文
  • 您运行一个代理团队并希望其尽快完成:多代理框架的时间信号
  • 聊天应用程序中的回复启动缓慢,因为模型首先进行了长时间的思考:聊天系统提示词中的思考指令
  • 模型遵循用户粘贴到文本中的指令:在用户消息中标记粘贴的文本
  • 关于密集图表、示意图或截图的回答遗漏细节:复杂视觉输入的工具
  • 前端输出看起来过于通用:前端设计默认值

Capabilities relevant to prompting

与提示相关的能力

The capabilities that matter most for prompting are:

对提示最重要的能力包括:

  • Agentic coding and code review: The model is strongest on multistep work in a real repository, such as carrying a change through a large code base until its tests pass. In Anthropic's testing, at its default medium effort the model matched or beat Claude Opus 5 at high effort on such tasks, in fewer steps and with fewer tokens. It also sustains long-running autonomous work better than Claude Opus 5, such as multi-hour audits and migrations of large code bases run end to end with parallel subagents and little oversight. Early testers also reported stronger code review, with more bugs caught than on Claude Opus 5 and fewer false alarms, and it explains its changes in plain language.
  • Knowledge work: The model is much less likely to state an incorrect figure or cite the wrong source. It's better at financial modeling tasks, such as building a financial model and one-page summary for a transaction or finding and fixing errors in a valuation workbook, and it catches details that are easy to miss in large inputs, such as a date in a long planning thread that falls on the wrong weekday or a chart in a slide deck that doesn't match the underlying figures. The spreadsheets, slides, and documents it produces need less editing before you share them.
  • Communication: Its reports on agentic work, both the updates while it works and the summary when it finishes, say plainly what it did, what it found, and what it needs from you. See User-facing progress updates.
  • Charts, diagrams, screenshots, and computer use: The model reads visual material more accurately than Claude Opus 5 without extra tooling: in Anthropic's testing, even at its lowest effort setting it read values off dense charts more accurately than Claude Opus 5 did at its highest, using a small fraction of the output tokens. It is better, too, where meaning depends on position rather than text: which boxes an arrow connects in a flowchart, what changed between two versions of a diagram, or exactly when a meeting starts and ends in a calendar screenshot. It's also more reliable at computer use, where it operates applications from screenshots over many steps: at its default effort it matched the success rate that Claude Opus 5 reached only at a much higher effort setting. See Tools for complex visual inputs.
  • 代理式编码和代码审查:该模型在处理真实仓库中的多步骤工作时表现最强,例如将更改贯穿整个大型代码库直至测试通过。在 Anthropic 的测试中,在默认中等努力程度下,该模型在这些任务上的表现达到或超过了高努力程度的 Claude Opus 5,且步骤更少、令牌消耗更少。它还比 Claude Opus 5 更好地维持长期自主工作,例如使用并行子代理和极少监督端到端运行的大型代码库的多小时审计和迁移。早期测试人员还报告称其代码审查能力更强,捕获的 bug 多于 Claude Opus 5,误报更少,并且它能用通俗语言解释其更改。
  • 知识工作:模型出现错误数据或引用错误来源的可能性要小得多。它在财务建模任务方面表现更佳,例如为交易构建财务模型和单页摘要,或在估值工作簿中查找并修复错误,并且能够捕捉到大输入中容易遗漏的细节,例如长规划线程中落在错误星期几的日期,或幻灯片演示文稿中与底层数据不匹配的图表。它生成的电子表格、幻灯片和文档在分享前所需的编辑更少。
  • 沟通:其关于代理式工作的报告,包括工作期间的更新和完成时的总结,都直白地说明它做了什么、发现了什么以及需要您提供什么。参见面向用户的进度更新。
  • 图表、示意图、截图和计算机使用:无需额外工具,该模型对视觉材料的读取准确性高于 Claude Opus 5:在 Anthropic 的测试中,即使在最低努力设置下,它从密集图表中读取数值的准确性也高于 Claude Opus 5 在最高设置下的表现,且仅使用了极少量的输出 token。在含义取决于位置而非文本的场景中,它也表现更好:例如流程图中的箭头连接了哪些方框、两个版本的示意图之间有何变化,或日历截图中会议的确切开始和结束时间。它在计算机使用方面也更可靠,即通过截图在多步骤中操作应用程序:在默认努力设置下,其成功率达到了 Claude Opus 5 仅在更高努力设置下才能达到的水平。参见复杂视觉输入的工具。

Calibrate effort

校准努力程度

Effort is the main control for how much Claude Opus 5.5 thinks, and because thinking is always on, it's the first setting to adjust when trading off intelligence, latency, and cost. Start at medium, the default on Claude Opus 5.5 (Claude Opus 5 defaults to high), set it explicitly, and test several levels against your own evals rather than carrying over the setting you used on Claude Opus 5. Effort level names don't correspond to the same amount of thinking across models: in Anthropic's testing, Claude Opus 5.5 at medium matches or exceeds Claude Opus 5 at high on coding and knowledge-work evaluations, and on several coding evaluations low comes close to it at much lower cost. See Recommended effort levels for Claude Opus 5.5.

努力程度是控制 Claude Opus 5.5 思考量的主要参数,由于思考功能始终开启,因此在权衡智能、延迟和成本时,它是首先调整的设置。从中等(Claude Opus 5.5 的默认值,而 Claude Opus 5 默认为高)开始,显式设置该值,并在您自己的评估中测试多个级别,而不是沿用您在 Claude Opus 5 上使用的设置。不同模型的努力程度名称并不对应相同的思考量:在 Anthropic 的测试中,Claude Opus 5.5 在中等设置下的表现匹配或超过了 Claude Opus 5 在高设置下的表现,而在多项编码评估中,低设置的表现接近高设置,但成本更低。参见 Claude Opus 5.5 的推荐努力程度。

At a given level, Claude Opus 5.5 tends to think more per turn than Claude Opus 5, especially at xhigh and max. If you keep the effort value you set for Claude Opus 5, expect longer turns and more output tokens. Three adjustments help:

在给定层级下,Claude Opus 5.5 往往比 Claude Opus 5 在每个回合中思考得更多,尤其是在 xhigh 和 max 层级。如果你保持为 Claude Opus 5 设置的 effort 值不变,预计会出现更长的回合时间和更多的输出 token。以下三项调整会有所帮助:

  • Set max_tokens high enough to leave room for the model's thinking tokens and the reply. Thinking counts toward max_tokens even when thinking content isn't returned to you, so a limit sized for Claude Opus 5 with thinking off can cut replies off. For the long turns that agentic coding can produce, a max_tokens of 128,000, the model's maximum, has worked well in Anthropic's testing.
  • Reserve xhigh and max for work where you've measured a quality gain.
  • To get less thinking, lower the effort level first. Lowering effort reduces thinking, and with it cost and latency, more reliably than prompt instructions do.
  • 将 max_tokens 设置得足够高,以容纳模型的思考 token 和回复内容。即使不向你返回思考内容,思考部分也会计入 max_tokens 限额;因此,如果按关闭思考功能的 Claude Opus 5 来设定限额,可能会截断回复。对于 Agent 式编程可能产生的长回合,Anthropic 的测试表明,使用模型最大值 128,000 的 max_tokens 效果良好。
  • 仅在已衡量出质量提升的工作场景中保留使用 xhigh 和 max。
  • 若要减少思考,请先降低 effort 层级。与提示词指令相比,降低 effort 能更可靠地减少思考量,从而降低成本和延迟。

Changing the top-level effort value between requests invalidates the prompt cache. To run individual turns at a different level, use a per-message effort change (beta) instead, which keeps the cache.

在请求之间更改顶层 effort 值会使提示缓存失效。若要在不同层级运行单个回合,请使用每条消息的 effort 变更(beta),这样可以保留缓存。

Prompts written for thinking disabled

为禁用思考功能而编写的提示词

Claude Opus 5 accepts thinking: {"type": "disabled"} at high effort or below; Claude Opus 5.5 doesn't, and the migration guide covers the request change. If your Claude Opus 5 integration ran with thinking disabled, four changes go with it:

Claude Opus 5 在高或更低层级接受 thinking: {"type": "disabled"};但 Claude Opus 5.5 不接受,迁移指南中涵盖了请求变更说明。如果你的 Claude Opus 5 集成是在禁用思考功能的情况下运行的,则需进行以下四项更改:

  • Start at low effort and measure. At low the model keeps its thinking short. How often it skips thinking altogether depends on your prompts, so measure latency and quality on your own traffic and move to medium if quality drops. If time to first token still matters after that, a system prompt line such as "Answer directly without deliberating." can reduce thinking further; measure quality when you add it, because less thinking can lower it.
  • Remove instructions that stood in for thinking. If your prompt asked the model to write out its reasoning in the response as a substitute for thinking, remove that instruction and read the reasoning from summarized thinking blocks instead (display: "summarized"); a prompt that pushes the model to reproduce its reasoning in the response text can be declined with the reasoning_extraction refusal category.
  • Re-test the thinking-disabled mitigations. Running with thinking disabled recommends a combined instruction (permission to speak before a tool call, what to do when no tool fits, no internal tags) and removing any rule that tells the model not to think. Both address artifacts that appear on Claude Opus 5 only when thinking is disabled. With thinking always on, check whether you still need the instruction, and remove the no-thinking rule either way.
  • Read the response by block type. Check each block's type instead of assuming the first content block is text: a response may or may not begin with a thinking block, whose thinking field is empty under the default display: "omitted".
  • 从低层级开始并测量性能。在 low 层级,模型会保持思考简短。它完全跳过思考的频率取决于你的提示词,因此请根据你的实际流量测量延迟和质量,如果质量下降则移至 medium 层级。如果在此之后首 token 时间(time to first token)仍然重要,可以添加类似“直接回答,无需深思。”的系统提示行以进一步减少思考;添加时应测量质量,因为减少思考可能会降低质量。
  • 移除那些充当思考替代品的指令。如果你的提示词要求模型在回复中写出推理过程以代替思考,请移除该指令,改为从总结后的思考块中读取推理内容(display: "summarized");如果提示词试图让模型在回复文本中复现其推理过程,可能会被拒绝,并归类为 reasoning_extraction 拒绝类别。
  • 重新测试禁用思考时的缓解措施。在禁用思考的情况下运行,建议采用组合指令(工具调用前允许发言、无合适工具时如何处理、不使用内部标签)并移除任何指示模型不要思考的规则。这两项措施均针对仅在禁用思考时在 Claude Opus 5 上出现的异常现象。在始终启用思考的情况下,检查是否仍需该指令,并无论如何都移除禁用思考的规则。
  • 按块类型读取响应。检查每个块的类型,而不是假设第一个内容块是文本:响应可能以也可能不以思考块开头,其 thinking 字段在默认显示下为“omitted”(已省略)。

Unattended agentic runs

无人值守的代理式运行

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件