Hacker News ★ 96 4 min

Prompting Claude Opus 5.5

🔗 https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5

📌 Anthropic 出手:Claude Opus 5.5 提示詞怎麼跟著調整?

TL;DR:Opus 5.5 的 thinking 恆常開啟且預設 effort 下修至 medium,舊提示詞能跑,但省錢省時間得靠重新校準。

如果你的 Agent pipeline 是照著 Claude Opus 5 的參數硬搬過來的,先別急著慶祝「相容」。Anthropic 官方最新發布的 Prompting Claude Opus 5.5 指南開宗明義提醒:舊提示詞「應該」能正常運作,但這句話背後藏著一個關鍵變化,thinking(模型的內部推理)現在是恆常開啟的,你再也不能用 thinking: {"type": "disabled"} 把它關掉了。

🤔 為什麼需要一份新的提示指南

根據官方說明,Opus 5.5 產生輸出 token 的速度比 Opus 5 快超過 30%,完成同一任務所需的 token 數也更少。但這份效能提升不是免費午餐:Opus 5.5 的預設 effort 是 medium,而 Opus 5 的預設是 high;效果分級的名稱在不同模型間並不代表同樣的思考量。換句話說,你原本設定的 effort 值,在新模型上可能代表完全不同的成本與延遲曲線,直接照搬容易讓某些任務跑得比預期久、比預期貴。

🧩 兩個必須重新測試的情境

第一是效果分級(effort)的校準。官方建議從 medium 開始,明確設定數值,再拿自己的評測集去比較不同等級的表現,而不是延用 Opus 5 時代的設定。在 Anthropic 的測試中,Opus 5.5 的 medium 就能打平或超越 Opus 5 的 high,在部分程式碼評測上,甚至 low 就能以更低成本逼近 high 的表現。同時要注意,同一個 effort 等級下,Opus 5.5 傾向比 Opus 5 思考得更多,尤其是在 xhigh 與 max 等級,因此需要把 max_tokens 拉高(官方在長時間 agentic 任務中,用到模型上限的 128,000 效果不錯),否則思考用掉的 token 可能會把回覆截斷。

第二是「thinking disabled」的遷移。Opus 5 允許在 high 以下的 effort 關閉 thinking,Opus 5.5 不再接受這個設定。如果你原本的整合是關閉 thinking 跑的,官方建議:先從 low effort 開始測量效果與延遲;移除當初為了取代 thinking 而寫的「請把推理過程寫在回覆裡」之類指令,改成讀取 summarized thinking 區塊;重新測試舊的 thinking-disabled 因應措施是否還必要;並且改用逐一檢查回覆區塊型別(block type)的方式讀取結果,而不是假設第一個內容區塊就是文字。

📊 在程式碼、知識工作與視覺理解上的具體差異

官方測試指出,在真實程式碼庫裡進行多步驟工作時,Opus 5.5 在預設 medium effort 下就能打平甚至超越 Opus 5 在 high effort 下的表現,且步驟數與 token 用量都更少;它也更能撐住長時間、少人監督的自動化任務,例如多小時的程式碼庫稽核與遷移。在知識工作上,模型更不容易講錯數字或引錯來源,在財務建模與抓出投影片與試算表中細節錯誤上也有改善。在視覺理解方面,即便設定最低的 effort,Opus 5.5 讀取密集圖表數值的準確度仍優於 Opus 5 在最高 effort 下的表現,且只用一小部分的輸出 token;在需要依賴「位置關係」判讀的任務(例如流程圖箭頭連到哪個方塊)上也更可靠,操作電腦應用程式(computer use)的成功率在預設 effort 下就能達到 Opus 5 需要更高 effort 才能達到的水準。

💡 一個容易踩到的快取陷阱

指南特別提醒:在頂層改變 effort 數值會讓 prompt cache 失效。如果只是想針對個別回合調整思考量,應該使用「單一訊息層級的 effort 變更」(beta 功能),這樣才能保留快取效益。

🎯 實務啟示

不要假設「舊提示詞能跑」等於「舊設定是最佳設定」。把 effort 明確寫死、針對自己的評測集掃過幾個等級、重新檢視是否還在用 thinking-disabled 時代的因應手法,再依任務把 max_tokens 拉高,是遷移到 Opus 5.5 時最值得花時間做的事。

🔗 來源

#Anthropic #ClaudeOpus #PromptEngineering #LLM #AgenticAI #AIcoding #ThinkingTokens #DeveloperTools #GenerativeAI #MachineLearning

原始資料 Hacker News · 收集於 2026-09-28
來源原標題
Prompting Claude Opus 5.5
作者
Michelangelo11
原始標籤
hackernews
來源訊號
HN points 193 HN 留言 218
原始連結
https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5

摘要原文

 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 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: 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 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 . 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 . 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: 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. 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. 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: 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" . Unattended agentic runs  On long tasks with several parts, Claude Opus 5.5 keeps the user updated as it works, and some of those updates end the turn with text rather than a tool call ( stop_reason: "end_turn" ). (193 points, 218 comments on Hacker News)

由 claude-code/sonnet 自動生成