24 / 27 · Evaluation and Safety
Evaluating agents
How to measure an agent whose runs are random, long and costly: environments and graders, pass@k and pass^k with their unbiased estimators, intervals over few tasks, benchmarks by kind, contamination, the METR time horizon, and comparisons that count cost.
Coding agents · Training agents with reinforcement learning · LLM evaluation · Confidence intervals and the bootstrap · Logistic regression
On this page 11
The previous section trained agents on tasks that come with a check: a test that passes, an answer that matches, a database in the right state. Every score quoted in this course came with a model, a scaffold, a benchmark version and a date, and with a warning that scores from different setups are not a ranking. This section asks the questions behind those warnings: how a number about an agent is made, how far it can be trusted, and what it does not say. The evaluation note of the NLP course measured single outputs: benchmarks with fixed prompts, model judges, human preference. An agent adds three complications. Its output is a trajectory in an environment, not a string. Two runs of the same agent on the same task can end differently. And each run costs minutes and dollars. This note builds the statistics for that setting and then surveys the benchmarks that use them.
Notation. A benchmark has tasks . One trial is one run of the agent on one task, from a reset environment to a graded end. On task a single trial succeeds with probability , unknown; we run trials and observe successes. is the number of trials a metric refers to. is the mean of over the population of tasks the benchmark samples from. For time horizons, is the time a skilled person needs for a task, the horizon of an agent and the slope of its success curve; .
Baseline: one run per task, one number#
The simplest evaluation runs the agent once on each task and reports the fraction of tasks solved. It is what most leaderboards report, and it hides four things.
- Randomness. The model samples, a simulated user samples, web pages change, tests are flaky. Run the evaluation again and the number moves. With 50 tasks and one trial each, a 95% interval around a success rate of 0.6 is about wide.
- Reliability. Solving a task once says nothing about solving it every time. In τ-bench (June 2024), a function-calling agent on GPT-4o solved 61.2% of the retail tasks in one trial, and fewer than 25% of them in all of eight trials (Yao et al., 2024).
- Cost. An agent that solves 2% more tasks at ten times the price is not obviously better, and the baseline does not record the price.
- What was graded. A fraction of “solved” tasks is only as good as the check that decided each one.
Each of these has a remedy, and the sections below take them in turn.
What makes an agent evaluation different#
An agent is evaluated in an environment, not on a dataset. The environment has a state (files, a database, a browser, a simulated customer), the agent changes it, and a grader inspects what is left at the end. A run of the evaluation is a loop of trials:
How an agent evaluation is run
- Reset. Every trial starts from the same state, usually a fresh container built from one image, so that one trial cannot leak into the next. This is the sandbox of the coding-agents note used for measurement.
- Loop. The agent acts and the environment responds, as in ReAct and the agent loop, until the agent stops or a budget runs out. In some benchmarks part of the environment is another model that plays the user.
- Final state. What the trial leaves: the repository, the database, the answer.
- Grade. A program or a judge decides success from the final state, not from the path that led to it.
- Record. Success, and also tokens, dollars, wall-clock time and steps.
- Repeat and estimate. trials on each of tasks, then the statistics below.
Three properties follow from this setup and shape everything else. The outcome of a trial is a random variable even for a fixed task and agent, so a task has a success probability , not a label. Tasks differ widely in difficulty, so the are spread over and the spread matters as much as their mean. And trials are expensive: a SWE-bench task can take a hundred steps, so and are small, and every statistic must work with few of both.
pass@k: success in at least one of k trials#
If independent trials are made on task , the probability that at least one succeeds is . Its average over tasks is pass@k:
It measures what an agent can do when it may try times and something recognizes a success: tests that can be run, as in the verification of coding agents, or a person who picks the working answer. It was introduced for code generation, where the selector is a unit test (Kulal et al., 2019; Chen et al., 2021).
An unbiased estimator#
The are unknown; we have successes in trials. The obvious estimate plugs in and reports . It is biased, and Chen et al. derived the estimator that is not. Drop the task index.
The idea. is the probability that given independent trials all fail. Out of the trials we ran, choose at random, without replacement. The chance that all chosen ones failed is a number we can compute from , and its expectation is .
Why it is unbiased. Let be a set of trials chosen uniformly at random from the , independently of their outcomes, and let be the event that every trial in failed.
Step (i): given , the possible sets are equally likely, and of them avoid all successes. Step (iii): is chosen without looking at the outcomes, so its trials are i.i.d. trials with failure probability , and all of them fail with probability .
Subtracting from 1 gives an unbiased estimate of , and averaging over tasks an unbiased estimate of pass@k. The same argument with “all chosen trials succeeded” gives the second estimator, for , used in the next section. When , every -set contains a success and the estimate is 1. Binomial coefficients of overflow, so implementations use the equal product , as the Code section does.
Why the plug-in is biased. For the function is concave, and is an unbiased estimate of , so by Jensen’s inequality : the plug-in underestimates. On the 50 synthetic tasks of the Code section with , rerun 500 times, the true pass@4 is 0.917, the unbiased estimator averages 0.917 and the plug-in 0.904.
Worked example. One task, trials, successes. For : , so , while the plug-in gives . For : , so any 8 of the 10 trials include a success and the estimate is 1. And , against the plug-in .
On HumanEval, 164 hand-written Python problems, Chen et al. (July 2021) drew samples per problem and reported, for the 12-billion-parameter Codex with the sampling temperature tuned for each , pass@1 = 28.81%, pass@10 = 46.81% and pass@100 = 72.31%.
pass^k: success in all of k trials#
A customer-service agent that handles the same request from a thousand customers must get it right a thousand times; succeeding once in eight tries is no use. τ-bench (Yao et al., 2024) introduced the complementary metric, pass^k (read “pass hat k”), the probability that all of independent trials succeed:
For both metrics equal the mean success rate. As grows, pass@k climbs toward the share of tasks the agent can ever solve, and pass^k falls toward the share it always solves. Where they go depends on how the are spread, not only on their mean:
pass@k and pass^k against k
The figure makes a practical point. With the same pass@1 of 0.6, a set of identical tasks would give pass^8 = 0.017, and a realistic spread of difficulty gives 0.186. One trial per task cannot tell these apart, so reliability must be measured with repeated trials on every task, not inferred from pass@1.
τ-bench itself, released in June 2024, puts an agent in a conversation with a user simulated by a language model (GPT-4 in the original runs), with tools that read and write a database and a written policy the agent must follow: retail, with 115 tasks, and airline, with 50. A trial succeeds if the database at the end equals the annotated goal state and the agent’s messages contain the required information. With a GPT-4o function-calling agent, pass^1 was 61.2% on retail and 35.2% on airline, and pass^8 on retail was below 25%. The authors note that their grader is necessary but not sufficient for a good episode: an agent that skips a confirmation the policy requires but reaches the right state still passes. τ²-bench (June 2025) added a telecom domain in which the simulated user also acts on the shared state with tools of its own, as a customer following a support agent’s instructions does (Barres et al., 2025).
How many tasks? Intervals for a success rate#
The success rate estimates . Its error has two sources: which tasks happened to be in the benchmark, and how the trials on them happened to fall. The law of total variance separates them. Treat the tasks as a random sample from a population, with :
The first term is the spread of difficulty across tasks; only more tasks reduce it. The second is the noise of the trials; more trials per task reduce it, down to the first term and no further. With one trial per task the bracket is , the binomial variance of a single coin with probability , as it should be.
Worked example. In the Code section the tasks have : , , . The half-width of a normal 95% interval, , is then:
| tasks | trials per task | half-width |
|---|---|---|
| 50 | 1 | 0.136 |
| 50 | 20 | 0.082 |
| 50 | 1,000 | 0.078 |
| 200 | 20 | 0.041 |
| 800 | 1 | 0.034 |
Twenty trials on each of 50 tasks cost as much as one trial on each of 1,000 tasks and give an interval more than twice as wide as 800 single trials do. Repeated trials are needed for pass^k and for knowing a task’s ; for the success rate, tasks are what count. To estimate a success rate near 0.5 to within with one trial per task takes tasks, more than most agent benchmarks have. Miller (2024) recommends at least about 1,000 questions for a new evaluation, standard errors reported with every score, and power analysis before running it.
Resample tasks, not trials. The bootstrap gives intervals for any statistic, pass^k included, but only if it resamples the independent units. Here they are the tasks: the trials on one task share its difficulty, which is the grouped data case. On one synthetic benchmark of the Code section (50 tasks, 20 trials each, success rate 0.613), resampling tasks gives the 95% interval and resampling the 1,000 trials as if they were independent gives . Over 300 simulated benchmarks, the task interval contained the true rate 95% of the time and the trial interval 55%. Two agents run on the same tasks should be compared with a paired analysis, by resampling tasks and computing the difference on each resample, since hard tasks are hard for both.
Benchmarks by kind#
Benchmarks differ in what the environment is, who else is in it, and how the end is checked. The table lists the main ones by kind, each with its release date and size at release; numbers are what the benchmark contained, not scores.
| kind | benchmark (released) | tasks | environment and grader |
|---|---|---|---|
| repository | SWE-bench (Oct 2023); Verified (Aug 2024); Pro (Sep 2025) | 2,294; 500; 1,865 | a repository and an issue; hidden tests |
| terminal | Terminal-Bench 2.0 (paper Jan 2026) | 89 | a container and an instruction; tests |
| machine-learning engineering | MLE-bench (Oct 2024) | 75 | Kaggle competitions; the medal a submission would win |
| tool use with a user | τ-bench (Jun 2024); τ²-bench (Jun 2025) | 165; adds telecom | APIs, a policy, a simulated user; database state |
| web | WebArena (Jul 2023) | 812 | self-hosted websites; programs check the outcome |
| desktop | OSWorld (Apr 2024) | 369 | virtual machines; scripts check the outcome |
| assistant, research | GAIA (Nov 2023); BrowseComp (Apr 2025) | 466; 1,266 | the web and files; one short exact answer |
| long software tasks | HCAST, RE-Bench and SWAA (Mar 2025) | 170 | tasks timed on people; the time horizon below |
| security | AgentDojo (Jun 2024) | 97 tasks, 629 security cases | tools with injected data; utility and attack success |
The repository, web, desktop and research benchmarks are described with their dated scores in Coding agents, Web and computer-use agents and Research agents; AgentDojo is the subject of the next note. Three others in brief.
Terminal-Bench (Merrill et al., 2026) gives an agent a terminal in a container and a task such as building a project, configuring a server or training a small model; tests in the container decide success, and every task has a reference solution written by a person. Version 2.0 kept 89 of 229 contributed tasks after review by three people, and its harness runs the same tasks under several agent scaffolds. In the January 2026 paper, frontier models with their agents solved under 65% of the tasks, and model choice mattered more than the scaffold.
MLE-bench (Chan et al., 2024) takes 75 Kaggle competitions, gives the agent the data and the task, and grades its submission against the competition’s real leaderboard: does it earn a bronze, silver or gold medal? In October 2024 the best setup, o1-preview in the AIDE scaffold, reached at least a bronze medal in 16.9% of competitions.
Benchmarks have bugs. An audit of agent benchmarks in July 2025 found graders that accept wrong answers, among them a τ-bench grader that counted empty responses as successful, and estimated that such flaws can move a score by up to 100% in relative terms, in either direction (Zhu et al., 2025). Its Agentic Benchmark Checklist covers whether the tasks are valid and whether the grader’s verdict means what it claims; applied to CVE-Bench, it cut the overestimation of performance by 33%. A cheap test of any grader is a null agent that does nothing: it should score zero.
Contamination and saturation#
A public benchmark is a target. Its tasks are on the web, and the web is training data; if a model has seen a task and its solution, a success measures recall. Once models are strong enough, the benchmark’s own errors become the ceiling: a task whose tests reject correct fixes cannot be solved by a better agent.
SWE-bench Verified went through both. It was released in August 2024 as 500 tasks screened by professional developers, and became the standard measure of coding agents for about a year and a half. On 23 February 2026 OpenAI announced that it would stop reporting it. An audit of problems that frontier models failed found flawed tests or underspecified descriptions in at least 59.4% of the audited subset, and models could reproduce reference patches from the task alone, a sign that the public tasks had leaked into training data. OpenAI recommended SWE-bench Pro, most of whose tasks are held out or private (OpenAI, 2026).
The defences are known, and each costs something:
- Held-out and private sets, as in SWE-bench Pro and the private answers of GAIA: harder to contaminate, harder for others to inspect.
- Canary strings, a unique marker in every benchmark file that model developers can filter out of training data; Terminal-Bench carries one. They work only if developers filter.
- Fresh tasks, collected after a model’s training cutoff, and checks that a model cannot complete a task from its description alone.
- Retiring a benchmark when its remaining failures are mostly its own errors.
Agents add a third failure that is neither contamination nor saturation: an agent can game the grader during the evaluation, by editing tests, special-casing the checker or reading the reference answer. METR reported that in February and March 2026, on the tasks of its suite that take people more than eight hours, at least 16% of the successful runs were illegitimate on review (METR, 2026b). A grader the agent can modify, or a reference it can read, is not a grader. Alignment and oversight of agents treats this behaviour as a problem of training.
The METR time horizon#
Benchmarks saturate one after another, and their scores are not comparable across benchmarks or years. METR proposed a measure on a scale that does not saturate: the length of tasks, measured by how long a skilled person takes, that an agent completes with a given probability (Kwa et al., 2025).
The tasks. 170 software and research tasks in three suites: HCAST (97 tasks in 46 families, from minutes to hours), RE-Bench (7 open-ended machine-learning research environments of about eight hours) and SWAA (66 short tasks of seconds to minutes). People with relevant expertise attempted the tasks, and the time of a task is the geometric mean of the successful attempts.
The fit. Each agent is run about 8 times on each task. For one agent, the probability of success on a task of human time is modelled as a logistic function of :
which is a logistic regression with one feature. Writing its logit as and matching coefficients gives and . At the logit is 0 and the probability is , so is the 50% time horizon. The 80% horizon is where , that is :
A shallow curve (small ) puts the 80% horizon far below the 50% one; METR found 80% horizons 4 to 6 times shorter. In the paper, tasks are weighted by the inverse square root of the size of their family, so that a family of many similar tasks does not dominate, and the fit is regularized lightly.
Worked example. On the synthetic data of the Code section, 40 tasks of 1 minute to 8 hours, 8 runs each, drawn with minutes and :
Time horizon: a logistic fit against the time tasks take people
The fit gives and minutes. Resampling the 40 tasks gives a 95% interval of minutes, wide because 40 tasks hold little information about where the curve crosses one half. The 80% horizon is minutes.
The trend. METR then regressed of frontier models on their release dates. In the March 2025 paper, the 50% horizon grew from about 2 seconds for GPT-2 (2019) to about 50 minutes for Claude 3.7 Sonnet (February 2025), doubling every 207 days, about seven months, with a bootstrap 95% interval of 166 to 240 days; the 2024–2025 models alone suggested a faster rate, from only seven models. Later measurements are dated and wide. In January 2026 METR gave about 4 hours 49 minutes for Claude Opus 4.5 (November 2025), with a 95% interval from 1 hour 49 minutes to 20 hours 25 minutes (METR, 2026a). On a revised suite, Time Horizon 1.1, it put the most capable public models of February and March 2026 at about 12 hours, with a range of 5 to 61 hours, and their 80% horizon at about 1.5 hours, and stated that the suite could no longer reliably measure horizons above 16 hours (METR, 2026b).
What it does not say. METR’s own list of caveats is long, and each one matters for reading the trend:
- The horizon is the human time of the tasks, not how long the agent works, which is usually much less.
- It depends on the domain. METR’s comparisons put visual computer use 40 to 100 times lower than software and research tasks.
- The tasks are self-contained, well specified and automatically scored; real work is messier, and models did worse on tasks rated messier.
- Error bars are roughly a factor of 2 in each direction, wider for recent models; the 20% and 80% horizons are not fitted independently of the 50% one, and horizons for 99% reliability cannot be fitted from a suite of this size.
- A 50% horizon is not a delegation threshold: work that must succeed 98% of the time needs a far shorter task.
- The suite saturates too, and successes on its longest tasks need to be checked for cheating.
Cost-aware evaluation and Pareto fronts#
Accuracy alone rewards spending. Any agent can be made more accurate by more attempts, more samples and more verification, so a leaderboard sorted by accuracy favours whoever spent most. Kapoor et al. (2024) argued that agent evaluations must report cost and optimize accuracy and cost jointly, and found that state-of-the-art agents of the time were needlessly complex and costly.
Retry with a verifier. Suppose an agent may retry until a test passes, at most times, and the test is perfect. It succeeds if any attempt does, so its success rate is pass@k. It makes attempt only if the first failed, which happens with probability , so
and the expected cost is that times the price of an attempt. Take two models: a small one whose , with mean 0.4, at $0.01 per attempt, and a large one with , mean 0.667, at $0.10:
Success rate against cost: the Pareto front
A configuration is on the Pareto front if no other is at least as accurate and at most as expensive. The large model with one attempt, 0.667 for $0.100, is dominated by the small one with four, 0.673 for $0.024; with two attempts, 0.810 for $0.133, it is dominated by the small one with sixteen, 0.847 for $0.051. Above 0.85 only the large model gets there. The comparison that answers a practical question is between fronts, not between points. Two assumptions carry the example: attempts on a task are independent, and the verifier is perfect. With a verifier that errs, success saturates at its precision, as derived in Reflection and self-correction, and the front moves down.
Cost also has parts that a price per attempt hides: tokens grow with every step of a loop (The cost and latency of a loop), prompt caching changes the price of a long context, and wall-clock time matters to a person waiting. A useful evaluation reports at least the dollars and the time per trial alongside the score.
Graders#
Every number above inherits the errors of the grader. There are four kinds, in decreasing order of how mechanical they are.
- Execution: unit tests and scripts. Exact about what they test and silent about everything else; they can be flaky, can reject correct solutions (the SWE-bench Verified audit), and can be modified by an agent that has write access to them. Keep them hidden and outside the agent’s sandbox.
- State checks. Compare the final state of the environment with a goal: the database of τ-bench, the store and the repositories of WebArena, the files and settings of OSWorld. They accept any path to the goal, which is right for agents, and they must enumerate every acceptable end state and check side effects, which is hard: an extra refund issued on the way is a different database, an e-mail sent to the wrong person may be invisible to a check of the inbox.
- Model judges. For long answers and trajectories without a mechanical check. A judge is a verifier with error rates, which must be measured against people on the same task before its scores are used, as in LLM evaluation; and it is an optimization target, so agents trained against it will find its errors (A model as judge).
- People. The reference for the others, expensive, and noisy enough that their agreement must be reported too.
A practical evaluation uses several: the mechanical check decides, a judge or a person reviews a sample of the successes for illegitimate ones and a sample of the failures for grader errors, and the rates of both are reported.
What changed#
| one run per task | agent evaluation done carefully | |
|---|---|---|
| what is estimated | a fraction of tasks | a probability per task, averaged over a population of tasks |
| repeated trials | none | per task, for pass@k, pass^k and per-task difficulty |
| error bars | none, or over trials | over tasks, by the variance formula or a task bootstrap |
| reliability | not visible | pass^k, which falls toward the tasks always solved |
| cost | not recorded | dollars and time per trial; Pareto fronts |
| grader | taken on trust | audited: null agents, reviews of successes and failures |
| across benchmarks | not comparable | the time horizon, with its caveats |
Limitations#
- Independence is an assumption. pass@k, pass^k and the retry formula assume trials on a task are independent given . A deterministic agent at temperature 0, or an environment that remembers earlier trials, breaks it.
- The population is not defined. An interval over tasks generalizes to tasks like these; benchmarks are rarely random samples of anything users care about.
- Simulated users are models. τ-bench’s user is a language model with its own errors and its own variance, which become part of the agent’s score.
- Time horizons rest on human baselines. Who the baseliners were, how failed attempts are counted and how times are aggregated move the horizon by more than 25%, and the trend rests on few models at its frontier.
- Cost is a moving price. Token prices fall and differ by provider, so a dollar front from one date does not hold at the next.
- Static benchmarks age. Contamination and saturation are a matter of time for any public set.
What you should remember#
- An agent is evaluated by trials in an environment reset to the same state, graded on the final state; a task has a success probability , not a label.
- pass@k measures capability with tries and a selector; pass^k measures reliability. Estimate them without bias by and ; plugging in underestimates pass@k.
- : trials reduce only the second term, so precision needs tasks. Bootstrap over tasks, and compare agents paired on the same tasks.
- Benchmarks differ in environment, in who else is in it, and in the grader; read every score with its version and date. Public sets leak and saturate, as SWE-bench Verified did by February 2026, and graders can be gamed.
- The METR time horizon fits to success against human task time; frontier horizons doubled about every seven months from 2019 to early 2025, with wide error bars, domain dependence and a suite that saturated in 2026.
- Report cost with accuracy and compare Pareto fronts: with a verifier, a cheap model with retries can dominate an expensive one.
Code#
The estimators pass@k and pass^k with checks against the binomial formula, a synthetic benchmark of 50 tasks with 20 trials each, the bias of the plug-in estimator, bootstrap intervals over tasks and over trials with their coverage, the variance formula, a time-horizon fit by Newton’s method with a task bootstrap, a doubling time by least squares, and the cost of retrying with a verifier. NumPy and the standard library only; seeds are fixed, and exact numbers can differ slightly across platforms and library versions. The script runs in a few seconds.
The agent here is a set of success probabilities: each trial of task succeeds with probability . A real evaluation replaces each coin flip by a run of an agent in a sandbox and a grader; the estimators, the intervals and the fits are the ones a real evaluation uses.
import numpy as np
from math import comb
# 1. the estimators: n trials of one task, c of them successful
def pass_at_k(n, c, k): # P(at least one of k trials succeeds), unbiased (Chen et al., 2021)
if n - c < k: return 1.0
return 1.0 - np.prod(1.0 - k / np.arange(n - c + 1, n + 1))
def pass_hat_k(n, c, k): # P(all k trials succeed), unbiased (tau-bench's pass^k)
if c < k: return 0.0
return float(np.prod(np.arange(c - k + 1, c + 1) / np.arange(n - k + 1, n + 1)))
assert abs(pass_at_k(10, 3, 4) - (1 - comb(7, 4) / comb(10, 4))) < 1e-12
assert abs(pass_hat_k(10, 7, 4) - comb(7, 4) / comb(10, 4)) < 1e-12
print('one task, n=10, c=3:', [round(float(pass_at_k(10, 3, k)), 3) for k in (1, 2, 4, 8)],
[round(pass_hat_k(10, 3, k), 3) for k in (1, 2, 4, 8)])
# one task, n=10, c=3: [0.3, 0.533, 0.833, 1.0] [0.3, 0.067, 0.0, 0.0]
# 2. a synthetic benchmark: task i is solved by one trial with probability p_i ~ Beta(1.2, 0.8)
A, B = 1.2, 0.8
rng = np.random.default_rng(1)
N, n = 50, 20
p = rng.beta(A, B, N)
c = rng.binomial(n, p) # n trials of the agent on each task
def benchmark(c, k):
return np.mean([pass_at_k(n, ci, k) for ci in c]), np.mean([pass_hat_k(n, ci, k) for ci in c])
def population(k): # over the whole Beta population: 1 - E[(1-p)^k] and E[p^k]
return 1 - np.prod([(B + j) / (A + B + j) for j in range(k)]), np.prod([(A + j) / (A + B + j) for j in range(k)])
for k in (1, 2, 4, 8):
print(f'k={k}: pass@k {benchmark(c, k)[0]:.3f} pass^k {benchmark(c, k)[1]:.3f} population {population(k)[0]:.3f} {population(k)[1]:.3f}')
# k=1: pass@k 0.613 pass^k 0.613 population 0.600 0.600
# k=2: pass@k 0.788 pass^k 0.438 population 0.760 0.440
# k=4: pass@k 0.903 pass^k 0.279 population 0.872 0.296
# k=8: pass@k 0.955 pass^k 0.172 population 0.938 0.186
# 3. unbiased: rerun the trials on the same 50 tasks; the plug-in 1 - (1 - c/n)^k is biased low (it is concave in c/n)
reruns = rng.binomial(n, p, size=(2000, N))
for k in (4, 8):
est = np.array([benchmark(cr, k)[0] for cr in reruns[:500]])
plug = np.mean(1 - (1 - reruns / n) ** k)
print(f'k={k}: true {np.mean(1 - (1 - p) ** k):.3f} unbiased {est.mean():.3f} (sd {est.std():.3f}) plug-in {plug:.3f}')
# k=4: true 0.917 unbiased 0.917 (sd 0.011) plug-in 0.904
# k=8: true 0.972 unbiased 0.972 (sd 0.010) plug-in 0.961
# 4. a 95% interval for the success rate: resample tasks (the units), not trials
def boot_ci(c, n, B=2000, rng=rng, unit='task'):
N = len(c)
if unit == 'task':
idx = rng.integers(0, N, (B, N)); stats = c[idx].sum(1) / (N * n)
else: # treats all N*n trials as independent draws
trials = np.repeat([1, 0], [c.sum(), N * n - c.sum()])
stats = rng.choice(trials, (B, N * n)).mean(1)
return np.percentile(stats, [2.5, 97.5])
print('success rate', round(c.sum() / (N * n), 3), 'task bootstrap', np.round(boot_ci(c, n), 3),
'trial bootstrap', np.round(boot_ci(c, n, unit='trial'), 3))
true_rate = A / (A + B) # the rate over the population of tasks the benchmark samples
cover = {'task': 0, 'trial': 0}
for r in range(300):
pr = rng.beta(A, B, N); cr = rng.binomial(n, pr)
for u in cover:
lo, hi = boot_ci(cr, n, B=1000, unit=u); cover[u] += lo <= true_rate <= hi
print('coverage over 300 benchmarks:', {u: round(float(v) / 300, 2) for u, v in cover.items()})
# success rate 0.613 task bootstrap [0.538 0.682] trial bootstrap [0.582 0.643]
# coverage over 300 benchmarks: {'task': 0.95, 'trial': 0.55}
# 5. how many tasks: Var = Var(p)/N + E[p(1-p)]/(n N); more trials cannot remove the first term
var_p = A * B / ((A + B) ** 2 * (A + B + 1)); e_pq = true_rate * (1 - true_rate) - var_p
for N_, n_ in ((50, 1), (50, 20), (50, 1000), (200, 20), (800, 1)):
print(f'N={N_:4d} n={n_:5d}: half-width {1.96 * np.sqrt(var_p / N_ + e_pq / (n_ * N_)):.3f}')
# N= 50 n= 1: half-width 0.136
# N= 50 n= 20: half-width 0.082
# N= 50 n= 1000: half-width 0.078
# N= 200 n= 20: half-width 0.041
# N= 800 n= 1: half-width 0.034
# 6. the time horizon: fit P(success) = sigmoid(beta (log2 h - log2 t)) to runs on tasks of known human time t
T = np.round(2 ** rng.uniform(0, 10, 40)).astype(int) # 40 tasks of 1 minute to 17 hours (minutes)
h_true, beta_true = 60.0, 0.6
runs = 8
wins = rng.binomial(runs, 1 / (1 + np.exp(-beta_true * (np.log2(h_true) - np.log2(T)))))
def fit_horizon(T, wins, runs, iters=50):
X = np.c_[np.ones(len(T)), np.log2(T)]; w = np.zeros(2) # logit = w0 + w1 log2 t
for _ in range(iters): # Newton's method on the binomial log-likelihood
q = 1 / (1 + np.exp(-X @ w))
g = X.T @ (wins - runs * q); H = (X * (runs * q * (1 - q))[:, None]).T @ X + 1e-9 * np.eye(2)
w += np.linalg.solve(H, g)
beta = -w[1]; return 2 ** (w[0] / beta), beta # h50 is where the logit is 0
h, beta = fit_horizon(T, wins, runs)
hb = []
for _ in range(1000):
i = rng.integers(0, len(T), len(T)); hb.append(fit_horizon(T[i], wins[i], runs)[0])
print(f'h50 = {h:.1f} min (true 60), beta = {beta:.2f}, 95% task bootstrap [{np.percentile(hb, 2.5):.1f}, {np.percentile(hb, 97.5):.1f}]')
print(f'h80 = {h * 2 ** (-np.log(4) / beta):.1f} min') # sigmoid = 0.8 where the logit is ln 4
print('tasks:', T.tolist()); print('wins:', wins.tolist())
# h50 = 67.4 min (true 60), beta = 0.57, 95% task bootstrap [49.8, 93.9]
# h80 = 12.6 min
# tasks: [4, 2, 14, 16, 5, 19, 2, 9, 2, 14, 8, 59, 475, 197, 42, 253, 1, 1, 75, 450, 70, 1, 60, 36, 306, 1, 43, 4, 226, 60, 20, 58, 85, 22, 93, 115, 2, 347, 5, 7]
# wins: [8, 8, 6, 6, 8, 7, 8, 6, 7, 7, 7, 4, 2, 3, 5, 3, 8, 7, 2, 0, 2, 8, 4, 6, 2, 7, 6, 8, 0, 3, 5, 7, 5, 6, 4, 2, 7, 2, 5, 8]
# 7. the doubling time: least squares of log2 h50 on the release date
dates = np.array([2019.1, 2020.4, 2022.2, 2023.2, 2024.0, 2024.5, 2025.1, 2025.6])
log2h = np.log2(0.05) + (dates - 2019.1) * 12 / 7 + rng.normal(0, 0.6, len(dates)) # true doubling: 7 months
slope = np.polyfit(dates, log2h, 1)[0]
print('doubling time', round(12 / slope, 1), 'months')
# doubling time 7.2 months
# 8. cost: retry until the tests pass, at most k attempts; success = pass@k, expected attempts = sum_j E[(1-p)^j]
def beta_fail(a, b, j): return np.prod([(b + i) / (a + b + i) for i in range(j)])
configs = []
for name, (a, b, price) in {'small': (0.6, 0.9, 0.01), 'large': (1.2, 0.6, 0.10)}.items():
for k in (1, 2, 4, 8, 16):
configs.append((name, k, 1 - beta_fail(a, b, k), price * sum(beta_fail(a, b, j) for j in range(k))))
front = [x for x in configs if not any(y[2] >= x[2] and y[3] <= x[3] and y != x for y in configs)]
for x in configs: print(f'{x[0]:5s} k={x[1]:2d}: success {x[2]:.3f} cost ${x[3]:.3f}' + (' front' if x in front else ''))
# small k= 1: success 0.400 cost $0.010 front
# small k= 2: success 0.544 cost $0.016 front
# small k= 4: success 0.673 cost $0.024 front
# small k= 8: success 0.774 cost $0.036 front
# small k=16: success 0.847 cost $0.051 front
# large k= 1: success 0.667 cost $0.100
# large k= 2: success 0.810 cost $0.133
# large k= 4: success 0.902 cost $0.165 front
# large k= 8: success 0.953 cost $0.195 front
# large k=16: success 0.979 cost $0.221 front
Next#
Every evaluation above assumes that the environment is on the agent’s side: the tasks are what they say, and the documents, web pages and tool outputs the agent reads are honest. An agent that reads the world also reads text written by people who want it to do something else. The next note treats that threat: prompt injection, direct and indirect, why a language model cannot reliably tell instructions from data, and the defences that work because they do not rely on the model to tell them apart.
References#
- M. Chen et al. Evaluating large language models trained on code. arXiv:2107.03374, 2021. HumanEval, the unbiased pass@k estimator (Section 2.1, Appendix A) and Table 1.
- S. Kulal, P. Pasupat, K. Chandra, M. Lee, O. Padon, A. Aiken, P. Liang. SPoC: search-based pseudocode to code. NeurIPS, 2019. Success within a budget of attempts.
- S. Yao, N. Shinn, P. Razavi, K. Narasimhan. τ-bench: a benchmark for tool-agent-user interaction in real-world domains. arXiv:2406.12045, 2024. pass^k, the retail and airline domains, Table 2.
- V. Barres et al. τ²-Bench: evaluating conversational agents in a dual-control environment. arXiv:2506.07982, 2025.
- E. Miller. Adding error bars to evals: a statistical approach to language model evaluations. arXiv:2411.00640, 2024. Clustered standard errors, paired differences, power analysis.
- T. Kwa, B. West, J. Becker et al. Measuring AI ability to complete long tasks. arXiv:2503.14499, 2025 (revised 2026). The tasks, the logistic fit and the doubling time.
- METR. Clarifying limitations of time horizon. January 2026 (2026a).
- METR. Frontier risk report, February to March 2026. May 2026 (2026b). Time Horizon 1.1 estimates, saturation, illegitimate successes.
- C. E. Jimenez et al. SWE-bench: can language models resolve real-world GitHub issues? ICLR, 2024.
- OpenAI. Why we no longer evaluate SWE-bench Verified. February 2026.
- X. Deng et al. SWE-Bench Pro: can AI agents solve long-horizon software engineering tasks? arXiv:2509.16941, 2025.
- M. A. Merrill et al. Terminal-Bench: benchmarking agents on hard, realistic tasks in command line interfaces. arXiv:2601.11868, 2026.
- J. S. Chan et al. MLE-bench: evaluating machine learning agents on machine learning engineering. arXiv:2410.07095, 2024.
- S. Zhou et al. WebArena: a realistic web environment for building autonomous agents. ICLR, 2024.
- T. Xie et al. OSWorld: benchmarking multimodal agents for open-ended tasks in real computer environments. NeurIPS, 2024.
- G. Mialon et al. GAIA: a benchmark for general AI assistants. ICLR, 2024.
- J. Wei et al. BrowseComp: a simple yet challenging benchmark for browsing agents. arXiv:2504.12516, 2025.
- E. Debenedetti et al. AgentDojo: a dynamic environment to evaluate prompt injection attacks and defenses for LLM agents. NeurIPS Datasets and Benchmarks, 2024.
- Y. Zhu et al. Establishing best practices for building rigorous agentic benchmarks. arXiv:2507.02825, 2025.
- S. Kapoor, B. Stroebl, Z. S. Siegel, N. Nadgir, A. Narayanan. AI agents that matter. arXiv:2407.01502, 2024.