Agent benchmark scores with confidence intervals and the cost of each resolved task
A benchmark score such as 71.2% on SWE-bench Verified is an estimate from 500 pass-or-fail tasks, not an exact property of the agent. See how wide its error bar is, why small repositories swing wildly, when a gap to another score means anything and what each resolved task really costs.
Interactive simulation. It needs JavaScript; the text below explains what it shows.
What you are looking at
Each row is one of the twelve Python repositories in SWE-bench Verified, the human-validated set of 500 real GitHub issues released by OpenAI in August 2024. The task counts follow the benchmark's repository mix: Django alone has 231 tasks, almost half, and the five largest repositories (Django, SymPy, Sphinx, Matplotlib and scikit-learn) hold more than 80% of the benchmark, while Seaborn has two tasks and Flask one. The resolved counts and the mean cost per attempt describe one illustrative agent run.
The orange columns give each repository's resolve rate, its Wilson interval and its spend. The chart is a funnel plot: the solid line is the overall score, the dashed lines are the 95% limits that a repository of a given size would show by chance alone, and each dot is a repository. The bars show the resolve rate per repository.
The algorithm
A task counts as resolved when the agent's patch applies and every hidden FAIL_TO_PASS test (tests that failed before the real fix) and PASS_TO_PASS test (tests that passed before and must still pass) succeeds. That makes each task a pass-or-fail trial, and the score is a proportion.
1. Score. With R resolved tasks out of N, the score is p̂ = R / N.
2. Standard error. SE = √(p̂(1 − p̂) / N). At 500 tasks and a score near 70% that is about 2 percentage points.
3. Wilson interval. The simple interval p̂ ± z·SE misbehaves for small samples and for rates near 0 or 1: it can go below 0 or above 1, and it collapses to a single point when every task passes. The Wilson score interval does not:
(p̂ + z²/2N ± z·√(p̂(1 − p̂)/N + z²/4N²)) / (1 + z²/N)
4. Compare with another score. To ask whether a published score p₀ is out of reach, compute z = (p̂ − p₀) / √(p₀(1 − p₀)/N) and its two-sided p-value. When two agents run on the same tasks, a paired test such as McNemar's test uses the per-task results and is more sensitive.
5. Cost per resolved task. Failed attempts cost money too, so divide the whole run's spend by the tasks resolved: CPR = Σ tasks × mean cost / R.
6. Sample size. To pin the score within a margin m you need about N* = z²·p̂(1 − p̂) / m² tasks.
Worked example. The agent resolves 356 of 500 tasks, a score of 71.2%. The standard error is 0.0203 and the 95% Wilson interval runs from 67.1% to 75.0%. Against a published score of 74%, z = −1.43 and the p-value is 0.15: the gap of 2.8 points is not significant at the 5% level. Django's 176 of 231 (76.2%, interval 70.3% to 81.2%) carries the score; Seaborn's one of two gives an interval from 9.5% to 90.5%, which says almost nothing. Averaging the twelve repository rates equally gives 69.0%, lower than 71.2% because the large Django share pulls the pooled score up. The run costs $374.92, or $1.05 per resolved task, compared with an average of $0.75 per attempt. Pinning the score within ±2 points would take about 1,970 tasks, almost four times the size of the benchmark.
Things to try
- Set the score to compare against to 70%: z is 0.59 and the p-value 0.56. A 1.2-point lead on a 500-task benchmark is well inside the noise. Set it to 76% instead and z = −2.51 with a p-value of 0.012: a 4.8-point gap is real.
- Raise z to 2.58 for a 99% interval: it widens to 65.7% to 76.1%, and the tasks needed for ±2 points rise to 3,413.
- Set the margin to 4 points: about 493 tasks are enough, roughly the size of SWE-bench Verified. That is the precision the benchmark can deliver.
- Look at the funnel. Eleven repositories sit inside the dashed limits, so none of them is clearly better or worse than the agent's overall level, even Pylint at 50%. Flask sits just above the limit, but with a single task any success lands there; one task cannot show anything.
- Paste your own run, or change Django's resolved count from 176 to 160: the score falls to 68.0% and the cost per resolved task rises to $1.10.
How it works in real systems
Leaderboard tables usually print a single number, but two scores a few points apart on 500 tasks are often statistically indistinguishable. Report the interval with the score, and when you compare two agents run them on the same tasks and use a paired test. Agents are also not deterministic: rerunning the same agent gives a different score, so serious evaluations repeat runs and report the spread, the subject of the pass@k versus pass^k simulation.
The mix matters too. Because Django is almost half of SWE-bench Verified, a score mostly measures how well an agent fixes Django bugs. Analyses of the benchmark also note that most of its tasks are small changes that an experienced engineer would make in under an hour, so a high score says little about multi-hour work.
Cost belongs next to the score. Two agents with the same resolve rate can differ several times in cost per resolved task because of model price, steps per task and retries. Log cost per attempt from LangSmith or Langfuse traces, run the evaluation in CI with your own task set (see evals and DeepEval), and track both numbers on every change.