Product Research Pricing About Careers Blog Private beta Talk to us Get the private beta →
Research Agent evaluation · 26 September 2024 · 20 min read

One run is an anecdote: variance in repository-level agent evaluations

Coding agents are now compared by a single resolve rate on a few hundred real GitHub issues, from one run. We simulated what repeated runs of the same agent on the same tasks look like. Five runs of one configuration spanned 3.4 points; a single run picked the wrong winner between two agents 2.5 points apart 17% of the time, and even a paired test over tasks claimed a difference between identical agents one time in nine.

ReportAWL-2024-02
Versionv1.0
AreaAgent evaluation

Published 26 September 2024

Five runs of one agent over 500 tasks, resolved tasks lit Cover generated from this paper’s simulation
Abstract

We simulate a 500-task repository-level benchmark (the size of SWE-bench Verified) evaluated by four agent configurations with population resolve rates of 33%, 35.5%, 38% and 38%. Each run combines task-level nondeterminism, a run-level shock shared by all tasks in a run (provider latency, rate limiting, flaky environments) and a 2% harness failure rate. On a fixed set of tasks the single-run score has a standard deviation of 1.7 points; redrawing the tasks adds a comparable component, for 2.4 points in total. A binomial interval covers the benchmark-specific rate 99% of the time and the population rate 91% of the time, right for neither. A two-level bootstrap over tasks and five runs covers the population rate 96% of the time. Between two configurations 2.5 points apart, a single run picks the wrong one 17% of the time and five runs 5%. With identical configurations, a task-paired test rejects 11% of the time from single runs, because the run-level shock is shared across tasks; an unpaired test over ten pooled runs rejects 15%. Two configurations with the same pass@1 of 37% differ by 14 points in pass@5 and by a factor of two in pass^5, the share of tasks solved on every run.

3.4 ptrange of five runs of one agent configuration on the same 500 tasks
17%chance a single run picks the worse of two agents 2.5 points apart
11%false-positive rate of a task-paired test between identical agents, one run each

Agent leaderboards changed shape over the past year. SWE-bench made the unit of evaluation a real issue in a real repository, SWE-bench Verified in August cut it to 500 tasks that human annotators confirmed are solvable, and every week brings a new scaffold, model or prompt reporting a resolve rate a point or two above the last. Most of those numbers come from a single run.

We care because our product has to work with whichever agent an engineer uses, and because the evaluations we plan of how agents interact with our comprehension checks will have the same structure: a few hundred tasks, an expensive run, and a strong temptation to run it once. In our pass@k study last year we showed how little a small code benchmark can separate. Agents add a second source of noise that single-shot code generation lacks: a long, stateful trajectory in which an early tool failure, a timeout or a slightly different file listing sends the run somewhere else. This paper measures, in simulation, what that does to the comparisons people are making.

What this paper is

A simulation study. The four configurations are synthetic and are not stand-ins for any named agent or model. Parameters were chosen so that single-configuration behaviour (resolve rates in the 30s, pass@5 in the 50s) resembles what public leaderboards and agent papers report this year.

A model of an agent run

Task j has a latent difficulty dj ~ N(0, 2²). Configuration a has a skill sa, a consistency (sharpness) κa, and a task-specific affinity ηaj ~ N(0, 0.8²) capturing the fact that agents built differently fail on different issues. Run r of configuration a carries a shock δar ~ N(0, 0.15²) shared by every task in that run. The task is resolved with probability

Pr(Yajr = 1) = (1 − f) · expit( κa(sa − dj + ηaj) + δar )(1)

with harness failure rate f = 0.02. Skill is calibrated once, against 200,000 reference tasks, so that each configuration’s population resolve rate hits its target; any particular 500-task benchmark then lands a little above or below it. Configurations A, B and C have κ = 2.2 and targets of 33%, 35.5% and 38%. D has the same 38% target as C but κ = 1.0, so it is less consistent from run to run.

Three estimands are in play, and conflating them causes most of the trouble. The run estimand is this configuration’s expected score on these 500 tasks; its uncertainty comes from runs. The population estimand is its expected score on the population of issues the benchmark represents; its uncertainty also comes from which tasks were sampled. The reliability estimand is the share of tasks the configuration solves every time, which is what an engineer handing it a ticket actually experiences.

Result 1: the same agent, five times

Figure 01020304038.8%Run 140%Run 237%Run 336.6%Run 437.4%Run 5
Resolve rate of configuration C in five independent runs on the same 500 tasks.

Five runs of C on identical tasks gave 38.8%, 40.0%, 37.0%, 36.6% and 37.4%. Across 2,000 simulated runs the standard deviation was 1.7 points and the central 95% range ran from 34.8% to 41.4%. Any single reported number could sit anywhere in that interval, and a leaderboard sorted on single runs will reorder itself every time anyone reruns it.

Figure 0 pt1 pt2 pt3 pt4 ptTotal (tasks redrawn, one run)2.44 ptTask sampling only1.77 ptRuns only (tasks fixed)1.67 pt
Standard deviation of a single-run resolve rate, in points, from runs alone (tasks fixed), from task sampling alone, and in total.

Redrawing the 500 tasks from the same population contributes a further 1.8 points, so a single run’s total standard deviation as an estimate of population capability is 2.4 points. Unlike single-shot code generation, where we found problem sampling dominant, run noise and task noise are of similar size for agents, so both need to be in the interval.

Result 2: the binomial interval is right for neither estimand

The interval most often attached to a resolve rate, when one is attached at all, is binomial: p̂ ± 1.96√(p̂(1 − p̂)/500).

IntervalCovers the run estimandCovers the population estimand
Binomial, one run99.3%90.7%
Bootstrap over five runs83.0%·
Two-level bootstrap: tasks, then five runs·96.3%
Coverage of nominal 95% intervals over 300 simulated benchmarks for configuration C.

For the run estimand the binomial interval is too wide, because the per-task resolve probabilities are spread toward 0 and 1, so Σ pj(1 − pj) is much smaller than n p̄(1 − p̄). For the population estimand it would be exactly right if tasks were the only noise (by the law of total variance a single run is then a binomial draw from the population rate), but the run-level shock adds variance the formula does not see, and coverage falls to 91%. Bootstrapping five runs alone is too narrow for the opposite reason: five values are not enough to estimate a variance. A two-level bootstrap, resampling tasks and then runs within the resampled tasks, covers the population rate at 96%:

Y* = (1/(K·m)) Σr∈R* Σj∈J* Yjr,   J* ~ m tasks with replacement,   R* ~ K runs with replacement(2)

Result 3: comparisons need runs, and a test that knows about them

Figure 0%15%30%45%60%1 run3 runs5 runs10 runsWrong winnerPaired test power
Probability that configuration B (35.5%) scores at least as high as C (38%), and power of a task-paired test to detect the gap, by number of runs of each.

With one run each, B beats or ties C 17% of the time. Three runs cut that to 8% and five to 5%; ten runs still leave 3%, a floor set by which tasks happen to be in the benchmark. The paired test detects the gap only 27% of the time from single runs and 57% from ten. Configurations A, B and C appear in the correct order from single runs 63% of the time.

The more worrying result is what happens when there is no difference at all. We evaluated C against an identical twin.

Figure 051015202%11%1 run8.3%7.8%5 runs15.4%7.5%10 runsUnpaired, pooled runsPaired over tasks
False-positive rate at a nominal 5% when two configurations are identical, by number of runs and test. 800 simulated comparisons per bar.

From single runs, a test paired over tasks rejects 11% of the time. Pairing removes task difficulty from the comparison, which is why it is the right instinct, but it treats the 500 tasks within a run as independent, and the run-level shock makes them move together. The unpaired binomial test is conservative at one run (2%) and becomes badly anticonservative as runs are pooled, reaching 15% at ten, because it counts 5,000 correlated outcomes as independent evidence. With five or more runs the paired test is closer to nominal (8%) but not there. The defensible procedure is to treat the run as the unit for the run-level variance component: compute the paired difference within each run, and use the between-run spread of those differences, or the two-level bootstrap in (2), for the interval.

Rule of thumb

If two agent configurations are within about 2.5 points and each was run once, the difference is not evidence of anything. Five runs each, with run-aware intervals, is the minimum for a claim we would publish.

Result 4: equal pass@1, very different agents

Configurations C and D have the same population resolve rate. They are not the same agent for an engineer.

Figure 02040608037.3%37.3%pass@154.2%68%pass@520.8%11.1%pass^545.8%32%Never solvedC (consistent)D (erratic)
pass@1, pass@5, pass^5 and the share of tasks never solved in five runs, for two configurations with equal pass@1. Means over 200 simulated benchmarks.

D, the less consistent configuration, solves at least once in five runs 68% of tasks against C’s 54%, and leaves only 32% never solved against 46%. But it solves only 11% of tasks on every run, against C’s 21%. Which is better depends on how it is used. As a generator whose candidates are filtered by tests, D is far stronger. As a colleague you hand a ticket to once, C is twice as dependable. Yao and colleagues introduced pass^k in τ-bench this summer for exactly this reason. A leaderboard of pass@1 hides the distinction entirely.

pass@k = Pr(∃ r ≤ k : Yjr = 1),   pass^k = Pr(∀ r ≤ k : Yjr = 1)(3)

How many runs

Runs of each configurationSD of the difference, fixed tasks (points)
12.32
21.71
31.28
50.98
80.89
100.74
150.66
Standard deviation of the B minus C difference across 200 repetitions on one fixed set of 500 tasks. Task-sampling variance is excluded; it adds to these figures for population claims.

The run-to-run standard deviation of a difference falls roughly as one over the square root of the number of runs, from 2.3 points at one run to 1.0 at five. Past five, the returns diminish quickly relative to cost, and the task-sampling floor, which more runs cannot touch, starts to dominate. Five runs per configuration is the default we recommend.

What we recommend reporting

Method

Benchmark
500 tasks; difficulty N(0, 2²); configuration-task affinity N(0, 0.8²)
Configurations
A, B, C at 33%, 35.5%, 38% with sharpness 2.2; D at 38% with sharpness 1.0; skill calibrated on 200,000 reference tasks
Runs
Run-level shock N(0, 0.15²) on the logit; harness failure 2%
Replicates
2,000 runs for single-run spread; 1,500 benchmarks for variance components; 300 for coverage; 800 for comparisons and false positives; 200 for pass@k
Tests
Unpaired two-proportion z-test over pooled runs; paired z-test over per-task mean differences

Limitations

Real agent failures are more structured than a logistic model with one shock per run: a provider outage can wipe out a contiguous block of tasks, and some tasks fail for environment reasons on every run. Both would increase the variance we report. We modelled tasks as independent within the benchmark, while repository-level benchmarks draw many tasks from each repository, which adds the clustering penalty we described in AWL-2023-02. We did not model the cost of runs, which in practice is what decides how many there are. Finally, the sharpness parameter is a crude stand-in for consistency; real agents may be consistent on some task types and erratic on others.

Simulation only. No agent or model was run for this paper. The script, seeds and results file are under Artefacts.

SWE-bench is Jimenez and colleagues [1], and the 500-task Verified subset was released by OpenAI with the original authors in August [2]. Agent scaffolds of the kind we model include SWE-agent [3], OpenDevin [4] and Agentless [5], which showed that a deliberately simple pipeline can be competitive with elaborate agents, a reminder that scaffold choices matter as much as model choice. pass^k is from τ-bench [6]. Madaan and colleagues [7] quantified seed variance across language-model benchmarks, and Kapoor and colleagues [8] argued that agent evaluations must report cost and repeated-run variance; our results put numbers on the second argument for repository-level tasks. Bouthillier and colleagues [9] decompose benchmark variance into sources. The two-level bootstrap follows Davison and Hinkley [10] and Field and Welsh [11]. Our earlier work on code-generation leaderboards is AWL-2023-02 [12].

Artefacts

Everything below is published or available on request. A number nobody can reproduce is an advertisement, not a result.

Codeawl_2024_02_agent_variance.pyAgent-run generator, variance components, coverage, comparisons, pass@k · Python, MIT
Dataawl_2024_02.jsonResults file, every number quoted in this paper

References

  1. Jimenez, C. E., Yang, J., Wettig, A., Yao, S., Pei, K., Press, O., & Narasimhan, K. (2024). SWE-bench: Can Language Models Resolve Real-World GitHub Issues? ICLR.
  2. Chowdhury, N., Aung, J., Shern, C. J., et al. (2024). Introducing SWE-bench Verified. OpenAI, 13 August 2024.
  3. Yang, J., Jimenez, C. E., Wettig, A., Lieret, K., Yao, S., Narasimhan, K., & Press, O. (2024). SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering. arXiv:2405.15793.
  4. Wang, X., Li, B., Song, Y., et al. (2024). OpenDevin: An Open Platform for AI Software Developers as Generalist Agents. arXiv:2407.16741.
  5. Xia, C. S., Deng, Y., Dunn, S., & Zhang, L. (2024). Agentless: Demystifying LLM-based Software Engineering Agents. arXiv:2407.01489.
  6. Yao, S., Shinn, N., Razavi, P., & Narasimhan, K. (2024). τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains. arXiv:2406.12045.
  7. Madaan, L., Singh, A. K., Schaeffer, R., et al. (2024). Quantifying Variance in Evaluation Benchmarks. arXiv:2406.10229.
  8. Kapoor, S., Stroebl, B., Siegel, Z. S., Nadgir, N., & Narayanan, A. (2024). AI Agents That Matter. arXiv:2407.01502.
  9. Bouthillier, X., Delaunay, P., Bronzi, M., et al. (2021). Accounting for Variance in Machine Learning Benchmarks. MLSys.
  10. Davison, A. C., & Hinkley, D. V. (1997). Bootstrap Methods and Their Application. Cambridge University Press.
  11. Field, C. A., & Welsh, A. H. (2007). Bootstrapping Clustered Data. Journal of the Royal Statistical Society, Series B, 69(3).
  12. Bhardwaj, M. (2023). Pass@k is not a ranking: the statistics of code-model leaderboards. AI Work Lab Research, AWL-2023-02.
Cite this work

Bhardwaj, M. (2024). One run is an anecdote: variance in repository-level agent evaluations. AI Work Lab Research, AWL-2024-02.

Mohit Bhardwaj

Head of Research · aiworklab

Mohit led AI Work Lab’s research programme from January 2023 to March 2025: the comprehension item bank, the statistics of code-model leaderboards, review-state telemetry, variance in agent evaluations, and the design of the twelve-month cohort study that the Measurement team went on to run.