这是用户在 2025-7-25 16:15 为 https://www.anthropic.com/engineering/claude-think-tool 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?
Try Claude  尝试 Claude
Engineering at Anthropic
Anthropic 的工程
Abstract shapes illustrating Anthropic's Engineering Blog

The "think" tool: Enabling Claude to stop and think in complex tool use situations
“思考”工具:使 Claude 能够在复杂工具使用情况下停下来思考

As we continue to enhance Claude's complex problem-solving abilities, we've discovered a particularly effective approach: a "think" tool that creates dedicated space for structured thinking during complex tasks.
随着我们不断提升 Claude 的复杂问题解决能力,我们发现了一种特别有效的方法:一种“思考”工具,为复杂任务中的结构化思维创造了专门的空间。

This simple yet powerful technique—which, as we’ll explain below, is different from Claude’s new “extended thinking” capability—has resulted in remarkable improvements in Claude's agentic tool use ability. This includes following policies, making consistent decisions, and handling multi-step problems, all with minimal implementation overhead.
这个简单但强大的技术——正如我们下面将要解释的,它与 Claude 的新“ 扩展思考 ”能力不同——已经在 Claude 的自主工具使用能力上取得了显著的改善。这包括遵循政策、做出一致的决策以及处理多步骤问题,所有这些都只需最小的实施开销。

In this post, we'll explore how to implement the “think” tool on different applications, sharing practical guidance for developers based on verified benchmark results.
在这篇文章中,我们将探讨如何在不同应用中实施“思考”工具,并根据经过验证的基准结果为开发者分享实用的指导。

What is the "think" tool?
什么是“思考”工具?

With the "think" tool, we're giving Claude the ability to include an additional thinking step—complete with its own designated space—as part of getting to its final answer.
通过“思考”工具,我们赋予 Claude 在得出最终答案的过程中增加一个额外思考步骤的能力——这个步骤有自己指定的空间。

While it sounds similar to extended thinking, it's a different concept. Extended thinking is all about what Claude does before it starts generating a response. With extended thinking, Claude deeply considers and iterates on its plan before taking action. The "think" tool is for Claude, once it starts generating a response, to add a step to stop and think about whether it has all the information it needs to move forward. This is particularly helpful when performing long chains of tool calls or in long multi-step conversations with the user.
虽然它听起来与扩展思维相似,但这是一个不同的概念。扩展思维完全是关于 Claude 在开始生成响应之前所做的事情。在扩展思维中,Claude 会深入考虑并迭代其计划,然后再采取行动。“思考”工具是为 Claude 设计的,一旦它开始生成响应,就可以增加一个步骤,停下来思考是否拥有所有前进所需的信息。这在执行长链工具调用或与用户进行长时间的多步骤对话时特别有用。

This makes the “think” tool more suitable for cases where Claude does not have all the information needed to formulate its response from the user query alone, and where it needs to process external information (e.g. information in tool call results). The reasoning Claude performs with the “think” tool is less comprehensive than what can be obtained with extended thinking, and is more focused on new information that the model discovers.
这使得“思考”工具更适合那些 Claude 无法仅从用户查询中获得制定响应所需的所有信息的情况,以及需要处理外部信息(例如,工具调用结果中的信息)的情况。Claude 使用“思考”工具进行的推理不如扩展思维所能获得的全面,更加专注于模型发现的信息。

We recommend using extended thinking for simpler tool use scenarios like non-sequential tool calls or straightforward instruction following. Extended thinking is also useful for use cases, like coding, math, and physics, when you don’t need Claude to call tools. The “think” tool is better suited for when Claude needs to call complex tools, analyze tool outputs carefully in long chains of tool calls, navigate policy-heavy environments with detailed guidelines, or make sequential decisions where each step builds on previous ones and mistakes are costly.
我们建议在简单的工具使用场景中使用扩展思维,例如非顺序工具调用或简单的指令遵循。扩展思维在一些用例中也很有用,比如编码、数学和物理,当您不需要 Claude 调用工具时。“思考”工具更适合于当 Claude 需要调用复杂工具、在长链工具调用中仔细分析工具输出、在有详细指南的政策密集型环境中导航,或在每一步都基于前一步并且错误代价高昂的情况下做出顺序决策。

Here's a sample implementation using the standard tool specification format that comes from τ-Bench:
以下是使用来自 τ-Bench 的标准工具规范格式的示例实现:

{
  "name": "think",
  "description": "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
  "input_schema": {
    "type": "object",
    "properties": {
      "thought": {
        "type": "string",
        "description": "A thought to think about."
      }
    },
    "required": ["thought"]
  }
}

Performance on τ-Bench  在 τ-Bench 上的表现

We evaluated the "think" tool using τ-bench (tau-bench), a comprehensive benchmark designed to test a model’s ability to use tools in realistic customer service scenarios, where the "think" tool is part of the evaluation’s standard environment.
我们使用τ-bench(tau-bench)评估了“思考”工具,这是一个全面的基准测试,旨在测试模型在现实客户服务场景中使用工具的能力,其中“思考”工具是评估标准环境的一部分。

τ-bench evaluates Claude's ability to:
τ-bench 评估 Claude 的能力:

  • Navigate realistic conversations with simulated users
    与模拟用户进行真实对话
  • Follow complex customer service agent policy guidelines consistently
    始终如一地遵循复杂的客户服务代理政策指南
  • Use a variety of tools to access and manipulate the environment database
    使用多种工具访问和操作环境数据库

The primary evaluation metric used in τ-bench is pass^k, which measures the probability that all k independent task trials are successful for a given task, averaged across all tasks. Unlike the pass@k metric that is common for other LLM evaluations (which measures if at least one of k trials succeeds), pass^k evaluates consistency and reliability—critical qualities for customer service applications where consistent adherence to policies is essential.
τ-bench 中使用的主要评估指标是 pass^k,它测量的是在给定任务中,所有 k 个独立任务试验成功的概率,并在所有任务中取平均。与其他 LLM 评估中常见的 pass@k 指标(它测量的是至少有一个 k 试验成功)不同,pass^k 评估的是一致性和可靠性——这些是在客户服务应用中至关重要的品质,因为在这些应用中,始终如一地遵循政策是必不可少的。

Performance Analysis  性能分析

Our evaluation compared several different configurations:

  1. Baseline (no "think" tool, no extended thinking mode)
  2. Extended thinking mode alone
  3. "Think" tool alone
  4. "Think" tool with optimized prompt (for airline domain)

The results showed dramatic improvements when Claude 3.7 effectively used the "think" tool in both the “airline” and “retail” customer service domains of the benchmark:

  • Airline domain: The "think" tool with an optimized prompt achieved 0.570 on the pass^1 metric, compared to just 0.370 for the baseline—a 54% relative improvement;
  • Retail domain: The "think" tool alone achieves 0.812, compared to 0.783 for the baseline.
A line graph showing the performance of Claude 3.7 Sonnet on the "airline" domain of the Tau-Bench eval
Claude 3.7 Sonnet's performance on the "airline" domain of the Tau-Bench eval under four different configurations.

Claude 3.7 Sonnet's performance on the "Airline" domain of the Tau-Bench eval

Configurationk=1k=2k=3k=4k=5
"Think" + Prompt0.5840.4440.3840.3560.340
"Think"0.4040.2540.1860.1400.100
Extended thinking0.4120.2900.2320.1920.160
Baseline0.3320.2060.1480.1160.100
Evaluation results across four different configurations. Scores are proportions.

The best performance in the airline domain was achieved by pairing the “think” tool with an optimized prompt that gives examples of the type of reasoning approaches to use when analyzing customer requests. Below is an example of the optimized prompt:

## Using the think tool

Before taking any action or responding to the user after receiving tool results, use the think tool as a scratchpad to:
- List the specific rules that apply to the current request
- Check if all required information is collected
- Verify that the planned action complies with all policies
- Iterate over tool results for correctness 

Here are some examples of what to iterate over inside the think tool:
<think_tool_example_1>
User wants to cancel flight ABC123
- Need to verify: user ID, reservation ID, reason
- Check cancellation rules:
  * Is it within 24h of booking?
  * If not, check ticket class and insurance
- Verify no segments flown or are in the past
- Plan: collect missing info, verify rules, get confirmation
</think_tool_example_1>

<think_tool_example_2>
User wants to book 3 tickets to NYC with 2 checked bags each
- Need user ID to check:
  * Membership tier for baggage allowance
  * Which payments methods exist in profile
- Baggage calculation:
  * Economy class × 3 passengers
  * If regular member: 1 free bag each → 3 extra bags = $150
  * If silver member: 2 free bags each → 0 extra bags = $0
  * If gold member: 3 free bags each → 0 extra bags = $0
- Payment rules to verify:
  * Max 1 travel certificate, 1 credit card, 3 gift cards
  * All payment methods must be in profile
  * Travel certificate remainder goes to waste
- Plan:
1. Get user ID
2. Verify membership level for bag fees
3. Check which payment methods in profile and if their combination is allowed
4. Calculate total: ticket price + any bag fees
5. Get explicit confirmation for booking
</think_tool_example_2>

What's particularly interesting is how the different approaches compared. Using the “think” tool with the optimized prompt achieved significantly better results over extended thinking mode (which showed similar performance to the unprompted “think” tool). Using the "think" tool alone (without prompting) improved performance over baseline, but still fell short of the optimized approach.

The combination of the "think" tool with optimized prompting delivered the strongest performance by a significant margin, likely due to the high complexity of the airline policy part of the benchmark, where the model benefitted the most from being given examples of how to “think.”

In the retail domain, we also tested various configurations to understand the specific impact of each approach

Line graph showing the performance of Claude 3.7 Sonnet on the "retail" domain of the Tau-Bench eval
Performance of Claude 3.7 Sonnet on the "retail" domain of the Tau-Bench eval under three different configurations.

Claude 3.7 Sonnet's performance on the "Retail" domain of the Tau-Bench eval

Configurationk=1k=2k=3k=4k=5
"Think" + no prompt0.8120.7350.6850.6500.626
Extended thinking0.7700.6810.6230.5810.548
Baseline0.7830.6950.6430.6070.583
Evaluation results across three different configurations. Scores are proportions.

The "think" tool achieved the highest pass^1 score of 0.812 even without additional prompting. The retail policy is noticeably easier to navigate compared to the airline domain, and Claude was able to improve just by having a space to think without further guidance.

Key Insights from τ-Bench Analysis

Our detailed analysis revealed several patterns that can help you implement the "think" tool effectively:

  1. Prompting matters significantly on difficult domains. Simply making the "think" tool available might improve performance somewhat, but pairing it with optimized prompting yielded dramatically better results for difficult domains. However, easier domains may benefit from simply having access to “think.”
  2. Improved consistency across trials. The improvements from using “think” were maintained for pass^k up to k=5, indicating that the tool helped Claude handle edge cases and unusual scenarios more effectively.

Performance on SWE-Bench

A similar “think” tool was added to our SWE-bench setup when evaluating Claude 3.7 Sonnet, contributing to the achieved state-of-the-art score of 0.623. The adapted “think” tool definition is given below:

{
  "name": "think",
  "description": "Use the tool to think about something. It will not obtain new information or make any changes to the repository, but just log the thought. Use it when complex reasoning or brainstorming is needed. For example, if you explore the repo and discover the source of a bug, call this tool to brainstorm several unique ways of fixing the bug, and assess which change(s) are likely to be simplest and most effective. Alternatively, if you receive some test results, call this tool to brainstorm ways to fix the failing tests.",
  "input_schema": {
    "type": "object",
    "properties": {
      "thought": {
        "type": "string",
        "description": "Your thoughts."
      }
    },
    "required": ["thought"]
  }
}

Our experiments (n=30 samples with "think" tool, n=144 samples without) showed the isolated effects of including this tool improved performance by 1.6% on average (Welch's t-test: t(38.89) = 6.71, p < .001, d = 1.47).

When to use the "think" tool

Based on these evaluation results, we've identified specific scenarios where Claude benefits most from the "think" tool:

  1. Tool output analysis. When Claude needs to carefully process the output of previous tool calls before acting and might need to backtrack in its approach;
  2. Policy-heavy environments. When Claude needs to follow detailed guidelines and verify compliance; and
  3. Sequential decision making. When each action builds on previous ones and mistakes are costly (often found in multi-step domains).

Implementation best practices

To get the most out of the "think" tool with Claude, we recommend the following implementation practices based on our τ-bench experiments.

1. Strategic prompting with domain-specific examples

The most effective approach is to provide clear instructions on when and how to use the "think" tool, such as the one used for the τ-bench airline domain. Providing examples tailored to your specific use case significantly improves how effectively the model uses the "think" tool:

  • The level of detail expected in the reasoning process;
  • How to break down complex instructions into actionable steps;
  • Decision trees for handling common scenarios; and
  • How to check if all necessary information has been collected.

2. Place complex guidance in the system prompt

We found that, when they were long and/or complex, including instructions about the "think" tool in the system prompt was more effective than placing them in the tool description itself. This approach provides broader context and helps the model better integrate the thinking process into its overall behavior.

When not to use the "think" tool

Whereas the “think” tool can offer substantial improvements, it is not applicable to all tool use use cases, and does come at the cost of increased prompt length and output tokens. Specifically, we have found the “think” tool does not offer any improvements in the following use cases:

  1. Non-sequential tool calls. If Claude only needs to make a single tool call or multiple parallel calls to complete a task, there is unlikely to be any improvements from adding in “think.”
  2. Simple instruction following. When there are not many constraints to which Claude needs to adhere, and its default behaviour is good enough, there are unlikely to be gains from additional “think”-ing.

Getting started

The "think" tool is a straightforward addition to your Claude implementation that can yield meaningful improvements in just a few steps:

  1. Test with agentic tool use scenarios. Start with challenging use cases—ones where Claude currently struggles with policy compliance or complex reasoning in long tool call chains.
  2. Add the tool definition. Implement a "think" tool customized to your domain. It requires minimal code but enables more structured reasoning. Also consider including instructions on when and how to use the tool, with examples relevant to your domain to the system prompt.
  3. Monitor and refine. Watch how Claude uses the tool in practice, and adjust your prompts to encourage more effective thinking patterns.

The best part is that adding this tool has minimal downside in terms of performance outcomes. It doesn't change external behavior unless Claude decides to use it, and doesn't interfere with your existing tools or workflows.

Conclusion

Our research has demonstrated that the "think" tool can significantly enhance Claude 3.7 Sonnet's performance1 on complex tasks requiring policy adherence and reasoning in long chains of tool calls. “Think” is not a one-size-fits-all solution, but it offers substantial benefits for the correct use cases, all with minimal implementation complexity.

We look forward to seeing how you'll use the "think" tool to build more capable, reliable, and transparent AI systems with Claude.

1. While our τ-Bench results focused on the improvement of Claude 3.7 Sonnet with the “think” tool, our experiments show Claude 3.5 Sonnet (New) is also able to achieve performance gains with the same configuration as 3.7 Sonnet, indicating that this improvement generalizes to other Claude models as well.