Module 9 · Lesson 2 · 16 min read
Metrics and benchmarks
Metrics and Benchmarks
Introduction
Now that we know how to build an evaluation set, we need a numerical language to describe the agent's performance: the success rate, reliability across attempts, and cost. In this lesson we also get to know the best-known benchmarks for agents, what each of them actually measures, and why they do not replace evaluating your agent on your own tasks.
Learning objectives
- Compute an agent's success, cost and reliability metrics from the results of repeated runs
- Distinguish between "succeeds at least once" and "succeeds in every attempt"
- Describe what the AgentBench, WebArena, SWE-bench, GAIA and τ-bench benchmarks measure
- Interpret benchmark results with caution and know their limits
Families of metrics
Agent metrics can be divided into four families that complement one another:
| Family | Examples | What does it answer? |
|---|---|---|
| Outcome | Task success rate | Was the task completed? |
| Trajectory | Number of steps, rate of wrong tool calls | Was the path reasonable and safe? |
| Cost | Number of model calls, tokens, response time | How much did completion cost? |
| Reliability | Success in every repeated attempt | Can it be relied on? |
The outcome metric alone is misleading. An agent that succeeds in most tasks but needs dozens of steps per task may be worse in practice than an agent with slightly lower success that is fast and cheap. So we present the metrics together and decide according to the user's priorities.
Reliability: once or every time?
Suppose we ran each task four times. There are two different questions:
- Did the agent succeed at least once out of the four? This suits a context where the user can choose the best attempt, such as generating code that is tested automatically.
- Did it succeed in all four attempts? This is what matters for a customer-service agent that deals with each customer only once.
The τ-bench benchmark introduced a metric called pass^k that measures the probability that the agent succeeds in all k attempts at the same task, in order to highlight the problem of inconsistency. The following code computes both versions from experimental results, in Python without libraries:
# Each task: a list of the results of four attempts (True = success)
runs = {
"refund_order": [True, True, True, True],
"change_address": [True, False, True, True],
"cancel_flight": [False, False, True, False],
"track_package": [False, False, False, False],
}
def at_least_once(results):
return any(results)
def every_time(results):
return all(results)
n = len(runs)
once = sum(at_least_once(r) for r in runs.values()) / n
always = sum(every_time(r) for r in runs.values()) / n
avg = sum(sum(r) / len(r) for r in runs.values()) / n
print("Succeeded at least once:", once)
print("Succeeded in every attempt:", always)
print("Average success rate:", avg)In this made-up example you will find a clear gap between the first and second numbers. This gap is what should worry you before deployment.
Benchmarks for agents
A benchmark is a fixed set of tasks, an environment and an agreed grading method that allow different systems to be compared. The best known in the field of agents:
- AgentBench: evaluates language models as agents across several different interactive environments, including working with an operating system, databases and the web, to reveal their ability to reason and make multi-step decisions.
- WebArena: a realistic, self-hosted web environment containing sites of common types such as shopping, forums and content management; the agent is asked to perform tasks written in natural language, and success is judged by checking the functional outcome.
- SWE-bench: tasks taken from real issues in open-source Python repositories; the system must produce a code change that solves the issue, and this is verified by running the tests.
- GAIA: questions for general AI assistants, relatively simple for humans but requiring a combination of reasoning, web browsing, tool use and sometimes reading multimodal files, with a short, specific answer for each question.
- τ-bench: simulates a conversation between an agent and a user played by a language model, in domains such as retail and airline bookings, with tools and written policies that must be followed; the final state of the database is compared with the required state.
Limits of benchmarks
A benchmark measures a general ability in a specific environment, not your agent's performance on your company's tasks. And there are known risks: tasks leaking into training data, optimizing for the benchmark itself instead of the skill, and different run settings between teams. That is why we use benchmarks to choose a starting point, such as the model or the framework, and then rely on our own evaluation set, as in the Evaluating agents lesson.
Applied example
A team is building a support agent for an airline. The τ-bench benchmark is close to their domain because it tests policy compliance during the conversation, so they borrow its idea: a simulated user, a written policy and a database-state check. But they write their own tasks from real support logs after masking personal data, and they measure success in every attempt because the customer does not give the agent a second chance.
Summary
Agent metrics fall into four families: outcome, trajectory, cost and reliability, and they should be presented together. The difference between succeeding at least once and succeeding in every attempt reveals the agent's inconsistency, which is what the pass^k metric in τ-bench highlighted. Benchmarks such as AgentBench, WebArena, SWE-bench, GAIA and τ-bench measure different abilities in specific environments. They are useful for general comparison, but they do not replace evaluating the agent on your real tasks.
Terms
| Term | English | Definition |
|---|---|---|
| Task success rate | Task Success Rate | The percentage of tasks that met the success criterion |
| Benchmark | Benchmark | A fixed set of tasks, environment and grading method for comparing systems |
| Success in k attempts | pass^k | A metric for the probability that the agent succeeds in all k attempts at the same task |
| Latency | Latency | The time taken from the request to the final answer |
| Data contamination | Data Contamination | Benchmark tasks being included in the model's training data, which inflates its score |
Review questions
- Why might an agent with a lower success rate be better in practice than one with a higher success rate?
- When do we care about success in every attempt instead of success at least once?
- What does SWE-bench measure and what does τ-bench measure? Which is closer to a customer-service agent?
- Name two risks that sometimes make benchmark results misleading.
References
- τ-bench (Yao et al., 2024) arxiv.org Reviewed on 2026-11-18
- SWE-bench (Jimenez et al., 2023) arxiv.org Reviewed on 2026-11-18
- GAIA (Mialon et al., 2023) arxiv.org Reviewed on 2026-11-18
