Engineering at Anthropic

Demystifying evals for AI agents揭秘 AI 智能体评估

Introduction引言

Good evaluations help teams ship AI agents more confidently. Without them, it’s easy to get stuck in reactive loops—catching issues only in production, where fixing one failure creates others. Evals make problems and behavioral changes visible before they affect users, and their value compounds over the lifecycle of an agent.良好的评估有助于团队更自信地交付 AI 智能体。如果没有评估,团队很容易陷入被动循环——仅在生产环境中发现问题,而修复一个故障往往会引发其他问题。评估能在问题影响用户之前使其显现,且其价值会随着智能体的生命周期不断累积。

As we described in Building effective agents, agents operate over many turns: calling tools, modifying state, and adapting based on intermediate results. These same capabilities that make AI agents useful—autonomy, intelligence, and flexibility—also make them harder to evaluate.正如我们在《构建有效的智能体》中所述,智能体在多轮交互中运行:调用工具、修改状态并根据中间结果进行调整。正是这些使 AI 智能体变得有用的能力——自主性、智能和灵活性——也使其更难被评估。

Through our internal work and with customers at the frontier of agent development, we’ve learned how to design more rigorous and useful evals for agents. Here's what's worked across a range of agent architectures and use cases in real-world deployment.通过我们的内部工作以及与处于智能体开发前沿的客户合作,我们学会了如何为智能体设计更严谨、更有用的评估方法。以下是在实际部署中,适用于各种智能体架构和用例的经验总结。

The structure of an evaluation评估的结构

An evaluation (“eval”) is a test for an AI system: give an AI an input, then apply grading logic to its output to measure success. In this post, we focus on automated evals that can be run during development without real users.评估(“eval”)是对 AI 系统的测试:为 AI 提供输入,然后对其输出应用评分逻辑以衡量成功与否。在本文中,我们重点讨论可以在开发过程中无需真实用户参与即可运行的自动化评估。

Single-turn evaluations are straightforward: a prompt, a response, and grading logic. For earlier LLMs, single-turn, non-agentic evals were the main evaluation method. As AI capabilities have advanced, multi-turn evaluations have become increasingly common.单轮评估非常直观:一个提示词、一个响应和评分逻辑。对于早期的 LLM,单轮、非智能体式的评估是主要的评估方法。随着 AI 能力的提升,多轮评估变得越来越普遍。

In a simple eval, an agent processes a prompt, and a grader checks if the output matches expectations. For a more complex multi-turn eval, a coding agent receives tools, a task (building an MCP server in this case), and an environment, executes an "agent loop" (tool calls and reasoning), and updates the environment with the implementation. Grading then uses unit tests to verify the working MCP server.在简单的评估中,智能体处理一个提示词,评估器检查输出是否符合预期。对于更复杂的多轮评估,编码智能体会接收工具、任务(本例中为构建 MCP 服务器)和环境,执行“智能体循环”(工具调用和推理),并利用实现结果更新环境。随后,评分过程使用单元测试来验证该 MCP 服务器是否正常工作。

Agent evaluations are even more complex. Agents use tools across many turns, modifying state in the environment and adapting as they go—which means mistakes can propagate and compound. Frontier models can also find creative solutions that surpass the limits of static evals. For instance, Opus 4.5 solved a 𝜏2-bench problem about booking a flight by discovering a loophole in the policy. It “failed” the evaluation as written, but actually came up with a better solution for the user.智能体评估更为复杂。智能体在多轮交互中使用工具,在环境中修改状态并实时调整——这意味着错误可能会传播并叠加。前沿模型还能找到超越静态评估限制的创造性解决方案。例如,Opus 4.5 在处理一个关于预订航班的 𝜏2-bench 问题时,发现了一个政策漏洞。它虽然在书面评估中“失败”了,但实际上为用户提供了一个更好的解决方案。

When building agent evaluations, we use the following definitions:在构建智能体评估时,我们使用以下定义:

  • A task (a.k.a problem or test case) is a single test with defined inputs and success criteria.任务(又称问题或测试用例)是具有定义好的输入和成功标准的单一测试。
  • Each attempt at a task is a trial. Because model outputs vary between runs, we run multiple trials to produce more consistent results.对任务的每次尝试称为一次试验(trial)。由于模型输出在不同运行之间存在差异,我们通过多次试验来产生更一致的结果。
  • A grader is logic that scores some aspect of the agent’s performance. A task can have multiple graders, each containing multiple assertions (sometimes called checks).评估器(grader)是用于对智能体性能的某些方面进行评分的逻辑。一个任务可以有多个评估器,每个评估器包含多个断言(有时称为检查)。
  • A transcript (also called a trace or trajectory) is the complete record of a trial, including outputs, tool calls, reasoning, intermediate results, and any other interactions. For the Anthropic API, this is the full messages array at the end of an eval run - containing all the calls to the API and all of the returned responses during the evaluation.记录(transcript,也称为追踪或轨迹)是试验的完整记录,包括输出、工具调用、推理、中间结果以及任何其他交互。对于 Anthropic API,这是评估运行结束时的完整消息数组,其中包含了评估期间对 API 的所有调用以及所有返回的响应。
  • The outcome is the final state in the environment at the end of the trial. A flight-booking agent might say “Your flight has been booked” at the end of the transcript, but the outcome is whether a reservation exists in the environment’s SQL database.结果(outcome)是试验结束时环境中的最终状态。航班预订智能体在记录结束时可能会说“您的航班已预订”,但结果取决于环境的 SQL 数据库中是否确实存在预订记录。
  • An evaluation harness is the infrastructure that runs evals end-to-end. It provides instructions and tools, runs tasks concurrently, records all the steps, grades outputs, and aggregates results.评估工具集(evaluation harness)是端到端运行评估的基础设施。它提供指令和工具,并发运行任务,记录所有步骤,对输出进行评分,并汇总结果。
  • An agent harness (or scaffold) is the system that enables a model to act as an agent: it processes inputs, orchestrates tool calls, and returns results. When we evaluate “an agent,” we’re evaluating the harness and the model working together. For example, Claude Code is a flexible agent harness, and we used its core primitives through the Agent SDK to build our long-running agent harness.智能体工具集(或脚手架,scaffold)是使模型能够作为智能体运行的系统:它处理输入、编排工具调用并返回结果。当我们评估“一个智能体”时,我们实际上是在评估工具集与模型协同工作的效果。例如,Claude Code 是一个灵活的智能体工具集,我们通过 Agent SDK 使用其核心原语构建了我们长期运行的智能体工具集。
  • An evaluation suite is a collection of tasks designed to measure specific capabilities or behaviors. Tasks in a suite typically share a broad goal. For instance, a customer support eval suite might test refunds, cancellations, and escalations.评估套件(evaluation suite)是旨在衡量特定能力或行为的任务集合。套件中的任务通常共享一个宏观目标。例如,客户支持评估套件可能会测试退款、取消订单和升级处理等场景。
Components of evaluations for agents.智能体评估的组成部分。

Why build evaluations?为什么要构建评估?

When teams first start building agents, they can get surprisingly far through a combination of manual testing, dogfooding, and intuition. More rigorous evaluation may even seem like overhead that slows down shipping. But after the early prototyping stages, once an agent is in production and has started scaling, building without evals starts to break down.当团队刚开始构建智能体时,通过手动测试、内部试用(dogfooding)和直觉结合,往往能取得相当大的进展。更严格的评估甚至可能看起来像是一种拖慢交付速度的额外开销。但在早期原型阶段之后,一旦智能体进入生产环境并开始扩展,缺乏评估的构建方式就会出现问题。

The breaking point often comes when users report the agent feels worse after changes, and the team is “flying blind” with no way to verify except to guess and check. Absent evals, debugging is reactive: wait for complaints, reproduce manually, fix the bug, and hope nothing else regressed. Teams can't distinguish real regressions from noise, automatically test changes against hundreds of scenarios before shipping, or measure improvements.崩溃点通常出现在用户反馈智能体在更新后表现变差时,此时团队只能“盲目飞行”,除了猜测和检查外别无验证方法。如果没有评估,调试就是被动的:等待投诉、手动重现、修复 Bug,并祈祷没有引入新的回归问题。团队无法区分真实的回归与噪声,无法在发布前针对数百种场景自动测试变更,也无法衡量改进效果。

We’ve seen this progression play out many times. For instance, Claude Code started with fast iteration based on feedback from Anthropic employees and external users. Later, we added evals—first for narrow areas like concision and file edits, and then for more complex behaviors like over-engineering. These evals helped identify issues, guide improvements, and focus research-product collaborations. Combined with production monitoring, A/B tests, user research, and more, evals provide signals to continue improving Claude Code as it scales.我们多次见证了这种发展历程。例如,Claude Code 最初基于 Anthropic 员工和外部用户的反馈进行快速迭代。后来,我们增加了评估——先是针对简洁性和文件编辑等狭窄领域,随后扩展到过度工程(over-engineering)等更复杂的行为。这些评估有助于识别问题、指导改进并促进研究与产品的合作。结合生产监控、A/B 测试、用户研究等,评估为 Claude Code 在扩展过程中持续改进提供了信号。

Writing evals is useful at any stage in the agent lifecycle. Early on, evals force product teams to specify what success means for the agent, while later they help uphold a consistent quality bar.编写评估在智能体生命周期的任何阶段都很有用。在早期,评估迫使产品团队明确智能体的成功标准;而在后期,它们有助于保持一致的质量基准。

Descript’s agent helps users edit videos, so they built evals around three dimensions of a successful editing workflow: don’t break things, do what I asked, and do it well. They evolved from manual grading to LLM graders with criteria defined by the product team and periodic human calibration, and now regularly run two separate suites for quality benchmarking and regression testing. The Bolt AI team started building evals later, after they already had a widely used agent. In 3 months, they built an eval system that runs their agent and grades outputs with static analysis, uses browser agents to test apps, and employs LLM judges for behaviors like instruction following.Descript 的智能体帮助用户编辑视频,因此他们围绕成功编辑工作流的三个维度构建了评估:不破坏现有功能、按要求执行、执行质量高。他们从手动评分演变为由产品团队定义标准并辅以定期人工校准的 LLM 评分,现在定期运行两套独立的套件进行质量基准测试和回归测试。Bolt AI 团队在智能体已被广泛使用后才开始构建评估。在 3 个月内,他们构建了一个评估系统,该系统运行其智能体并使用静态分析对输出进行评分,利用浏览器智能体测试应用,并聘请 LLM 裁判来评估指令遵循等行为。

Some teams create evals at the start of development; others add them once at scale when evals become a bottleneck for improving the agent. Evals are especially useful at the start of agent development to explicitly encode expected behavior. Two engineers reading the same initial spec could come away with different interpretations on how the AI should handle edge cases. An eval suite resolves this ambiguity. Regardless of when they’re created, evals help accelerate development.有些团队在开发之初就创建评估;另一些团队则在规模化时,当评估成为改进瓶颈时才加入。在智能体开发之初使用评估,对于显式编码预期行为特别有用。两名工程师阅读相同的初始规范,可能会对 AI 应如何处理边缘情况产生不同的理解。评估套件可以消除这种歧义。无论何时创建,评估都有助于加速开发。

Evals also shape how quickly you can adopt new models. When more powerful models come out, teams without evals face weeks of testing while competitors with evals can quickly determine the model’s strengths, tune their prompts, and upgrade in days. 评估还决定了你采用新模型的速度。当更强大的模型发布时,没有评估的团队面临数周的测试,而拥有评估的竞争对手可以迅速确定模型的优势、调整提示词,并在几天内完成升级。

Once evals exist, you get baselines and regression tests for free: latency, token usage, cost per task, and error rates can be tracked on a static bank of tasks. Evals can also become the highest-bandwidth communication channel between product and research teams, defining metrics researchers can optimize against. Clearly, evals have wide-ranging benefits beyond tracking regressions and improvements. Their compounding value is easy to miss given that costs are visible upfront while benefits accumulate later.一旦有了评估,你就可以免费获得基准线和回归测试:延迟、Token 使用量、单任务成本和错误率都可以在一组静态任务上进行跟踪。评估还可以成为产品团队与研究团队之间最高带宽的沟通渠道,定义研究人员可以据此优化的指标。显然,评估除了跟踪回归和改进之外,还有广泛的好处。由于成本是预先可见的,而收益是后期累积的,这种复合价值很容易被忽视。

How to evaluate AI agents 如何评估 AI 智能体

We see several common types of agents deployed at scale today, including coding agents, research agents, computer use agents, and conversational agents. Each type may be deployed across a wide variety of industries, but they can be evaluated using similar techniques. You don’t need to invent an evaluation from scratch. The sections below describe proven techniques for several agent types. Use these methods as a foundation, then extend them to your domain.我们看到目前大规模部署的几种常见智能体,包括编码智能体、研究智能体、计算机使用智能体和对话智能体。每种类型都可能部署在各种行业中,但可以使用类似的技术进行评估。你不需要从零开始发明评估方法。以下章节描述了针对几种智能体类型的成熟技术。将这些方法作为基础,然后将其扩展到你的领域。

Types of graders for agents智能体评估器的类型

Agent evaluations typically combine three types of graders: code-based, model-based, and human. Each grader evaluates some portion of either the transcript or the outcome. An essential component of effective evaluation design is to choose the right graders for the job.智能体评估通常结合三种类型的评估器:基于代码的、基于模型的和人工的。每种评估器都会评估记录或结果的某一部分。有效的评估设计的一个核心要素是为工作选择合适的评估器。

Code-based graders基于代码的评估器

MethodsStrengthsWeaknesses
• String match checks (exact, regex, fuzzy, etc.)
• Binary tests (fail-to-pass, pass-to-pass)
• Static analysis (lint, type, security)
• Outcome verification
• Tool calls verification (tools used, parameters)
• Transcript analysis (turns taken, token usage)
• Fast
• Cheap
• Objective
• Reproducible
• Easy to debug
• Verify specific conditions
• Brittle to valid variations that don’t match expected patterns exactly
• Lacking in nuance
• Limited for evaluating some more subjective tasks

Model-based graders基于模型的评估器

MethodsStrengthsWeaknesses
  • Rubric-based scoring
  • Natural language assertions
  • Pairwise comparison
  • Reference-based evaluation
  • Multi-judge consensus

  • Flexible
  • Scalable
  • Captures nuance
  • Handles open-ended tasks
  • Handles freeform output

  • Non-deterministic
  • More expensive than code
  • Requires calibration with human graders for accuracy

Human graders人工评估器

MethodsStrengthsWeaknesses
  • SME review
  • Crowdsourced judgment
  • Spot-check sampling
  • A/B testing
  • Inter-annotator agreement

  • Gold standard quality
  • Matches expert user judgment
  • Used to calibrate model-based graders

  • Expensive
  • Slow
  • Often requires access to human experts at scale

For each task, scoring can be weighted (combined grader scores must hit a threshold), binary (all graders must pass), or a hybrid.对于每个任务,评分可以是加权的(组合评估器分数必须达到阈值)、二元的(所有评估器必须通过)或混合的。

Capability vs. regression evals能力评估与回归评估

Capability or “quality” evals ask, “What can this agent do well?” They should start at a low pass rate, targeting tasks the agent struggles with and giving teams a hill to climb.能力或“质量”评估询问:“这个智能体能做好什么?”它们应该从较低的通过率开始,针对智能体表现吃力的任务,为团队设定提升目标。

Regression evals ask, “Does the agent still handle all the tasks it used to?” and should have a nearly 100% pass rate. They protect against backsliding, as a decline in score signals that something is broken and needs to be improved. As teams hill-climb on capability evals, it’s important to also run regression evals to make sure changes don’t cause issues elsewhere.回归评估询问:“智能体是否仍然能处理它过去处理的所有任务?”并且应该有接近 100% 的通过率。它们可以防止倒退,因为分数的下降表明某些功能已损坏,需要改进。当团队在能力评估上不断攀升时,同时运行回归评估以确保变更不会在其他地方引发问题非常重要。

After an agent is launched and optimized, capability evals with high pass rates can “graduate” to become a regression suite that is run continuously to catch any drift. Tasks that once measured “Can we do this at all?” then measure “Can we still do this reliably?”在智能体发布并优化后,通过率高的能力评估可以“毕业”成为回归套件,持续运行以捕捉任何性能漂移。那些曾经衡量“我们能否做到这一点”的任务,现在衡量的是“我们能否仍然可靠地做到这一点”。

Evaluating coding agents评估编码智能体

Coding agents write, test, and debug code, navigating codebases and running commands much like a human developer. Effective evals for modern coding agents usually rely on well-specified tasks, stable test environments, and thorough tests for the generated code.编码智能体像人类开发者一样编写、测试和调试代码,导航代码库并运行命令。现代编码智能体的有效评估通常依赖于定义明确的任务、稳定的测试环境以及对生成代码的全面测试。

Deterministic graders are natural for coding agents because software is generally straightforward to evaluate: does the code run and do the tests pass? Two widely used coding agent benchmarks, SWE-bench Verified and Terminal-Bench, follow this approach. SWE-bench Verified gives agents GitHub issues from popular Python repositories and grades solutions by running the test suite; a solution passes only if it fixes the failing tests without breaking existing ones. LLMs have progressed from 40% to >80% on this eval in just one year. Terminal-Bench takes a different track: it tests end-to-end technical tasks, such as building a Linux kernel from source or training an ML model.确定性评估器对于编码智能体来说很自然,因为软件通常很容易评估:代码能运行吗?测试通过了吗?两个广泛使用的编码智能体基准测试 SWE-bench Verified 和 Terminal-Bench 都遵循这种方法。SWE-bench Verified 为智能体提供来自流行 Python 仓库的 GitHub Issues,并通过运行测试套件来对解决方案进行评分;只有在修复失败测试且不破坏现有测试的情况下,解决方案才能通过。LLM 在此评估上的表现仅在一年内就从 40% 提升到了 80% 以上。Terminal-Bench 采取了不同的路径:它测试端到端的工程任务,例如从源码构建 Linux 内核或训练 ML 模型。

Once you have a set of pass-or-fail tests for validating the key outcomes of a coding task, it’s often useful to also grade the transcript. For instance, heuristics-based code quality rules can evaluate the generated code based on more than passing tests, and model-based graders with clear rubrics can assess behaviors like how the agent calls tools or interacts with the user.一旦你有了用于验证编码任务关键结果的通过/失败测试集,对记录进行评分通常也很有用。例如,基于启发式的代码质量规则可以在通过测试之外评估生成的代码,而具有明确准则的基于模型的评估器可以评估智能体如何调用工具或与用户交互等行为。

Example: Theoretical evaluation for a coding agent示例:编码智能体的理论评估

Consider a coding task where the agent must fix an authentication bypass vulnerability. As shown in the illustrative YAML file below, one could evaluate this agent using both graders and metrics. 考虑一个编码任务,智能体必须修复一个身份验证绕过漏洞。如下面的说明性 YAML 文件所示,可以使用评估器和指标来评估该智能体。

task:
  id: "fix-auth-bypass_1"
  desc: "Fix authentication bypass when password field is empty and ..."
  graders:
    - type: deterministic_tests
      required: [test_empty_pw_rejected.py, test_null_pw_rejected.py]
    - type: llm_rubric
      rubric: prompts/code_quality.md
    - type: static_analysis
      commands: [ruff, mypy, bandit]
    - type: state_check
      expect:
        security_logs: {event_type: "auth_blocked"}
    - type: tool_calls
      required:
        - {tool: read_file, params: {path: "src/auth/*"}}
        - {tool: edit_file}
        - {tool: run_tests}
  tracked_metrics:
    - type: transcript
      metrics:
        - n_turns
        - n_toolcalls
        - n_total_tokens
    - type: latency
      metrics:
        - time_to_first_token
        - output_tokens_per_sec
        - time_to_last_token

Note that this example showcases the full range of available graders for illustration. In practice, coding evaluations typically rely on unit tests for correctness verification and an LLM rubric for assessing overall code quality, with additional graders and metrics added only as needed.请注意,此示例展示了所有可用评估器的范围以供说明。在实践中,编码评估通常依赖单元测试来验证正确性,并使用 LLM 准则来评估整体代码质量,仅在需要时添加额外的评估器和指标。

Evaluating conversational agents评估对话智能体

Conversational agents interact with users in domains like support, sales, or coaching. Unlike traditional chatbots, they maintain state, use tools, and take actions mid-conversation. While coding and research agents can also involve many turns of interaction with the user, conversational agents present a distinct challenge: the quality of the interaction itself is part of what you're evaluating. Effective evals for conversational agents usually rely on verifiable end-state outcomes and rubrics that capture both task completion and interaction quality. Unlike most other evals, they often require a second LLM to simulate the user. We use this approach in our alignment auditing agents to stress-test models through extended, adversarial conversations.对话智能体在支持、销售或辅导等领域与用户交互。与传统聊天机器人不同,它们维护状态、使用工具并在对话过程中采取行动。虽然编码和研究智能体也可能涉及与用户的多轮交互,但对话智能体提出了一个独特的挑战:交互本身的质量也是你评估的一部分。对话智能体的有效评估通常依赖于可验证的最终状态结果,以及既能捕捉任务完成情况又能捕捉交互质量的准则。与其他大多数评估不同,它们通常需要第二个 LLM 来模拟用户。我们在对齐审计智能体中使用了这种方法,通过扩展的对抗性对话来压力测试模型。

Success for conversational agents can be multidimensional: is the ticket resolved (state check), did it finish in <10 turns (transcript constraint), and was the tone appropriate (LLM rubric)? Two benchmarks that incorporate multidimensionality are 𝜏-Bench and its successor, τ2-Bench. These simulate multi-turn interactions across domains like retail support and airline booking, where one model plays a user persona while the agent navigates realistic scenarios.对话智能体的成功可以是多维度的:工单是否已解决(状态检查)、是否在 10 轮内完成(记录约束)、语气是否恰当(LLM 准则)?包含多维度的两个基准测试是 𝜏-Bench 及其继任者 τ2-Bench。它们模拟了零售支持和机票预订等领域的跨多轮交互,其中一个模型扮演用户角色,而智能体则处理现实场景。


Example: Theoretical evaluation for a conversational agent
示例:对话智能体的理论评估

Consider a support task where the agent must handle a refund for a frustrated customer.考虑一个支持任务,智能体必须处理一位沮丧客户的退款请求。

graders:
  - type: llm_rubric
    rubric: prompts/support_quality.md
    assertions:
      - "Agent showed empathy for customer's frustration"
      - "Resolution was clearly explained"
      - "Agent's response grounded in fetch_policy tool results"
  - type: state_check
    expect:
      tickets: {status: resolved}
      refunds: {status: processed}
  - type: tool_calls
    required:
      - {tool: verify_identity}
      - {tool: process_refund, params: {amount: "<=100"}}
      - {tool: send_confirmation}
  - type: transcript
    max_turns: 10
tracked_metrics:
  - type: transcript
    metrics:
      - n_turns
      - n_toolcalls
      - n_total_tokens
  - type: latency
    metrics:
      - time_to_first_token
      - output_tokens_per_sec
      - time_to_last_token

As in our coding agent example, this task showcases multiple grader types for illustration. In practice, conversational agent evaluations typically use model-based graders to assess both communication quality and goal completion, because many tasks—like answering a question—may have multiple “correct” solutions.正如我们的编码智能体示例一样,此任务为了说明展示了多种评估器类型。在实践中,对话智能体评估通常使用基于模型的评估器来评估沟通质量和目标完成情况,因为许多任务(例如回答问题)可能有多种“正确”的解决方案。

Evaluating research agents评估研究智能体

Research agents gather, synthesize, and analyze information, then produce outputs like an answer or report. Unlike coding agents where unit tests provide binary pass/fail signals, research quality can only be judged relative to the task. What counts as “comprehensive,” “well-sourced,” or even “correct” depends on context: a market scan, due diligence for an acquisition, and a scientific report each require different standards.研究智能体收集、综合和分析信息,然后产生答案或报告等输出。与单元测试提供二元通过/失败信号的编码智能体不同,研究质量只能根据任务来判断。什么是“全面的”、“来源可靠的”甚至“正确的”,取决于上下文:市场扫描、收购尽职调查和科学报告各需要不同的标准。

Research evals face unique challenges: experts may disagree on whether a synthesis is comprehensive, ground truth shifts as reference content changes constantly, and longer, more open-ended outputs create more room for mistakes. A benchmark like BrowseComp, for example, tests whether AI agents can find needles in haystacks across the open web—questions designed to be easy to verify but hard to solve.研究评估面临独特的挑战:专家可能对综合是否全面存在分歧,随着参考内容不断变化,基本事实(ground truth)也会发生变化,且更长、更开放的输出留下了更多的犯错空间。例如,BrowseComp 等基准测试 AI 智能体是否能在开放网络中大海捞针——这些问题被设计为易于验证但难以解决。

One strategy to build research agent evals is to combine grader types. Groundedness checks verify that claims are supported by retrieved sources, coverage checks define key facts a good answer must include, and source quality checks confirm the consulted sources are authoritative, rather than simply the first retrieved. For tasks with objectively correct answers (“What was Company X’s Q3 revenue?”), exact match works. An LLM can flag unsupported claims and gaps in coverage but also verify the open-ended synthesis for coherence and completeness.构建研究智能体评估的一种策略是组合评估器类型。扎根性(groundedness)检查验证主张是否由检索到的来源支持,覆盖率检查定义好答案必须包含的关键事实,来源质量检查确认所咨询的来源是权威的,而不仅仅是第一个检索到的来源。对于有客观正确答案的任务(“X 公司的第三季度收入是多少?”),精确匹配是有效的。LLM 可以标记不受支持的主张和覆盖范围的缺口,也可以验证开放式综合的连贯性和完整性。

Given the subjective nature of research quality, LLM-based rubrics should be frequently calibrated against expert human judgment to grade these agents effectively.鉴于研究质量的主观性,应根据专家的人类判断频繁校准基于 LLM 的准则,以有效评估这些智能体。

Computer use agents计算机使用智能体

Computer use agents interact with software through the same interface as humans—screenshots, mouse clicks, keyboard inputs, and scrolling—rather than through APIs or code execution. They can use any application with a graphical user interface (GUI), from design tools to legacy enterprise software. Evaluation requires running the agent in a real or sandboxed environment where it can use software applications and checking whether it achieved the intended outcome. For instance, WebArena tests browser-based tasks, using URL and page state checks to verify the agent navigated correctly, along with backend state verification for tasks that modify data (confirming an order was actually placed, not just that the confirmation page appeared). OSWorld extends this to full operating system control, with evaluation scripts that inspect diverse artifacts after task completion: file system state, application configs, database contents, and UI element properties.计算机使用智能体通过与人类相同的界面(截图、鼠标点击、键盘输入和滚动)与软件交互,而不是通过 API 或代码执行。它们可以使用任何带有图形用户界面(GUI)的应用程序,从设计工具到遗留企业软件。评估需要在真实或沙盒环境中运行智能体,使其能够使用软件应用程序,并检查它是否达到了预期结果。例如,WebArena 测试基于浏览器的任务,使用 URL 和页面状态检查来验证智能体是否正确导航,并对修改数据的任务进行后端状态验证(确认订单确实已下达,而不仅仅是确认页面出现了)。OSWorld 将此扩展到完整的操作系统控制,通过评估脚本在任务完成后检查各种工件:文件系统状态、应用程序配置、数据库内容和 UI 元素属性。

Browser use agents require a balance between token efficiency and latency. DOM-based interactions execute quickly but consume many tokens, while screenshot-based interactions are slower but more token-efficient. For example, when asking Claude to summarize Wikipedia, it is more efficient to extract the text from the DOM. When finding a new laptop case on Amazon, it is more efficient to take screenshots (as extracting the entire DOM is token-intensive). In our Claude for Chrome product, we developed evals to check that the agent was selecting the right tool for each context. This enabled us to complete browser-based tasks faster and more accurately.浏览器使用智能体需要在 Token 效率和延迟之间取得平衡。基于 DOM 的交互执行速度快但消耗大量 Token,而基于截图的交互较慢但更节省 Token。例如,当要求 Claude 总结维基百科时,从 DOM 中提取文本更高效。而在亚马逊上寻找新的笔记本电脑外壳时,截图更高效(因为提取整个 DOM 非常消耗 Token)。在我们的 Claude for Chrome 产品中,我们开发了评估来检查智能体是否为每个上下文选择了正确的工具。这使我们能够更快、更准确地完成基于浏览器的任务。

How to think about non-determinism in evaluations for agents如何思考智能体评估中的非确定性

Regardless of agent type, agent behavior varies between runs, which makes evaluation results harder to interpret than they first appear. Each task has its own success rate—maybe 90% on one task, 50% on another—and a task that passed on one eval run might fail on the next. Sometimes, what we want to measure is how often (what proportion of the trials) an agent succeeds for a task.无论智能体类型如何,智能体行为在不同运行之间都会发生变化,这使得评估结果比初看时更难解释。每个任务都有自己的成功率——可能在一个任务上是 90%,在另一个任务上是 50%——并且在一个评估运行中通过的任务在下一次可能会失败。有时,我们想要衡量的是智能体在多大比例的试验中成功完成了任务。

Two metrics help capture this nuance:两个指标有助于捕捉这种细微差别:

pass@k measures the likelihood that an agent gets at least one correct solution in k attempts. As k increases, pass@k score rises: more “shots on goal” means higher odds of at least 1 success. A score of 50% pass@1 means that a model succeeds at half the tasks in the eval on its first try. In coding, we’re often most interested in the agent finding the solution on the first try—pass@1. In other cases, proposing many solutions is valid as long as one works.pass@k 衡量智能体在 k 次尝试中至少获得一个正确解决方案的可能性。随着 k 的增加,pass@k 分数上升:更多的“射门机会”意味着至少 1 次成功的概率更高。50% 的 pass@1 分数意味着模型在第一次尝试时就能成功完成评估中一半的任务。在编码中,我们通常最关心智能体是否在第一次尝试时就找到了解决方案——即 pass@1。在其他情况下,只要有一个奏效,提出多个解决方案也是有效的。

pass^k measures the probability that all k trials succeed. As k increases, pass^k falls since demanding consistency across more trials is a harder bar to clear. If your agent has a 75% per-trial success rate and you run 3 trials, the probability of passing all three is (0.75)³ ≈ 42%. This metric especially matters for customer-facing agents where users expect reliable behavior every time.pass^k 衡量所有 k 次试验都成功的概率。随着 k 的增加,pass^k 下降,因为要求在更多试验中保持一致是一个更难达到的门槛。如果你的智能体单次试验成功率为 75%,且你运行 3 次试验,则三次全部通过的概率约为 (0.75)³ ≈ 42%。此指标对于面向客户的智能体尤为重要,因为用户期望每次都有可靠的行为。

pass@k and pass^k diverge as trials increase. At k=1, they're identical (both equal the per-trial success rate). By k=10, they tell opposite stories: pass@k approaches 100% while pass^k falls to 0%.随着试验次数的增加,pass@k 和 pass^k 会出现分歧。在 k=1 时,它们是相同的(都等于单次试验成功率)。到了 k=10,它们反映的情况截然相反:pass@k 趋近于 100%,而 pass^k 降至 0%。

Both metrics are useful, and which to use depends on product requirements: pass@k for tools where one success matters, pass^k for agents where consistency is essential.这两个指标都很有用,使用哪一个取决于产品需求:对于一次成功就足够的情况使用 pass@k,对于一致性至关重要的智能体使用 pass^k。

Going from zero to one: a roadmap to great evals for agents从零到一:智能体优秀评估路线图

This section lays out our practical, field-tested advice for going from no evals to evals you can trust. Think of this as a roadmap for eval-driven agent development: define success early, measure it clearly, and iterate continuously.本节列出了我们针对从无评估到拥有可信评估的实践经验。将其视为评估驱动型智能体开发的路线图:尽早定义成功,清晰衡量,并持续迭代。

Collect tasks for the initial eval dataset收集初始评估数据集的任务

Step 0. Start early第 0 步:尽早开始

We see teams delay building evals because they think they need hundreds of tasks. In reality, 20-50 simple tasks drawn from real failures is a great start. After all, in early agent development, each change to the system often has a clear, noticeable impact, and this large effect size means small sample sizes suffice. More mature agents may need larger, more difficult evals to detect smaller effects, but it’s best to take the 80/20 approach in the beginning. Evals get harder to build the longer you wait. Early on, product requirements naturally translate into test cases. Wait too long and you're reverse-engineering success criteria from a live system.我们看到团队推迟构建评估,因为他们认为需要数百个任务。实际上,从真实故障中提取 20-50 个简单任务就是一个很好的开始。毕竟,在早期智能体开发中,系统变更通常有清晰、显著的影响,这种大的效应量意味着小样本量就足够了。更成熟的智能体可能需要更大、更困难的评估来检测较小的效应,但最初最好采取 80/20 原则。等待的时间越长,构建评估就越困难。在早期,产品需求自然会转化为测试用例。如果等待太久,你就不得不从实时系统中反向工程成功标准。

Step 1. Start with what you already test manually第 1 步:从你已经手动测试的内容开始

Begin with the manual checks you run during development—the behaviors you verify before each release and common tasks end users try. If you're already in production, look at your bug tracker and support queue. Converting user-reported failures into test cases ensures your suite reflects actual usage; prioritizing by user impact helps you invest effort where it counts.从你在开发过程中运行的手动检查开始——即你在每次发布前验证的行为以及终端用户尝试的常见任务。如果你已经进入生产环境,请查看你的 Bug 追踪器和支持队列。将用户报告的故障转化为测试用例,可确保你的套件反映了实际使用情况;按用户影响进行优先排序有助于你将精力投入到最重要的地方。

Step 2: Write unambiguous tasks with reference solutions第 2 步:编写具有参考解决方案的明确任务

Getting task quality right is harder than it seems. A good task is one where two domain experts would independently reach the same pass/fail verdict. Could they pass the task themselves? If not, the task needs refinement. Ambiguity in task specifications becomes noise in metrics. The same applies to criteria for model-based graders: vague rubrics produce inconsistent judgments.确保任务质量比看起来更难。一个好的任务是两位领域专家可以独立得出相同通过/失败结论的任务。他们自己能通过这个任务吗?如果不能,任务就需要改进。任务规范中的歧义会变成指标中的噪声。这同样适用于基于模型的评估器的准则:模糊的准则会产生不一致的判断。

Each task should be passable by an agent that follows instructions correctly. This can be subtle. For instance, auditing Terminal-Bench revealed that if a task asks the agent to write a script but doesn’t specify a filepath, and the tests assume a particular filepath for the script, the agent might fail through no fault of its own. Everything the grader checks should be clear from the task description; agents shouldn’t fail due to ambiguous specs. With frontier models, a 0% pass rate across many trials (i.e. 0% pass@100) is most often a signal of a broken task, not an incapable agent, and a sign to double-check your task specification and graders. For each task, it’s useful to create a reference solution: a known working output that passes all graders. This proves that the task is solvable and verifies graders are correctly configured.每个任务都应该能被正确遵循指令的智能体通过。这可能很微妙。例如,审计 Terminal-Bench 时发现,如果任务要求智能体编写脚本但未指定文件路径,而测试假设脚本有特定文件路径,智能体可能会在非自身过错的情况下失败。评估器检查的所有内容都应从任务描述中清晰可见;智能体不应因规范模糊而失败。对于前沿模型,在多次试验中 0% 的通过率(例如 0% pass@100)通常是任务损坏的信号,而不是智能体能力不足,这是检查任务规范和评估器的标志。对于每个任务,创建一个参考解决方案很有用:一个已知能通过所有评估器的有效输出。这证明了任务是可解的,并验证了评估器配置正确。

Step 3: Build balanced problem sets第 3 步:构建平衡的问题集

Test both the cases where a behavior should occur and where it shouldn't. One-sided evals create one-sided optimization. For instance, if you only test whether the agent searches when it should, you might end up with an agent that searches for almost everything. Try to avoid class-imbalanced evals. We learned this firsthand when building evals for web search in Claude.ai. The challenge was preventing the model from searching when it shouldn’t, while preserving its ability to do extensive research when appropriate. The team built evals covering both directions: queries where the model should search (like finding the weather) and queries where it should answer from existing knowledge (like “who founded Apple?”). Striking the right balance between undertriggering (not searching when it should) or overtriggering (searching when it shouldn’t) was difficult, and took many rounds of refinements to both the prompts and the eval. As more example problems come up, we continue to add to evals to improve our coverage.同时测试行为应该发生和不应该发生的情况。单向评估会导致单向优化。例如,如果你只测试智能体在应该搜索时是否搜索,你最终可能会得到一个几乎对所有事情都进行搜索的智能体。尽量避免类别不平衡的评估。我们在构建 Claude.ai 网络搜索评估时亲身体会到了这一点。挑战在于防止模型在不该搜索时进行搜索,同时保留其在适当情况下进行广泛研究的能力。团队构建了涵盖两个方向的评估:模型应该搜索的查询(如查找天气)和模型应该从现有知识中回答的查询(如“谁创立了 Apple?”)。在欠触发(应该搜索时未搜索)或过触发(不应该搜索时搜索)之间找到合适的平衡点很困难,并且需要多轮完善提示词和评估。随着更多示例问题的出现,我们继续添加到评估中以提高覆盖率。

Design the eval harness and graders设计评估工具集和评估器

Step 4: Build a robust eval harness with a stable environment第 4 步:构建带有稳定环境的稳健评估工具集

It’s essential that the agent in the eval functions roughly the same as the agent used in production, and that the environment itself doesn’t introduce further noise. Each trial should be “isolated” by starting from a clean environment. Unnecessary shared state between runs (leftover files, cached data, resource exhaustion) can cause correlated failures due to infrastructure flakiness rather than agent performance. Shared state can also artificially inflate performance. For example, in some internal evals we observed Claude gaining an unfair advantage on some tasks by examining the git history from previous trials. If multiple distinct trials fail because of the same limitation in the environment (like limited CPU memory), these trials are not independent because they’re affected by the same factor, and the eval results become unreliable for measuring agent performance.至关重要的是,评估中的智能体功能应与生产中使用的智能体大致相同,且环境本身不应引入额外的噪声。每次试验都应通过从干净的环境开始来“隔离”。运行之间不必要的共享状态(残留文件、缓存数据、资源耗尽)可能导致由于基础设施不稳定而非智能体性能导致的关联故障。共享状态也可能人为地夸大性能。例如,在一些内部评估中,我们观察到 Claude 通过检查先前试验的 git 历史记录在某些任务上获得了不公平的优势。如果多个不同的试验因为环境中的相同限制(如 CPU 内存有限)而失败,这些试验就不是独立的,因为它们受到相同因素的影响,评估结果对于衡量智能体性能就变得不可靠。

Step 5: Design graders thoughtfully第 5 步:深思熟虑地设计评估器

As discussed above, great eval design involves choosing the best graders for the agent and the tasks. We recommend choosing deterministic graders where possible, LLM graders where necessary or for additional flexibility, and using human graders judiciously for additional validation.如上所述,优秀的评估设计涉及为智能体和任务选择最佳评估器。我们建议尽可能选择确定性评估器,在必要时或为了增加灵活性使用 LLM 评估器,并审慎使用人工评估器进行额外验证。

There is a common instinct to check that agents followed very specific steps like a sequence of tool calls in the right order. We’ve found this approach too rigid and results in overly brittle tests, as agents regularly find valid approaches that eval designers didn’t anticipate. So as not to unnecessarily punish creativity, it’s often better to grade what the agent produced, not the path it took.人们有一种常见的本能,即检查智能体是否遵循了非常具体的步骤,例如按正确顺序执行一系列工具调用。我们发现这种方法太死板,会导致测试过于脆弱,因为智能体经常会找到评估设计者未预料到的有效方法。为了不为了不必要的惩罚创造力,评估智能体产生的成果而非其采取的路径通常更好。

For tasks with multiple components, build in partial credit. A support agent that correctly identifies the problem and verifies the customer but fails to process a refund is meaningfully better than one that fails immediately. It’s important to represent this continuum of success in results.对于具有多个组件的任务,应构建部分评分。一个正确识别问题并验证客户但未能处理退款的支持智能体,明显优于立即失败的智能体。在结果中表现出这种成功连续性非常重要。

Model grading often takes careful iteration to validate accuracy. LLM-as-judge graders should be closely calibrated with human experts to gain confidence that there is little divergence between the human grading and model grading. To avoid hallucinations, give the LLM a way out, like providing an instruction to return “Unknown” when it doesn’t have enough information. It can also help to create clear, structured rubrics to grade each dimension of a task, and then grade each dimension with an isolated LLM-as-judge rather than using one to grade all dimensions. Once the system is robust, it’s sufficient to use human review only occasionally.模型评分通常需要仔细迭代以验证准确性。LLM 作为裁判的评估器应与人类专家密切校准,以确信人类评分与模型评分之间几乎没有分歧。为了避免幻觉,给 LLM 一个退出的方式,例如提供在没有足够信息时返回“未知”的指令。创建清晰、结构化的准则来评估任务的每个维度,然后使用隔离的 LLM 作为裁判来评估每个维度,而不是用一个 LLM 来评估所有维度,也有帮助。一旦系统稳健,仅偶尔使用人工审查就足够了。

Some evaluations have subtle failure modes that result in low scores even with good agent performance, as the agent fails to solve tasks due to grading bugs, agent harness constraints, or ambiguity. Even sophisticated teams can miss these issues. For example, Opus 4.5 initially scored 42% on CORE-Bench, until an Anthropic researcher found multiple issues: rigid grading that penalized “96.12” when expecting “96.124991…”, ambiguous task specs, and stochastic tasks that were impossible to reproduce exactly. After fixing bugs and using a less constrained scaffold, Opus 4.5’s score jumped to 95%. Similarly, METR discovered several misconfigured tasks in their time horizon benchmark that asked agents to optimize to a stated score threshold, but the grading required exceeding that threshold. This penalized models like Claude for following the instructions, while models that ignored the stated goal received better scores. Carefully double-checking tasks and graders can help avoid these problems.有些评估存在微妙的失败模式,即使智能体表现良好也会导致低分,因为智能体因评分错误、工具集约束或歧义而无法解决任务。即使是成熟的团队也可能错过这些问题。例如,Opus 4.5 最初在 CORE-Bench 上得分 42%,直到一位 Anthropic 研究员发现了多个问题:僵化的评分在期望“96.124991…”时对“96.12”进行惩罚、模糊的任务规范,以及无法精确重现的随机任务。在修复 Bug 并使用限制较少的脚手架后,Opus 4.5 的分数跃升至 95%。同样,METR 在其时间跨度基准测试中发现了几个配置错误的任务,要求智能体优化到指定的得分阈值,但评分要求超过该阈值。这惩罚了像 Claude 这样遵循指令的模型,而忽略既定目标并获得更好分数的模型则得到了奖励。仔细复核任务和评估器有助于避免这些问题。

Make your graders resistant to bypasses or hacks. The agent shouldn’t be able to easily “cheat” the eval. Tasks and graders should be designed so that passing genuinely requires solving the problem rather than exploiting unintended loopholes.使你的评估器能够抵御绕过或黑客攻击。智能体不应能够轻易“欺骗”评估。任务和评估器的设计应确保通过评估确实需要解决问题,而不是利用意外的漏洞。

Maintain and use the eval long-term长期维护和使用评估

Step 6: Check the transcripts第 6 步:检查记录

You won't know if your graders are working well unless you read the transcripts and grades from many trials. At Anthropic, we invested in tooling for viewing eval transcripts and we regularly take the time to read them. When a task fails, the transcript tells you whether the agent made a genuine mistake or whether your graders rejected a valid solution. It also often surfaces key details about agent and eval behavior.除非你阅读了多次试验的记录和评分,否则你不会知道你的评估器是否工作良好。在 Anthropic,我们投资了用于查看评估记录的工具,并且我们定期花时间阅读它们。当任务失败时,记录会告诉你智能体是犯了真正的错误,还是你的评估器拒绝了一个有效的解决方案。它还经常揭示有关智能体和评估行为的关键细节。

Failures should seem fair: it’s clear what the agent got wrong and why. When scores don’t climb, we need confidence that it’s due to agent performance and not the eval. Reading transcripts is how you verify that your eval is measuring what actually matters, and is a critical skill for agent development.失败应该是公平的:智能体哪里做错了以及为什么做错应该是明确的。当分数不再上升时,我们需要确信这是由于智能体性能而非评估本身。阅读记录是验证你的评估是否衡量了真正重要内容的方法,也是智能体开发的一项关键技能。

Step 7: Monitor for capability eval saturation第 7 步:监测能力评估饱和度

An eval at 100% tracks regressions but provides no signal for improvement. Eval saturation occurs when an agent passes all of the solvable tasks, leaving no room for improvement. For instance, SWE-Bench Verified scores started at 30% this year, and frontier models are now nearing saturation at >80%. As evals approach saturation, progress will also slow, as only the most difficult tasks remain. This can make results deceptive, as large capability improvements appear as small increases in scores. For example, the code review startup Qodo was initially unimpressed by Opus 4.5 because their one-shot coding evals didn’t capture the gains on longer, more complex tasks. In response, they developed a new agentic eval framework, providing a much clearer picture of progress.处于 100% 的评估可以跟踪回归,但不能提供改进信号。当智能体通过了所有可解任务时,就会出现评估饱和,没有改进空间。例如,SWE-bench Verified 分数今年开始于 30%,前沿模型现在已接近 80% 以上的饱和点。随着评估接近饱和,进展也会放缓,因为只剩下最困难的任务。这可能使结果具有欺骗性,因为巨大的能力提升表现为分数的微小增长。例如,代码审查初创公司 Qodo 最初对 Opus 4.5 印象不深,因为他们的单次编码评估没有捕捉到其在更长、更复杂任务上的收益。作为回应,他们开发了一个新的智能体评估框架,提供了更清晰的进展图景。

As a rule, we do not take eval scores at face value until someone digs into the details of the eval and reads some transcripts. If grading is unfair, tasks are ambiguous, valid solutions are penalized, or the harness constrains the model, the eval should be revised. 作为规则,在有人深入研究评估细节并阅读一些记录之前,我们不会从表面上看待评估分数。如果评分不公平、任务模糊、有效解决方案受到惩罚或工具集限制了模型,则应修改评估。

Step 8: Keep evaluation suites healthy long-term through open contribution and maintenance第 8 步:通过开放贡献和维护,长期保持评估套件的健康

An eval suite is a living artifact that needs ongoing attention and clear ownership to remain useful.评估套件是一个活的工件,需要持续关注和明确的所有权才能保持有用。

At Anthropic, we experimented with various approaches to eval maintenance. What proved most effective was establishing dedicated evals teams to own the core infrastructure, while domain experts and product teams contribute most eval tasks and run the evaluations themselves.在 Anthropic,我们尝试了各种评估维护方法。事实证明最有效的是建立专门的评估团队来拥有核心基础设施,而领域专家和产品团队贡献大部分评估任务并自行运行评估。

For AI product teams, owning and iterating on evaluations should be as routine as maintaining unit tests. Teams can waste weeks on AI features that “work” in early testing but fail to meet unstated expectations that a well-designed eval would have surfaced early. Defining eval tasks is one of the best ways to stress-test whether the product requirements are concrete enough to start building.对于 AI 产品团队,拥有并迭代评估应该像维护单元测试一样常规。团队可能会在 AI 功能上浪费数周时间,这些功能在早期测试中“有效”,但未能满足设计良好的评估本应在早期就揭示出来的隐含期望。定义评估任务是压力测试产品需求是否足够具体以开始构建的最佳方法之一。

We recommend practicing eval-driven development: build evals to define planned capabilities before agents can fulfill them, then iterate until the agent performs well. Internally, we often build features that work “well enough” today but are bets on what models can do in a few months. Capability evals that start at a low pass rate make this visible. When a new model drops, running the suite quickly reveals which bets paid off.我们建议实践评估驱动型开发:构建评估以定义计划能力,然后进行迭代直到智能体表现良好。在内部,我们经常构建今天“足够好”的功能,但这些功能是对模型几个月后能做什么的赌注。从低通过率开始的能力评估使这一点显而易见。当新模型发布时,运行套件可以快速揭示哪些赌注得到了回报。

The people closest to product requirements and users are best positioned to define success. With current model capabilities, product managers, customer success managers, or salespeople can use Claude Code to contribute an eval task as a PR—let them! Or, even better, actively enable them.最接近产品需求和用户的人最适合定义成功。利用当前模型的能力,产品经理、客户成功经理或销售人员可以使用 Claude Code 将评估任务作为 PR 贡献出来——让他们这样做!或者,更好的是,积极地赋能他们。

The process of creating an effective evaluation.创建有效评估的过程。

How evals fit with other methods for a holistic understanding of agents评估如何与其他方法结合以全面了解智能体

Automated evaluations can be run against an agent in thousands of tasks without deploying to production or affecting real users. But this is just one of many ways to understand agent performance. A complete picture includes production monitoring, user feedback, A/B testing, manual transcript review, and systematic human evaluation.自动化评估可以在数千个任务上对智能体进行运行,而无需部署到生产环境或影响真实用户。但这只是了解智能体性能的众多方法之一。完整的图景包括生产监控、用户反馈、A/B 测试、手动记录审查和系统化的人工评估。

An overview of approaches for understanding AI agent performance了解 AI 智能体性能的方法概述

MethodProsCons
Automated evals
Running tests programmatically without real users
  • Faster iteration
  • Fully reproducible
  • No user impact
  • Can run on every commit
  • Tests scenarios at scale without requiring a prod deployment
  • Requires more up-front investment to build
  • Requires ongoing maintenance as product and model evolves to avoid drift
  • Can create false confidence if it doesn’t match real usage patterns
Production monitoring
Tracking metrics and errors in live systems
  • Reveals real user behavior at scale
  • Catches issues that synthetic evals miss
  • Provides ground truth on how agents actually perform
  • Reactive; problems reach users before you know about them
  • Signals can be noisy
  • Requires investment in instrumentation
  • Lacks ground truth for grading
A/B testing
Comparing variants with real user traffic
  • Measures actual user outcomes (retention, task completion)
  • Controls for confounds
  • Scalable and systematic
  • Slow; days or weeks to reach significance and requires sufficient traffic
  • Only tests changes you deploy
  • Less signal on the underlying “why” for changes in metrics without being able to thoroughly review the transcripts
User feedback
Explicit signals like thumbs-down or bug reports
  • Surfaces problems you didn't anticipate
  • Comes with real examples from actual human users
  • The feedback often correlates with product goals
  • Sparse and self-selected
  • Skews toward severe issues
  • Users rarely explain why something failed
  • Not automated
  • Relying primarily on users to catch issues can have negative user impact
Manual transcript review
Humans reading through agent conversations
  • Builds intuition for failure modes
  • Catches subtle quality issues automated checks miss
  • Helps calibrate what "good" looks like and grasp details
  • Time-intensive
  • Doesn't scale
  • Coverage is inconsistent
  • Reviewer fatigue or different reviewers can affect the signal quality
  • Typically only gives qualitative signal rather than clear quantitative grading
Systematic human studies
Structured grading of agent outputs by trained raters
  • Gold-standard quality judgements from multiple human raters
  • Handles subjective or ambiguous tasks
  • Provides signal for improving model-based graders
  • Relatively expensive and slow turnaround
  • Hard to run frequently
  • Inter-rater disagreement requires reconciliation
  • Complex domains (legal, finance, healthcare) require human experts to conduct studies

These methods map to different stages of agent development. Automated evals are especially useful pre-launch and in CI/CD, running on each agent change and model upgrade as the first line of defense against quality problems. Production monitoring kicks in post-launch to detect distribution drift and unanticipated real-world failures. A/B testing validates significant changes once you have sufficient traffic. User feedback and transcript review are ongoing practices to fill the gaps: triage feedback constantly, sample transcripts to read weekly, and dig deeper as needed. Reserve systematic human studies for calibrating LLM graders or evaluating subjective outputs where human consensus serves as the reference standard.这些方法映射到智能体开发的不同阶段。自动化评估在发布前和 CI/CD 中特别有用,在每次智能体变更和模型升级时运行,作为防止质量问题的第一道防线。发布后,生产监控介入以检测分布漂移和未预料到的现实世界故障。一旦你有足够的流量,A/B 测试就会验证重大变更。用户反馈和记录审查是填补空白的持续实践:不断分类反馈,每周抽样阅读记录,并根据需要深入挖掘。将系统化的人工研究留给校准 LLM 评估器或评估以人类共识作为参考标准的主观输出。

Like the Swiss Cheese Model from safety engineering, no single evaluation layer catches every issue. With multiple methods combined, failures that slip through one layer are caught by another.就像安全工程中的瑞士奶酪模型一样,没有单一的评估层能捕捉到每一个问题。结合多种方法,滑过一层的问题会被另一层捕捉到。

The most effective teams combine these methods: automated evals for fast iteration, production monitoring for ground truth, and periodic human review for calibration.最有效的团队结合了这些方法:用于快速迭代的自动化评估、用于基本事实的生产监控以及用于校准的定期人工审查。

Conclusion结论

Teams without evals get bogged down in reactive loops—fixing one failure, creating another, unable to distinguish real regressions from noise. Teams that invest early find the opposite: development accelerates as failures become test cases, test cases prevent regressions, and metrics replace guesswork. Evals give the whole team a clear hill to climb, turning “the agent feels worse” into something actionable. The value compounds, but only if you treat evals as a core component, not an afterthought.没有评估机制的团队会陷入被动的循环中——修复了一个故障,却引发了另一个,无法区分真正的回归问题与噪音。尽早投入评估的团队则会发现截然不同的结果:随着故障转化为测试用例,开发速度反而加快了;测试用例能预防回归,指标也取代了猜测。评估为整个团队提供了明确的攻坚目标,将“感觉智能体变差了”这种模糊的反馈转化为可操作的任务。评估的价值会不断累积,但前提是你必须将其视为核心组件,而不是事后补救措施。

The patterns vary by agent type, but the fundamentals described here are constant. Start early and don’t wait for the perfect suite. Source realistic tasks from the failures you see. Define unambiguous, robust success criteria. Design graders thoughtfully and combine multiple types. Make sure the problems are hard enough for the model. Iterate on the evaluations to improve their signal-to-noise ratio. Read the transcripts!模式会因智能体类型的不同而有所差异,但此处描述的基本原则是不变的。尽早开始,不要等待完美的测试套件。从你观察到的故障中提炼真实的测试任务。定义清晰、稳健的成功标准。深思熟虑地设计评估器,并结合多种评估类型。确保问题对模型而言具有足够的难度。通过迭代评估来提高其信噪比。一定要阅读交互记录!

AI agent evaluation is still a nascent, fast-evolving field. As agents take on longer tasks, collaborate in multi-agent systems, and handle increasingly subjective work, we will need to adapt our techniques. We’ll keep sharing best practices as we learn more.AI 智能体评估仍是一个处于起步阶段且快速发展的领域。随着智能体承担更长期的任务、在多智能体系统中协作以及处理日益主观的工作,我们需要不断调整评估技术。随着我们对该领域了解的深入,我们将持续分享最佳实践。

Acknowledgements致谢

Written by Mikaela Grace, Jeremy Hadfield, Rodrigo Olivares, and Jiri De Jonghe. We're also grateful to David Hershey, Gian Segato, Mike Merrill, Alex Shaw, Nicholas Carlini, Ethan Dixon, Pedram Navid, Jake Eaton, Alyssa Baum, Lina Tawfik, Karen Zhou, Alexander Bricken, Sam Kennedy, Robert Ying, and others for their contributions. Special thanks to the customers and partners we have learned from through collaborating on evals, including iGent, Cognition, Bolt, Sierra, Vals.ai, Macroscope, PromptLayer, Stripe, Shopify, the Terminal Bench team, and more. This work reflects the collective efforts of several teams who helped develop the practice of evaluations at Anthropic.本文由 Mikaela Grace、Jeremy Hadfield、Rodrigo Olivares 和 Jiri De Jonghe 撰写。我们也感谢 David Hershey、Gian Segato、Mike Merrill、Alex Shaw、Nicholas Carlini、Ethan Dixon、Pedram Navid、Jake Eaton、Alyssa Baum、Lina Tawfik、Karen Zhou、Alexander Bricken、Sam Kennedy、Robert Ying 等人为本文做出的贡献。特别感谢我们在评估协作中学习到的客户和合作伙伴,包括 iGent、Cognition、Bolt、Sierra、Vals.ai、Macroscope、PromptLayer、Stripe、Shopify、Terminal Bench 团队等。这项工作反映了 Anthropic 内部多个协助开发评估实践的团队的集体努力。

Appendix: Eval frameworks附录:评估框架

Several open-source and commercial frameworks can help teams implement agent evaluations without building infrastructure from scratch. The right choice depends on your agent type, existing stack, and whether you need offline evaluation, production observability, or both.

Harbor is designed for running agents in containerized environments, with infrastructure for running trials at scale across cloud providers and a standardized format for defining tasks and graders. Popular benchmarks like Terminal-Bench 2.0 ship through the Harbor registry, making it easy to run established benchmarks along with custom eval suites.

Braintrust is a platform that combines offline evaluation with production observability and experiment tracking—useful for teams that need to both iterate during development and monitor quality in production. Its `autoevals` library includes pre-built scorers for factuality, relevance, and other common dimensions.

LangSmith offers tracing, offline and online evaluations, and dataset management with tight integration into the LangChain ecosystem. Langfuse provides similar capabilities as a self-hosted open-source alternative for teams with data residency requirements.
多种开源和商业框架可以帮助团队实施智能体评估,而无需从零开始构建基础设施。正确的选择取决于你的智能体类型、现有的技术栈,以及你是否需要离线评估、生产环境可观测性,或两者兼顾。Harbor 专为在容器化环境中运行智能体而设计,提供了跨云服务商进行大规模试验的基础设施,以及定义任务和评估器的标准化格式。流行的基准测试(如 Terminal-Bench 2.0)通过 Harbor 注册表发布,使得运行既有的基准测试和自定义评估套件变得非常简单。Braintrust 是一个将离线评估与生产环境可观测性及实验跟踪相结合的平台,对于需要在开发过程中迭代并同时监控生产环境质量的团队非常有用。其 `autoevals` 库包含了针对事实性、相关性及其他常见维度的预构建评分器。LangSmith 提供跟踪、离线与在线评估以及数据集管理功能,并与 LangChain 生态系统紧密集成。对于有数据驻留要求的团队,Langfuse 提供了类似的自托管开源替代方案。

Arize offers Phoenix, an open-source platform for LLM tracing, debugging, and offline or online evaluations, and AX, a SaaS offering that extends Phoenix for scale, optimization and monitoring.

Many teams combine multiple tools, roll their own eval framework, or just use simple evaluation scripts as a starting point. We find that while frameworks can be a valuable way to accelerate progress and standardize, they’re only as good as the eval tasks you run through them. It’s often best to quickly pick a framework that fits your workflow, then invest your energy in the evals themselves by iterating on high-quality test cases and graders.
Arize 提供了 Phoenix,这是一个用于 LLM 跟踪、调试以及离线或在线评估的开源平台;其 SaaS 产品 AX 则在 Phoenix 的基础上扩展了规模化、优化和监控功能。许多团队会结合使用多种工具、自行开发评估框架,或者仅以简单的评估脚本作为起点。我们发现,虽然框架是加速进展和实现标准化的有效途径,但其价值取决于你通过它运行的评估任务质量。通常最好的做法是快速选择一个符合你工作流的框架,然后将精力投入到评估本身,通过迭代高质量的测试用例和评估器来提升效果。

Get the developer newsletter订阅开发者通讯

Product updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.产品更新、操作指南、社区精选内容等。每月发送至您的收件箱。

Remove Note