techlist.io

Anthropic/Llm Evaluation

7 posts

Anthropic2026-11-064 min readCurated summary

The components of agent memory

# Dreaming: How Claude Builds and Maintains Agent Memory Anthropic's post argues that agent memory works best when split into two processes, like the human brain's division between fast encoding and offline consolidation. Claude captures salient events during work, and a separate "dreaming" phase later replays logs, corrects mistakes, and reorganizes memory into representations that future sessions can use. The authors report that dreaming improves memory accuracy, that stronger models judge what is worth saving better when given freedom rather than fixed rules, and that the value of structures like wikis depends on the task. ### Memory as Prediction - Agent memory is defined as knowledge Claude gains from experience and retains across sessions, excluding weight updates, in-context learning, and compaction. - Writing a memory note is a prediction that the pattern will be relevant later. - On the CL-Bench 1.0 database task, models differed in how well they closed a learning loop: recording failures, testing theories, and turning results into rules. Sonnet 4.6 only generated untested guesses, while Opus 5 was the first to consistently write validated rules, answers, and warnings about traps. Opus 5.5 and Sonnet 5.5 also closed the loop, scoring about the same as Opus 5 with memory. ### Judging Salience - In a Pokémon Red evaluation, Sonnet 3.7 wrote 413 memory files across 225 folders, earned one badge, and wasted steps reorganizing outdated records. - Fable 5 wrote nine files in two folders plus a single `global.md` dashboard, and earned four badges. - The better approach stored information that couldn't be read from the screen, such as strategy, plans, and tested rules. One example was a note that varying the timing of inputs helped catch a Magikarp after repeated failures. ### Steering Memory Writes - Telling Claude what memory is for works better than prescribing how to use it. General guidance was enough for Opus 4.7 and Opus 5 to gain a noticeable performance boost. - Fixed rules such as "record only failures" removed much of the benefit for stronger models. - Older models benefit more from steering. Prompting Sonnet 4.6 to read memory and explicitly test its theories nearly doubled its benchmark score. Sonnet 5 reads memory on its own in 9 of 10 cases, compared with fewer than half for Sonnet 4.6. ### Correcting Memory Through Dreaming - Because notes are written from in-session judgment, errors can persist and be trusted later. - In a Mt. Moon navigation case, Claude recorded the Pokémon Center's location incorrectly, leading it to walk off a one-way ledge three times. Dreaming checked the note against the transcript, fixed it, and let Claude reach Cerulean City. The uncorrected run never got there. ### Building New Representations - Wikis are linked collections of pages Claude writes about a subject, acting as a navigable map of its memory. - On a 350,000-file internal corpus, 128 dreaming sessions raised accuracy on 25 questions from 13% to 48%. - Wiki plus search reached 61%, compared with 53% for search alone and 48% for the wiki alone, while saving about 20,000 tokens per question. - On merger questions requiring multi-document reasoning, the wiki raised scores from 73% to 87%. For tasks where a single-document text search was enough, the wiki gave no clear gain. In one case the wiki grew larger than the source documents and abstracted nothing. ### Promoting Notes and Focusing Goals - Dreaming can promote important notes to a small top layer that is loaded into every session. That layer must stay compact, since injected memories consume tokens and incorrect notes propagate. Claude Code's `MEMORY.md` loads only its first 200 lines or 25 KB for this reason. - Instructions for dreaming can be tuned to a task. In a contract-analysis benchmark, concurrent agents overwrote a shared table and the brief covered only 72% of facts. After the instructions were revised to give each contract its own page with verbatim terms, all criteria could be met. - Dreaming across sessions can also fill gaps. A second pass resolved nine broken links and added three pages, including an index. ### Open Questions - When to write memory is a tradeoff. Writing in the moment captures salience at the source but distracts from the task, while dreaming moves the work to the background but may not be immediately accessible. - Keeping memory current requires compute. The authors suggest focusing dreaming on information likely to change, or tuning its cadence based on access frequency. - Transcript search may serve as a foundation, with representations layered on top, but maintaining those representations requires ongoing effort to prevent errors from accumulating. The authors conclude that dreaming lets Claude look backward, organize memory, and correct mistakes, while acknowledging that much about memory system design remains to be learned.

Anthropic2026-02-054 min readCurated summary

Infrastructure noise in agentic coding evals

Agentic coding benchmarks such as Terminal-Bench 2.0 are sensitive to the infrastructure they run on, not just to model capability. In the authors' experiments, resource configuration alone produced a 6-percentage-point gap between the most- and least-resourced setups (p < 0.01), which is larger than the gaps that often separate top leaderboard entries. They argue that resource allocation should be treated as a controlled experimental variable, and that small leaderboard differences deserve skepticism unless the evaluation setup is documented and matched. ## Why Agentic Evals Depend on Their Runtime - Static benchmarks score only the model's output, but agentic evals give the model a full environment to write code, install dependencies, run tests, and iterate, so the runtime becomes part of the problem-solving process. - Terminal-Bench 2.0 publishes recommended CPU and RAM per task, but specifying resources is not the same as enforcing them consistently. ## Enforcement Mismatch in Kubernetes - The authors ran Terminal-Bench 2.0 on Google Kubernetes Engine and found their scores didn't match the official leaderboard. Up to 6% of tasks failed from pod errors, mostly unrelated to the model's ability. - Their setup treated the per-task specs as both a guaranteed allocation and a hard kill limit, leaving zero headroom. A momentary memory spike could OOM-kill a container that would otherwise have succeeded. - The official leaderboard uses a more lenient sandboxing provider that permits temporary overallocation, which favors infrastructure stability. ## Effects of Resource Headroom - The authors tested six configurations, from strict enforcement of the per-task specs (1x) to uncapped, holding the model, harness, and task set constant. - Infra error rates fell monotonically, from 5.8% at 1x to 0.5% when uncapped. The drop from 1x to 3x (5.8% to 2.1%) was significant at p < 0.001. - From 1x to 3x, success rates varied within noise (p = 0.40). Most tasks that crashed at 1x would have failed regardless. - Beyond roughly 3x, success rises faster than infra errors fall. Extra resources let agents try approaches that need generous allocations, like pulling large dependencies or running memory-heavy test suites. Uncapped, the total lift over 1x was +6 percentage points (p < 0.01). - Tasks such as rstan-to-pystan and compile-compcert improved noticeably with more memory. ## How Resource Limits Change What Is Measured - Up to about 3x, extra resources mainly fix infrastructure reliability. Above that, they change the capability being tested. - Tight limits reward lean, efficient strategies, while generous limits reward agents that can brute-force solutions with heavyweight tools. Both are legitimate, but a single score without a stated configuration obscures the difference. - On bn-fit-modify, installing the standard data science stack (pandas, networkx, scikit-learn) runs out of memory under tight limits. A leaner from-scratch implementation succeeds, but models differ in which approach they default to. - The authors replicated the core effect across several Anthropic models. The direction was consistent, though the magnitude varied. They haven't rigorously tested non-Claude models. - On SWE-bench, a crossover experiment across 227 problems with 10 samples each, scaling RAM up to 5x produced a monotonic increase, but only 1.54 points, a smaller effect because those tasks are less resource-intensive. ## Other Sources of Variance - Time limits can also affect results under certain configurations. - Cluster health, hardware specs, concurrency, and even egress bandwidth can all act as confounders. - Pass rates appeared to fluctuate with time of day, likely due to API latency under varying traffic, though this hasn't been formally measured. - Running evaluations across multiple times and days would help average out this noise. ## Recommendations - Ideally, run each eval on identical hardware for both the scaffold and the inference stack, though this isn't always practical. - Specify two parameters per task: a guaranteed allocation and a separate hard kill threshold, rather than a single pinned value. - Calibrate the band between them so that floor and ceiling scores fall within noise of each other. In Terminal-Bench 2.0, a 3x ceiling cut infra errors by about two-thirds while keeping the score lift within noise (p = 0.40). - Report the chosen multiplier, since the ideal value will vary by benchmark and task distribution. ## Implications for Labs, Maintainers, and Readers - Labs should document and control resource configuration with the same rigor applied to prompt format or sampling temperature. - Benchmark maintainers should publish recommended specs and specify their enforcement methodology. - Readers should be skeptical of leaderboard differences below 3 percentage points until configurations are documented and matched. The spread across moderate resource configurations in Terminal-Bench was just under 2 points, binomial confidence intervals already span 1 to 2 points, and the extremes reached 6 points. A few-point lead might signal a real capability gap, or it might just be a bigger VM.

Anthropic2026-01-099 min readCurated summary

Demystifying evals for AI agents

Evals, meaning automated tests that run an input through an agent and grade the output, let teams ship AI agents with confidence. Without them, teams get stuck in reactive loops, catching problems only in production, where fixing one failure often creates another. Because agents act autonomously over many turns, they are harder to evaluate than single-turn models. The authors share practices from internal work and customer deployments, arguing that evals should be a core part of agent development and that their value compounds over the agent's lifecycle. ## Anatomy of an Evaluation - An eval gives an AI system an input and applies grading logic to its output. The post focuses on automated evals that run during development without real users. - Core terms: - **Task:** a single test with defined inputs and success criteria. - **Trial:** one attempt at a task. Multiple trials account for output variability. - **Grader:** logic that scores one aspect of performance. A task can have several graders, each with multiple assertions. - **Transcript:** the full record of a trial, including tool calls, reasoning, and intermediate results. - **Outcome:** the final environment state. A flight-booking agent may say "Your flight has been booked," but the real outcome is whether a reservation exists in the database. - **Harness:** the infrastructure that runs evals end to end. The agent harness is the system that lets a model act as an agent, and evaluating an agent means evaluating the harness and model together. - Frontier models can exceed the limits of static evals. Opus 4.5 solved a τ2-bench flight-booking task by finding a policy loophole that produced a better outcome for the user, though it "failed" the eval as written. ## Why Build Evals Early - Teams can get far with manual testing and intuition, but the breaking point comes when users say the agent feels worse and the team has no way to verify changes beyond guess-and-check. - Without evals, teams can't separate real regressions from noise, test changes against hundreds of scenarios before shipping, or measure improvements. - Claude Code began with fast iteration on feedback, then added evals for concision, file edits, and over-engineering. Combined with monitoring and A/B tests, these evals guided improvements. - Descript evolved from manual grading to LLM graders calibrated by humans, and now runs separate quality and regression suites. The Bolt team built an eval system within three months of launch, using static analysis, browser agents, and LLM judges. - Evals resolve ambiguity in specs, since two engineers can read the same spec and interpret edge cases differently. - Evals speed up adoption of new models. Teams with evals can test a new model in days rather than weeks. - Evals provide baselines and regression tests for latency, token usage, cost per task, and error rates, and they give product and research teams a shared set of metrics. ## Grading Agents **Grader types** - **Code-based** (string matching, binary tests, static analysis, tool-call and transcript checks): fast, cheap, objective, and reproducible, but brittle and limited for nuanced or subjective tasks. - **Model-based** (rubric scoring, natural-language assertions, pairwise comparison, reference-based evaluation, multi-judge consensus): flexible, scalable, and good for open-ended output, but non-deterministic, more expensive, and in need of human calibration. - **Human** (SME review, spot-checks, A/B testing, inter-annotator agreement): the gold standard and the calibration source for model graders, but expensive and slow. - Scoring can be weighted (combined scores must clear a threshold), binary (all graders must pass), or hybrid. **Capability vs. regression evals** - Capability evals start at low pass rates and give teams something to climb toward. - Regression evals should stay near 100% and protect against backsliding. - Once a capability eval reaches a high pass rate, it can "graduate" into a regression suite that runs continuously. **Coding agents** - Deterministic graders work well: does the code run, and do the tests pass? SWE-bench Verified and Terminal-Bench use this approach. LLM performance on SWE-bench Verified rose from about 40% to over 80% in a year. - Transcripts can be graded too, for code quality heuristics and tool-use behavior. - The post's example for an authentication-bypass fix combines unit tests, an LLM rubric for code quality, static analysis (ruff, mypy, bandit), state checks on security logs, required tool calls, and metrics such as turns, tool calls, tokens, and latency. **Conversational agents** - Success is multidimensional: ticket resolved (state check), finished in under 10 turns (transcript constraint), and appropriate tone (LLM rubric). - A second LLM often simulates the user. τ-Bench and τ2-Bench use this approach across retail and airline scenarios, and Anthropic uses it in alignment auditing. **Research agents** - Quality depends on context, so there is no simple pass/fail. Graders can check groundedness (claims supported by sources), coverage (key facts included), and source quality (authoritative sources, not just the first retrieved). - Exact match works for objective questions. LLM-based rubrics need frequent calibration against expert judgment. - BrowseComp tests whether agents can find hard-to-locate information on the open web. **Computer use agents** - These agents operate through screenshots, clicks, and keyboard input. WebArena and OSWorld check outcomes through URL and page state, backend database state, file system state, and app configs. - DOM-based interaction is fast but token-heavy, while screenshots are slower but more token-efficient. Summarizing Wikipedia works better with DOM extraction, while shopping for a product works better with screenshots. Claude for Chrome uses evals to check that the agent picks the right approach for each context. ## Handling Non-Determinism - Each task has its own success rate, and results vary across runs. - **pass@k** measures the chance of at least one success in k attempts. It suits tools where one good result is enough. pass@1 matters most for coding. - **pass^k** measures the chance that all k trials succeed. It suits customer-facing agents that need consistency. An agent with a 75% per-trial success rate passes three consecutive trials only about 42% of the time. ## A Roadmap to Trustworthy Evals **Collecting tasks** - Start early with 20–50 simple tasks drawn from real failures. Early changes have large effects, so small samples are enough. Waiting too long makes it harder to reconstruct success criteria. - Begin with manual pre-release checks and common user tasks. In production, convert bug reports and support tickets into test cases, prioritized by user impact. - Write unambiguous tasks. Two domain experts should reach the same pass/fail verdict. Each task should come with a reference solution that proves it is solvable. A 0% pass rate across many trials usually signals a broken task, not an incapable agent. - Build balanced problem sets. Testing only when the agent should act produces over-triggering. For Claude.ai web search, the team tested both when to search and when to answer from knowledge, and refined the balance over many rounds. **Designing the harness and graders** - Keep the eval agent close to the production agent. Start each trial from a clean, isolated environment. In one case, Claude gained an unfair advantage by reading git history from earlier trials, and shared resource limits can cause correlated failures. - Grade what the agent produced, not the exact steps it took. Rigid sequence checks punish valid creative solutions. - Give partial credit for multi-step tasks, since identifying a problem and verifying a customer is better than failing immediately. - Calibrate LLM judges against human experts. Give them an "Unknown" option to reduce hallucinations, and grade each dimension with a separate judge. - Watch for grading bugs. Opus 4.5 initially scored 42% on CORE-Bench because the grader rejected "96.12" against an expected "96.124991…" and the task specs were ambiguous. After fixes, it scored 95%. METR found time-horizon tasks that penalized models for following instructions. - Make graders resistant to hacks, so passing requires actually solving the problem. **Maintaining evals** - Read transcripts regularly. They reveal whether a failure reflects a real agent mistake or a grader that rejected a valid solution. - Watch for saturation. A suite at 100% only catches regressions. SWE-bench Verified approaching 80%+ means gains now show up as small score increases, which can be misleading. Qodo initially underrated Opus 4.5 because their evals missed longer, more complex tasks, so they built a new agentic framework. - Don't trust scores until someone has read the transcripts. Revise evals that grade unfairly, use ambiguous tasks, penalize valid solutions, or constrain the model. - Assign ownership. Dedicated eval teams can own the infrastructure, while domain experts and product teams contribute tasks. PMs and salespeople can contribute eval tasks via Claude Code PRs. - Practice eval-driven development. Define capabilities as evals before the agent can meet them, then iterate until it does. ## Combining Evals with Other Signals Automated evals complement production monitoring, A/B testing, user feedback, manual transcript review, and systematic human studies. Each has trade-offs. Automated evals are fast and reproducible but can create false confidence if they don't match real usage. Production monitoring reveals real behavior but is reactive. A/B testing measures real outcomes but is slow. User feedback is sparse and skewed toward severe issues. Manual review builds intuition but doesn't scale. Human studies provide gold-standard judgments but are expensive. Automated evals suit pre-launch and CI/CD, monitoring suits post-launch, A/B testing suits high-traffic changes, and human reviews calibrate model graders. ## Evaluation Frameworks Open-source and commercial options include Harbor for containerized agent trials, Braintrust for offline evals and production observability, LangSmith and Langfuse for tracing and evals, and Arize Phoenix and AX for LLM observability. The authors advise picking a framework quickly and spending the effort on high-quality test cases and graders. ## Conclusion Teams without evals get stuck fixing one failure after another, while teams that invest early find that failures become test cases, test cases prevent regressions, and metrics replace guesswork. The practical advice is to start early with realistic tasks drawn from real failures, define unambiguous success criteria, combine grader types, keep tasks challenging, iterate on the evals themselves, and always read the transcripts. The field is still young, and the authors expect to adapt these techniques as agents take on longer tasks, multi-agent systems, and more subjective work.

Anthropic2025-09-114 min readCurated summary

Writing effective tools for AI agents

# Designing Tools for AI Agents Tools for agents are a different kind of software: they form a contract between deterministic systems and non-deterministic agents, so they must be designed for how agents perceive and act, not simply wrapped around existing functions or APIs. The post argues that effective tools come from an evaluation-driven loop: build a quick prototype, measure it against realistic multi-step tasks, analyze agent transcripts, and iterate, often with agents like Claude Code doing the refactoring themselves. ## Building and Evaluating Tools - Prototype quickly by wrapping tools in a local MCP server or Desktop extension, connecting them to Claude Code (`claude mcp add`) or Claude Desktop, or passing them directly into API calls. - Provide LLM-friendly documentation (such as `llms.txt` files) to Claude when it helps write the tools. - Generate evaluation tasks grounded in realistic data and services, avoiding simplistic sandboxes. Strong tasks often require dozens of tool calls, while weak ones are single lookups. - Pair each task with a verifiable outcome, using exact matching or an LLM judge, and avoid verifiers that reject correct answers over formatting differences. - Run evaluations programmatically with simple agentic loops, one per task, and ask agents to output reasoning and feedback before their responses to encourage chain-of-thought behavior. - Track accuracy alongside runtime, total tool calls, token consumption, and tool errors. Frequent redundant calls can suggest consolidation opportunities. - Analyze transcripts for confusion, not just final answers, since agents often omit what matters most. Use held-out test sets to avoid overfitting. ## Choosing the Right Tools - Avoid tools that merely mirror API endpoints. Agents have limited context, so a `list_contacts` tool that dumps everything wastes it, while `search_contacts` returns only what's relevant. - Consolidate multi-step workflows into single tools, such as `schedule_event` instead of separate list and create calls, `search_logs` instead of `read_logs`, or `get_customer_context` instead of three separate lookups. - Give each tool a clear, distinct purpose, since overlapping tools distract agents from efficient strategies. ## Namespacing and Response Design - Group related tools under prefixes by service and resource (e.g., `asana_projects_search`) so agents can select the right tool. Prefix versus suffix choice affects results and should be tested per model. - Return high-signal fields like `name` or `file_type` rather than low-level identifiers like `uuid` or `mime_type`. Resolving UUIDs to human-readable identifiers reduced hallucinations in retrieval tasks. - Add a `response_format` enum (e.g., `concise` or `detailed`) so agents can choose between readable names and technical IDs needed for downstream calls. The post's example shows a 206-token detailed response versus a 72-token concise one. - Response structure (XML, JSON, Markdown) also affects performance, and the best choice varies by task and model. ## Token Efficiency and Error Handling - Use pagination, range selection, filtering, and truncation with sensible defaults. Claude Code caps tool responses at 25,000 tokens by default. - When truncating, guide agents toward efficient strategies, such as many small targeted searches instead of one broad search. - Write error messages that state specific, actionable fixes rather than opaque codes or tracebacks. ## Prompt-Engineering Tool Descriptions - Write descriptions as if onboarding a new hire, making implicit context explicit: query formats, niche terminology, and resource relationships. - Use unambiguous parameter names (`user_id` rather than `user`) and enforce inputs and outputs with strict data models. - Small description refinements can yield large gains. The post reports that precise description changes helped Claude Sonnet 3.5 reach state-of-the-art on SWE-bench Verified. - Tool annotations can disclose whether a tool needs open-world access or makes destructive changes. ## Conclusion Effective agent tools are clearly defined, use context judiciously, combine well across workflows, and let agents solve real tasks intuitively. Because the mechanisms agents use will keep evolving, a systematic, evaluation-driven process is the most reliable way to keep tools improving alongside the models that use them.

Anthropic2025-06-135 min readCurated summary

How we built our multi-agent research system

Anthropic's engineering team describes how they built the multi-agent Research feature for Claude, where a lead agent plans a query and spawns parallel subagents that search simultaneously. Their internal evaluation found the multi-agent setup (Claude Opus 4 lead, Sonnet 4 subagents) outperformed a single Opus 4 agent by 90.2%, mainly because it spends more tokens on hard, parallelizable problems. The post argues that this gain comes with roughly 15× the token cost of chat, so it only suits high-value, breadth-first tasks. Moving these systems to production, they add, is much harder than building a prototype. ## Why Multi-Agent Systems Help Research - Research is open-ended and path-dependent, so the steps can't be hardcoded in advance, and a linear pipeline can't handle it. - Subagents compress information by working in parallel, each with its own context window, and returning only the most important findings to the lead agent. - Token usage explained about 80% of performance variance on the BrowseComp evaluation, with tool calls and model choice explaining most of the rest, so distributing work across agents adds reasoning capacity. - Agents use about 4× the tokens of chat, and multi-agent systems about 15×, so they fit only tasks valuable enough to justify the cost. - Coding tasks, which have fewer parallelizable subtasks and need shared context, are a poor fit today. ## Architecture: Orchestrator-Worker Pattern - The lead agent analyzes the query, develops a strategy, and spawns subagents that iteratively search and return condensed results. - Unlike static RAG, which fetches chunks similar to the query once, this design runs multi-step searches that adapt to new findings. ## Prompt Engineering Principles - **Simulate the agents:** Running the exact prompts and tools step by step revealed failure modes such as agents continuing after they already had enough results, using overly verbose queries, or picking the wrong tools. - **Delegate with detail:** Vague instructions caused duplicated work and gaps. Each subagent needs an objective, an output format, tool guidance, and clear task boundaries. - **Scale effort to complexity:** Simple fact-finding uses 1 agent with 3–10 tool calls, comparisons use 2–4 subagents with 10–15 calls each, and complex research uses more than 10 subagents. Without these rules, early versions overinvested in simple queries. - **Design tools deliberately:** Each tool needs a distinct purpose and clear description, and agents should examine available tools first and match tool choice to user intent. - **Let Claude improve its own tools:** A tool-testing agent that rewrote flawed MCP tool descriptions reduced task completion time by 40%. - **Start wide, then narrow:** Agents should begin with short, broad queries and refine from there, instead of starting with long, specific ones. - **Use extended thinking as a scratchpad:** The lead agent plans and sets subagent roles, and subagents evaluate tool results with interleaved thinking. - **Parallelize:** The lead agent spins up 3–5 subagents in parallel, and subagents use 3+ tools in parallel, cutting research time by up to 90% on complex queries. ## Evaluating Multi-Agent Systems - Agents can reach the same correct answer by different valid paths, so evaluations should judge outcomes and reasonable process rather than fixed steps. - Start with about 20 representative queries. Early changes have large effects, so small samples reveal them. - An LLM judge using a single prompt that outputs 0.0–1.0 scores and a pass/fail grade agreed best with human judgment. It scores factual accuracy, citation accuracy, completeness, source quality, and tool efficiency. - Human testing caught problems automation missed, such as early agents favoring SEO-optimized content farms over authoritative academic PDFs or personal blogs. Adding source-quality heuristics fixed this. ## Production Reliability Challenges - **Stateful errors compound:** Agents run for long periods, so the system checkpoints and resumes from the failure point rather than restarting, combining model adaptability with retry logic. - **Debugging is hard:** Because agents are non-deterministic, the team added full production tracing and monitors decision patterns, without reading individual conversation contents, to protect privacy. - **Deployment is delicate:** Agents may be mid-process during updates, so rainbow deployments gradually shift traffic between old and new versions while both run. - **Synchronous execution is a bottleneck:** Lead agents wait for each subagent batch to finish and can't steer subagents mid-task. Asynchronous execution would add parallelism but complicates result coordination, state consistency, and error propagation. ## Conclusion The authors conclude that multi-agent research systems can run reliably at scale, but only with careful engineering, extensive testing, detailed prompt and tool design, and close collaboration across research, product, and engineering. Users reported finding business opportunities, navigating healthcare options, fixing technical bugs, and saving days of research work. ## Appendix Tips - **End-state evaluation:** For agents that change persistent state, judge whether the final state is correct, using checkpoints for complex workflows. - **Long-horizon memory:** Agents summarize completed phases, store essential information externally, and hand off to fresh subagents when context limits approach. - **Filesystem artifacts:** Subagents store outputs such as code, reports, or data visualizations in external systems and pass lightweight references to the coordinator, which avoids information loss and reduces token overhead.

Anthropic2025-03-203 min readCurated summary

The "think" tool for complex tool use

# The "Think" Tool for Claude Agents Anthropic found that giving Claude a dedicated "think" tool, a scratchpad it can write to mid-response, improves agentic tool use. The tool helps with following policies, making consistent decisions, and handling multi-step problems, and it requires little implementation effort. The post notes that extended thinking now covers most of these cases, so the dedicated tool is recommended mainly for specific scenarios. The benefits come from giving Claude room to reason about new information gathered from tool outputs, not from extended reasoning before it acts. ## How the "Think" Tool Differs from Extended Thinking - Extended thinking happens before Claude generates a response and plans its approach in advance. - The "think" tool happens during response generation, letting Claude pause after receiving tool results to check whether it has what it needs to continue. - The tool suits complex tool calls, long tool-call chains, policy-heavy environments, and sequential decisions where mistakes are costly. - Extended thinking suits simpler tool use, non-sequential calls, and tasks like coding, math, and physics that don't involve tools. - The tool is defined with a single `thought` string input. It doesn't obtain new information or change any state. It only logs the thought. ## Results on τ-Bench τ-bench simulates customer service conversations and measures pass^k, the probability that all k trials of a task succeed, which captures consistency. - **Airline domain (the hardest):** The "think" tool with an optimized prompt reached 0.570 pass^1, versus 0.370 for the baseline, a 54% relative improvement. The prompt included worked examples of how to reason about policies. The tool alone and extended thinking performed similarly, both better than baseline but well behind the combined approach. - **Retail domain (easier):** The "think" tool alone reached 0.812 pass^1, versus 0.783 for the baseline, with no extra prompting needed. - Gains held up across k=1 to k=5, which points to better handling of edge cases and more consistent policy adherence. ## Results on SWE-Bench - A "think" tool with a description tailored to software debugging was added to the SWE-bench setup for Claude 3.7 Sonnet, which contributed to a state-of-the-art score of 0.623. - The isolated effect was a 1.6% average improvement, statistically significant (Welch's t-test, p < .001). ## Implementation Guidance - **Use it for:** tool output analysis that may require backtracking, policy-heavy environments requiring compliance checks, and sequential decisions where each step depends on the last. - **Skip it for:** single or parallel tool calls, and simple instruction following where default behavior is already adequate. - **Prompting:** Domain-specific examples help the most on difficult tasks. Examples cover the expected level of detail, how to break instructions into steps, decision trees, and checks for missing information. - **Placement:** For long or complex guidance, put instructions in the system prompt rather than the tool description. - **Costs and risks:** The tool adds prompt length and output tokens. It doesn't change external behavior unless Claude calls it, so it's low-risk to add. The post concludes that the "think" tool is not a universal fix, but for the right workloads it offers meaningful reliability gains with minimal implementation work. The authors also note that the results generalize to Claude 3.5 Sonnet (New).

Anthropic2025-01-064 min readCurated summary

Claude SWE-Bench performance

The upgraded Claude 3.5 Sonnet scored 49% on SWE-bench Verified, beating the previous state-of-the-art of 45%. The authors achieved this with a deliberately minimal agent: one prompt and two general-purpose tools, with as much control as possible left to the model. They argue that tool design and scaffolding matter as much as the model itself, since SWE-bench measures the whole agent rather than the model alone. ## Measuring Agents with SWE-bench - SWE-bench tests whether a model can resolve real GitHub issues from popular open-source Python repositories. The model receives a configured environment and a checkout of the repository from just before the fix, then must understand, modify, and test the code. - Solutions are graded against the unit tests from the pull request that originally closed the issue. - The benchmark is attractive for several reasons: it uses real engineering tasks rather than competition-style questions, it is not saturated (no model had crossed 50% on SWE-bench Verified), and it evaluates a full agent, so open-source developers can improve scores by optimizing scaffolding around the same model. - The authors use SWE-bench Verified, a 500-task subset that humans reviewed to remove tasks that cannot be solved from the issue text alone, such as those requiring specific error messages not stated in the issue. ## A Minimal Tool-Using Agent - The agent consists of a prompt, a Bash tool for running shell commands, and an edit tool for viewing, creating, and editing files and directories. - The model is sampled repeatedly until it decides it is finished or exceeds its 200k-token context window. There are no hardcoded workflow stages. - The prompt suggests an approach (explore the repo, write a reproduction script, edit the source, rerun, consider edge cases) without being overly long or prescriptive. The authors note that explicitly encouraging long responses can help when token cost is not a concern. ## Tool Design and Error-Proofing - Tool descriptions were tested and revised to预empt misunderstandings. For example, the Bash tool description specifies that commands need not be XML-escaped, that there is no internet access, and how to run long-lived commands in the background. - The edit tool requires absolute paths. This prevents errors when the agent has moved away from the repository root. - Of the edit strategies tested, exact string replacement was the most reliable. The model specifies `old_str` and `new_str`, and the replacement happens only if `old_str` matches exactly once. Otherwise, the model receives an error and can retry. - The edit tool also supports `view` (with optional line ranges), `create`, `insert`, and `undo_edit`. ## Results | Model | SWE-bench Verified | |---|---| | Claude 3.5 Sonnet (new) | 49% | | Previous SOTA | 45% | | Claude 3.5 Sonnet (old) | 33% | | Claude 3 Opus | 22% | - All models were run with the same agent scaffold. - Compared with older models, the upgraded Claude 3.5 Sonnet self-corrects more often and tries several different solutions instead of repeating the same mistake. ## Example Agent Trajectory - The example is a scikit-learn issue in which `RidgeClassifierCV` rejects a `store_cv_values` argument, even though its attributes depend on that parameter. - The model first viewed the repository structure, then wrote and ran a script that reproduced the `TypeError`. - It then identified that the subclass constructor did not forward `store_cv_values` to the base class, edited the constructor to accept and pass the parameter, and reran the script. - The task was solved in 12 steps. Other tasks took over 100 turns, and some runs ran out of context. ## Challenges in Running SWE-bench - **Cost and duration:** Successful runs sometimes took hundreds of turns and more than 100k tokens. The model is persistent, which is effective but expensive. - **Grading errors:** Some apparent failures were caused by environment setup issues or install patches applied twice, not by the model. - **Hidden tests:** The model cannot see the grading tests, so it may believe it succeeded when it has not. Some solutions were applied at the wrong level of abstraction, such as a bandage rather than a deeper refactor. Others were correct but did not match the original unit tests. - **Multimodal limits:** The agent could not view image files saved to disk or referenced by URL, which made Matplotlib tasks especially hard and led to hallucinations. The authors identify this as an opportunity for improvement. The post closes by noting that developers building with the upgraded model will likely find better ways to improve SWE-bench scores than those demonstrated here.