Skip to content
← 回到文章列表

使用 Claude Code:推理强度怎么花 ​

One of the best parts of our newest Claude models is how they respond to effort without breaking the prompt cache in Claude Code, but I’ve received a lot of questions on this from users. What is effort really, and when do you use which effort level? Why do we need effort at all?

我们最新这批 Claude 模型有个特别好的地方:在 Claude Code 里调推理强度(effort),它们会跟着变,而且不会打破提示词缓存。不过用户为这个问了我很多问题。推理强度到底是什么?什么时候该用哪一档?我们为什么需要它?

To answer this, I decided to do a deep dive into the evals and do my own tests of effort across normal work.

为了回答这些,我决定把评测结果仔细翻一遍,再拿日常的活儿自己测测不同的推理强度。

At a high level, I found that effort was a great way of modulating how much verification and edgecase testing Claude did and how much of its own judgement it used. Extra effort gave better results in domains where verification and edgecase testing was more useful like hardware, code review, and security.

大体上,我发现推理强度很适合用来调节两件事:Claude 做多少验证和边界情况测试,以及它自己拿多少主意。在验证和边界测试更有用的领域,比如硬件、代码评审、安全,调高推理强度效果更好。

For normal software engineering, I’m running a loop of getting the model to interview me then implementing on low effort, reviewing what it built, and then running verification on high effort.

日常的软件开发,我现在是这么循环的:先让模型来问我需求,然后用 low 实现,看一遍它做出来的东西,最后用 high 做验证。

What is effort?推理强度是什么? ​

At a high level, effort gives the model an approximation of how much compute you want it to spend on the task. It’s somewhat related to your modeling of the difficulty of the task.

粗略地说,推理强度是在告诉模型,你大概希望它在这个任务上花多少算力。这和你自己对任务难度的估计有点关系。

Think of it this way, if someone asked you to do something in 12 hours straight, you might assume they just want you to do it and try very hard. If someone asked you to do the same task in 1 hour, you’d try to get them the best version that meets their task and then expect to iterate from there.

可以这么想:要是有人让你连着干 12 个小时做一件事,你多半会以为对方就是要你做成,而且要拼尽全力。要是同一件事只给你 1 个小时,你会先交出一个能满足需求的最好版本,然后预期接下来还要再改几轮。

Or, you might push back and say the task requires at least 3 hours and then work for 3 hours to deliver it.

又或者,你会顶回去,说这活儿至少要 3 个小时,然后干满 3 个小时再交。

You should think of effort in the same way. Claude will always try and do your task reasonably, but higher effort will involve Claude taking more independent action for judgement and verification.

推理强度也该这么理解。Claude 无论如何都会尽量把你的任务做得像样,但推理强度越高,它就越会自己动手去判断、去验证。

Effort curves推理强度曲线 ​

Fable 5.1 and Opus 5.5’s effort curves are our best yet: at each level, there is an uptick in benchmark scores and tokens consumed.

Fable 5.1 和 Opus 5.5 的推理强度曲线是我们迄今最好的:每往上调一档,基准分和消耗的 token 都会涨一截。

Terminal-Bench 3.0
各档推理强度下的通过率与 token 消耗
FIG ATerminal-Bench 3.0,所有模型都跑同样的 70 个任务(去掉了 4 个 GPU 任务)。Opus 5.5 晚了大约三周才跑,回复上限 128k token,且不能访问 GitHub 和 PyPI;Opus 5 的 max 用的是它 effort-120 那一轮。

But what does this mean in practice? To evaluate this, I tried several tasks at different effort levels and pored over the benchmarks.

可这在实际使用里意味着什么?为了弄清楚,我用不同的推理强度试了几个任务,又把基准测试的结果仔细看了一遍。

Building with effort用不同的推理强度做东西 ​

The best way to understand how models work is to run experiments. I tried doing the same tasks at several different effort levels on Opus 5.5 to understand the work it would do. I did this on a wide variety of work, but am illustrating this with a few toy examples.

想搞懂模型怎么干活,最好的办法是做实验。我在 Opus 5.5 上用几档不同的推理强度做同样的任务,看它分别会做些什么。我试过的活儿五花八门,这里只拿几个玩具例子来说明。

Underspecified build task需求没说清的构建任务 ​

If I ask Claude to “build a personal fitness and workout tracker app,” effort changes dramatically how fleshed out the app is, but also results in Claude making more choices along the way. At low effort, the fitness app is just a log and a simple graph. At higher effort levels the app is more complex with additional detail. At max effort there’s a heat chart.

如果我让 Claude「做一个个人健身和训练记录应用」,推理强度会大大改变这个应用做得有多完整,同时 Claude 一路上替我做的决定也更多。low 下,健身应用就是一个记录列表加一张简单的图。档位越高,应用越复杂,细节越多。到了 max,还多出一张热力图。

If I wanted a simple base to iterate from, low effort would get it done. Max effort would be if I wanted Claude’s best one shot.

如果我只想要一个简单的底子再慢慢迭代,low 就够了。想让 Claude 一次拿出它最好的东西,就用 max。

Lightly specified design task需求说了一点的设计任务 ​

What if I have a task that is fairly specified already but I want some exploration with Claude? As an example I tried to ask it to redesign the /config menu in Claude Code. Every pass had roughly the same idea, to use submenus and better search.

要是任务已经说得比较清楚,但我还想跟 Claude 一起探索一下呢?举个例子,我让它重新设计 Claude Code 里的 /config 菜单。每一轮的思路都差不多:用子菜单,再把搜索做好。

At low effort (which took 1 minute), I got an interactive sketch that conveyed the idea but didn’t look very much like Claude Code.

low 下(花了 1 分钟),我拿到一个可交互的草图,意思传达到了,但看着不太像 Claude Code。

At max effort (which took 28 minutes), I got a mockup that looked very much like Claude Code, along with a bunch of walkthroughs for different flows.

max 下(花了 28 分钟),我拿到一个很像 Claude Code 的模型稿,还附带一堆不同流程的演示。

If my goal was to iterate and give feedback, low effort would get there much faster. But max effort gives me something much more polished right off the bat. For this particular task, I think I prefer using low effort to understand Claude’s vision.

如果我的目的是迭代、给反馈,low 快得多。max 则一上来就给我一个精致得多的东西。就这个任务来说,我更愿意用 low 先看懂 Claude 的思路。

Highly specified build task需求写得很细的构建任务 ​

What if I gave Claude lots of details? I tried asking Claude to interview me in-depth about the fitness app and then gave that spec to be implemented by different models at different effort levels.

如果我给 Claude 很多细节呢?我先让 Claude 就这个健身应用把我细细问了一遍,然后把得到的规格说明交给不同的模型、用不同的推理强度去实现。

I found that given this spec, the models behaved much more similarly. I got designs that looked fairly similar and had similar implementations but with different details, at max effort Claude took some time to simplify a few of the details.

我发现有了这份规格说明,各个模型的表现接近得多。设计看着差不多,实现也差不多,只是细节不同;max 下 Claude 还花了些时间把几处细节简化了。

Takeaways小结 ​

For regular software engineering, particularly new feature work, the effort level depends a lot on how in the loop I want to be. Low effort allows Claude to respond quickly with a starting point, higher effort levels will get more work done but Claude will also make more assumptions on my behalf.

对日常的软件开发,尤其是做新功能,选哪一档很大程度上取决于我想参与多少。low 能让 Claude 很快给出一个起点;档位越高,做完的活儿越多,但 Claude 替我做的假设也越多。

A particularly fruitful loop for feature development I’ve been using is:

我开发功能时一直在用一个特别好使的循环:

  • Give Claude a spec and ask it to interview me about any details I’m missing给 Claude 一份规格说明,让它就我漏掉的细节来问我
  • Implement it on low effort用 low 实现
  • Review to make sure it got the gist of it correct, iterate on low effort as needed看一遍,确认大方向没错,需要的话继续用 low 迭代
  • Verify and test on high effort用 high 验证和测试

How effort levels impact output on difficult tasks难题上,推理强度怎样影响结果 ​

But these are obviously toy examples, where Claude is well able to complete them. What about when the difference is between Claude completing the task or not completing the task?

不过这些显然都是玩具例子,Claude 完全做得来。要是差别在于 Claude 能不能把任务做成,又会怎样?

To find these difficult problems, you have to go to the benchmarks so I dove into one I like: Terminal-Bench 3.0, a community-sourced benchmark.

这种难题得去基准测试里找,所以我钻进了一个我喜欢的:Terminal-Bench 3.0,一个由社区出题的基准。

Terminal-Bench 3.0 problems can broadly be separated into categories like security, hardware, ML, science, software, operations and media. You can see all of the problems here: https://github.com/harbor-framework/terminal-bench/releases/tag/v3.0.0. They’re sourced from the community, so anyone can contribute.

Terminal-Bench 3.0 的题目大致可以分成安全、硬件、机器学习、科学、软件、运营和媒体这几类。所有题目都在这里:https://github.com/harbor-framework/terminal-bench/releases/tag/v3.0.0。题目来自社区,谁都可以贡献。

It’s worth reading to get a sense of the type of problems these models face. I found I was surprised by the scope and ambition of a lot of these tasks. They are much more complicated than the average task I’d face.

值得读一读,感受一下这些模型面对的是什么样的问题。很多题目的规模和野心让我吃了一惊,比我平时碰到的一般任务复杂得多。

For example, some of the tasks included:

比如其中有这些题:

  • Hardware (retro-console-soc): build an 8-bit game console in Verilog that fits a small FPGA and renders a test ROM.硬件(retro-console-soc):用 Verilog 做一台 8 位游戏机,要塞进一块小 FPGA,还要能渲染一个测试 ROM。
  • Science (takens-embedding-lean): formally prove Takens’ embedding theorem in Lean 4.科学(takens-embedding-lean):在 Lean 4 里形式化证明 Takens 嵌入定理。
  • ML (mp-checkpoint-consolidation): merge 16 shards of a mixture-of-experts checkpoint into one file that reproduces the reference logits.机器学习(mp-checkpoint-consolidation):把一个混合专家(mixture-of-experts)模型检查点的 16 个分片合并成一个文件,要能复现参考 logits。
  • Operations (intrastat-meldung): run a company’s month-end EU trade-statistics filing end to end.运营(intrastat-meldung):把一家公司月末的欧盟贸易统计申报从头到尾跑一遍。
  • Media (layout-config-recreation): rebuild a poster image as an editable layout file.媒体(layout-config-recreation):把一张海报图片重建成可编辑的版式文件。

Higher effort levels help when there are many edge cases边界情况多的时候,高档位有用 ​

My main takeaway from reading the Terminal-Bench 3.0 results was that higher effort is best for tasks with lots of hidden edge cases.

读完 Terminal-Bench 3.0 的结果,我最大的收获是:推理强度越高,越适合藏着大量边界情况的任务。

A clean example is html-js-filter, a Terminal-Bench 3.0 task that asks for an HTML sanitizer that strips every way of smuggling JavaScript into a page. Fable 5.1 went from 1/5 at low to 5/5 at xhigh.¹

一个很干净的例子是 html-js-filter。这道 Terminal-Bench 3.0 的题要求写一个 HTML 净化器,把往页面里偷塞 JavaScript 的所有路子都堵掉。Fable 5.1 从 low 的 1/5 涨到了 xhigh 的 5/5。¹

A typical attempt at low effort takes about 2 minutes. Each of these attempts wrote a filter in roughly one pass, then tested it against a single hand-written page.

low 下一次典型的尝试大约 2 分钟。每次都是差不多一遍写完过滤器,再拿一个手写的页面测一下。

A high-effort run finishes in about 33 minutes. In the run I traced, it adversarially reviewed its first draft, then read the installed parser’s source to check for bugs, ran many clean test cases until they gave the same output as the input, ran a standard XSS test suite, and finally, wrote a random-document fuzzer.

high 下跑一次大约 33 分钟。我跟踪的那次,它先挑刺似的审了一遍自己的初稿,然后去读已安装的解析器的源码找 bug,跑了很多干净的测试用例,直到输出和输入一致为止,又跑了一套标准的 XSS 测试,最后还写了一个随机生成文档的模糊测试器。

For something as edge-cased as a HTML sanitizer, this extra effort is well worth it. Spending more tokens for thoroughness also makes sense for complex tasks with high production requirements such as performance optimization or security review.

HTML 净化器这种满是边界情况的东西,多花这份力气非常值。对生产要求高的复杂任务,比如性能优化或安全审查,多花些 token 换来周全也说得通。

But you don’t need this level of effort for every task.

但不是每个任务都需要这么高的推理强度。

The diagram below shows every Terminal-Bench 3.0 result and how it failed, across different models and effort levels. Overall, increasing effort tends to reduce failures due to missing edgecases (purple blocks), but does not fix when the model has the wrong approach (blue blocks).

下面这张图列出了 Terminal-Bench 3.0 的每一个结果,以及它在不同模型、不同推理强度下是怎么失败的。总体来看,调高推理强度往往能减少因漏掉边界情况导致的失败(紫色块),但模型思路本身错了的时候(蓝色块),调高也救不回来。

Problem areas where effort helps推理强度在哪些领域管用 ​

One of the most interesting takeaways for me from evaluating these models on Terminal-Bench 3.0 was that there were some problem areas that benefited from effort more than others. You can see a breakdown in the following diagram:

用 Terminal-Bench 3.0 评测这些模型,我觉得最有意思的发现之一是:有些领域从推理强度里得到的好处比别的领域多。下面这张图是分领域的情况:

To illustrate this, I chose a few problems from different areas from Terminal-Bench 3.0 where Opus 5.5 failed at low effort but succeeded at high effort — mostly because it tested and accounted for edge cases:

为了说明这一点,我从 Terminal-Bench 3.0 的不同领域挑了几道题,Opus 5.5 在 low 下做不出来,在高档位下做成了,主要是因为它测试并照顾到了边界情况:

mvcc-lsm-compaction: a Terminal-Bench 3.0 task that asks for a fix to a storage-engine bug from its crash report, without breaking compaction. Opus 5.5 went from 0/5 at low to 4/5 at xhigh.

mvcc-lsm-compaction:这道 Terminal-Bench 3.0 的题要根据崩溃报告修好一个存储引擎的 bug,同时不能把压缩(compaction)弄坏。Opus 5.5 从 low 的 0/5 涨到了 xhigh 的 4/5。

At low (about a minute per attempt), Claude would edit the code before building it or running the reproducer, and did not check that its new test would have caught the original bug.

low 下(每次大约 1 分钟),Claude 还没构建、没跑复现脚本就去改代码,也没检查自己新写的测试能不能抓到原来那个 bug。

At xhigh (about 11 minutes), Claude reproduced the crash first, wrote a randomized test against a reference that never compacts, and checked that its tests failed on half-finished fixes.

xhigh 下(大约 11 分钟),Claude 先把崩溃复现出来,写了一个随机化测试,拿一个从不做压缩的参考实现来对照,还确认了半成品的修复过不了它的测试。

cli-2ph-simplex: a Terminal-Bench 3.0 task that asks for a CLI linear-program solver written in Python. Opus 5.5 went from 0/5 at low to 5/5 at high.

cli-2ph-simplex:这道 Terminal-Bench 3.0 的题要用 Python 写一个命令行的线性规划求解器。Opus 5.5 从 low 的 0/5 涨到了 high 的 5/5。

The low attempts wrote a solver in one pass, checked it with a few small problems and stopped around 10k tokens. In the final message, Claude warned it might be slow on big problems, but did not check.

low 下的尝试一遍写完求解器,拿几个小问题检查一下,到 1 万 token 左右就停了。Claude 在最后一条消息里提醒说大问题上可能会慢,但没去验证。

During the high attempts, Claude tested its solver on random problems against a separate brute-force solver, then timed bigger ones, hit cases that ran far too long or crashed, and reworked its search.

high 下,Claude 拿随机问题测试自己的求解器,和另写的一个暴力求解器对照,然后给更大的问题计时,撞上了跑得太久或者崩溃的情况,于是重做了搜索部分。

gsea-proteomics: a Terminal-Bench 3.0 task that asks for a gene set enrichment analysis (GSEA) on proteomics data to find which of eight treatments resemble a target tissue. Opus 5.5 went from 0/5 at low to 4/5 at high.

gsea-proteomics:这道 Terminal-Bench 3.0 的题要对蛋白质组学数据做基因集富集分析(GSEA),找出八种处理里哪些和目标组织相似。Opus 5.5 从 low 的 0/5 涨到了 high 的 4/5。

At low effort, Claude picked a reasonable-sounding way to prep the data, ran the analysis that one way, and reported the result.

low 下,Claude 挑了一种听上去合理的数据预处理方式,按这一种方式跑完分析,就报告了结果。

At high, Claude tried two ways of prepping the data, noticed that the list of significant treatments changed, and dug into why before choosing the correct one.

high 下,Claude 试了两种预处理方式,发现显著的处理列表变了,就先追查原因,再选出正确的那种。

If a user were in the loop, Claude may have asked the user about the way to set up the problem, but without a user in the loop, high effort does better.

如果有用户参与,Claude 也许会去问用户这个问题该怎么设定;但没有用户参与的时候,high 做得更好。

When to use different effort levels in Claude Code在 Claude Code 里什么时候用哪一档 ​

Here’s my rule of thumb on when to use which effort level:

我自己选档位的经验法则是这样的:

  • Low: for when I want quick responses that are in the loop, e.g. brainstorming, sketching, easy changesLow:我想要快速响应、自己全程参与的时候,比如头脑风暴、画草图、简单的改动
  • Medium: for most of my regular software engineering work, e.g. new feature implementation.Medium:我大部分日常开发工作,比如实现新功能。
  • High: for work where verification is important or there are edge cases, e.g. fixing a bug in a brownfield codebase.High:验证很重要或者有边界情况的活儿,比如在一个老代码库里修 bug。
  • Max: When I want Claude to operate fully autonomously to solve difficult problems, e.g. end to end building and verification of an app, finding security vulnerabilities in critical software.Max:我想让 Claude 完全自主地去解决难题的时候,比如从头到尾构建并验证一个应用,在关键软件里找安全漏洞。

Try varying effort for Opus 5.5 and Fable 5.1 based on your task or even mid-conversation by using /effort in Claude Code and let me know if this matches your intuition.

在 Claude Code 里用 /effort,按任务给 Opus 5.5 和 Fable 5.1 换换推理强度试试,对话进行到一半也能换。看看这些结论跟你的直觉对不对得上,告诉我。

¹ A note on the numbers: these come from our own internal runs, 5 attempts per task, with our production safety interventions off for Fable 5.1; in Claude products, Fable 5.1’s safeguards hand some security requests to Opus. The security tasks also ran without internet access, so the per-task counts here won’t line up with the public leaderboard or the launch post. The worked examples come from individual runs, some at intermediate effort settings.

¹ 关于这些数字:它们来自我们内部的运行,每道题 5 次尝试,Fable 5.1 关掉了生产环境的安全干预;在 Claude 的产品里,Fable 5.1 的安全防护会把部分安全类请求转给 Opus。安全类题目也是在没有网络的情况下跑的,所以这里每道题的数字和公开排行榜、发布文章里的对不上。文中的具体例子来自单次运行,其中一些用的是中间档位的推理强度。

最后更新: