LLM eval sample size decides whether you can see a regression at all. In my seeded simulation, catching a 5-point drop from an 80% pass rate with 80% power took about 600 to 860 questions. A 100-question eval caught it only 18% to 26% of the time. This guide shows the data and the code.

I ran the simulation, the exact coverage calculation and a 22-test harness on 3 December 2026. Every number below comes from the code pack (results.json, sweep.json and the Wilson examples), and you can reproduce them with a few commands.

Quick answer: how many test cases does an LLM eval need?

  • It depends on the smallest regression you must catch. To catch a 10-point drop you need roughly 200 to 230 questions. For 5 points, 600 to 860. For 3 points, about 2,300.
  • A score is an estimate, not a fact. At 100 questions and an 80% pass rate the 95% interval runs from 71% to 87%.
  • Re-running the same agent moves the score. At 100 questions, two identical runs differed by 9 points or more in 5% of my simulated runs.
  • "The score dropped" is not an alarm. With no real change, the candidate scored lower than the baseline in 40% to 49% of runs.
  • Use the same questions for both versions and a paired test. It helps, but less than most people assume.

What is LLM eval sample size, and why does it matter?

An LLM eval turns a set of test questions into a pass rate. If 80 of 100 questions pass, the score is 80%. But those 100 questions are a sample from all the questions your users could ask. A different sample would give a different score.

LLM eval sample size is the number of distinct test questions in that set. It controls how wide the error bar around the score is, and therefore which changes you can actually detect. A team that ships a prompt change because the score went from 80% to 83% on 100 questions is often acting on noise.

This is not a new idea. The Anthropic paper by Evan Miller says it plainly: "Fundamentally, evaluations are experiments." It recommends reporting standard errors, comparing models with paired differences and running a power analysis before the eval, not after. This post adds measured numbers for the situation most small teams are in: a pass/fail golden set of 50 to 500 questions.

How I tested this, and what the simulation does not prove

I used no LLM calls. I built a simulated eval where each question has a hidden pass probability, drawn from a Beta distribution with a mean of 80%. Many questions almost always pass and a few almost always fail, which is how real golden sets tend to behave. A "run" answers every question once.

  • Baseline: 80% mean pass rate, with per-question difficulty drawn from a Beta distribution with concentration 2.
  • Regression: the candidate's pass probability on every question is multiplied by a constant, so the mean drops by exactly 5 or 10 points.
  • Repetitions: 4,000 simulated evals per cell, fixed seed 20261203, so you get the same output.
  • Decision rules compared: "score dropped", an unpaired two-proportion test, a paired test on per-question differences, and non-overlapping 95% intervals.

The coverage numbers in Step 1 are different. I computed them exactly from the binomial distribution, with no simulation. The limits of the whole approach are listed near the end, so read that section before you copy a number into a planning doc.

Step 1: Put an honest error bar on every score

The common formula for a 95% interval, score ± 1.96 × √(p(1−p)/n), is the normal (Wald) interval. It breaks when n is small or the pass rate is near 100%. The Bowyer, Aitchison and Ivanova paper (ICML 2025) argues the same for LLM evals: these intervals can collapse to zero width, and it recommends Wilson or Bayesian intervals for small datasets.

I checked this by computing the exact coverage. Coverage is how often an interval labelled "95%" actually contains the true pass rate.

True pass rateQuestionsNormal (Wald) coverageWilson coverageNormal interval has zero width
95%1040.0%91.4%59.9%
95%2063.9%92.5%35.9%
95%3078.2%93.9%21.5%
95%5092.0%96.2%7.7%
95%10087.8%96.6%0.6%
95%20092.6%96.7%0.0%
80%2092.1%95.6%1.1%
80%5093.8%95.1%0.0%
80%10093.3%94.0%0.0%

The row for a 95% true pass rate and 20 questions is the one to remember. The normal interval covered the truth only 63.9% of the time, and in 35.9% of cases it had zero width: all 20 passed, so the formula claimed perfect certainty. The Wilson interval covered 92.5%.

Here is the Wilson interval in a few lines, the same code as evalkit.py:

python
import math

def wilson(k, n, z=1.959964):
    p = k / n
    d = 1 + z * z / n
    c = (p + z * z / (2 * n)) / d
    h = z * math.sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / d
    return max(0.0, c - h), min(1.0, c + h)

print(wilson(8, 10))      # (0.490, 0.943)
print(wilson(80, 100))    # (0.711, 0.867)
print(wilson(800, 1000))  # (0.774, 0.824)

Read those three lines as the whole story. 8 out of 10 is anything from 49% to 94%. 80 out of 100 is 71% to 87%. You need about 1,000 questions to narrow an 80% score to ±2.5 points.

Step 2: Measure how much the same agent moves between runs

Before you compare two versions, find out how much one version differs from itself. I simulated the same agent answering the same questions twice, with no change at all, and recorded the gap between the two scores.

QuestionsScore std. dev. (points)Median gap between 2 identical runs95th percentile gap
257.978.0 pts20.0 pts
505.664.0 pts12.0 pts
1004.023.0 pts9.0 pts
2002.832.0 pts6.5 pts
4001.981.5 pts4.5 pts
8001.411.12 pts3.25 pts

At 100 questions the score has a standard deviation of about 4 points, and in 5% of identical re-runs the two scores differ by 9 points or more. If your team has ever "fixed" a flaky score by re-running the eval until it looked better, this is the mechanism.

Step 3: Stop using "the score dropped" as a regression alarm

The simplest regression check is candidate < baseline. I measured how often each rule fires when nothing has changed (false alarms) and the real change is zero.

Questions"Score dropped"Unpaired testPaired testNon-overlapping intervals
2540.4%3.0%5.4%0.1%
5044.5%2.6%5.5%0.0%
10045.1%2.4%4.5%0.0%
20046.8%2.3%5.2%0.1%
40048.7%2.2%5.4%0.0%
80047.8%2.0%4.8%0.1%

"Score dropped" fired in 40% to 49% of no-change runs. That is not a test, it is a coin flip with extra steps. The paired test hovered near its nominal 5%. The unpaired test was conservative (2% to 3%) because it ignores that both versions answer the same questions.

The last column is the other habit to drop: checking whether two 95% intervals overlap. It almost never raises a false alarm, but it also almost never catches a real change at realistic sizes, as the next step shows.

Step 4: How many test cases do you need to catch a regression?

Now the real change is a 5-point drop, from 80% to 75%. The table shows how often each rule catches it.

Questions"Score dropped"Unpaired testPaired testNon-overlapping intervals
2561.9%8.3%11.6%0.5%
5071.5%11.8%16.9%0.6%
10081.8%18.0%26.0%1.0%
20092.2%31.3%41.6%2.9%
40097.5%52.2%64.4%9.7%
80099.8%81.9%88.7%32.6%

At 100 questions the paired test caught the 5-point drop 26% of the time, and the unpaired test 18%. Roughly three regressions in four, or more, slipped through. Non-overlapping intervals caught fewer than 10% until the set reached 400 questions, and only 33% at 800. Only the "score dropped" rule looks sensitive, and Step 3 showed why it is worthless: it fires almost as often when nothing changed.

A 10-point drop is easier:

QuestionsUnpaired testPaired test
2519.2%23.9%
5030.5%38.6%
10050.3%59.1%
20078.5%84.8%
40097.1%98.4%
800100.0%100.0%

To turn this into a planning number, I searched for the smallest size that reaches 80% power. The unpaired column is the standard two-proportion formula (one-sided, 5% significance). The paired column is the first size in my test grid where the paired simulation reached 80%, so it is coarse.

Drop to detectUnpaired formula (questions)Paired simulation (first grid size at 80% power)
10 points229200
7 points451400
5 points860600
3 points2,3162,400

If your golden set has 100 questions, you can reliably see only about a 15-point drop (the formula gives 107 questions for 15 points). For a 5-point drop you need hundreds of questions, and for 3 points you need thousands. Decide which regression size matters to your users first, then size the set.

Step 5: Compare both versions on the same questions

Running the baseline and the candidate on the same questions lets you test per-question differences instead of two separate scores. Anthropic's write-up calls this a "free" variance reduction technique and reports question-level correlations between frontier models of roughly 0.3 to 0.7.

How much it helps depends on how uneven your questions are. In my simulation the benefit shrinks as questions become more alike:

Question difficulty (Beta concentration)Paired power at 100Unpaired power at 100Paired power at 400Unpaired power at 400
2 (very uneven)25.9%17.8%63.9%52.3%
523.0%19.5%57.6%52.4%
2022.6%20.9%52.4%52.4%
independent coin flips20.9%22.1%51.2%52.9%

With very uneven questions (many nearly always pass or fail), pairing raised power at 400 questions from 52% to 64%. When every question behaved like an independent coin flip, pairing gave no gain. So pair your comparisons, but do not expect it to replace a bigger golden set.

Step 6: Beware the winner's curse in small evals

There is a quieter problem. When a small eval does flag a regression, the size it reports is usually too big. I ran my harness on 200 different simulated golden sets for each size, with a real drop of about 5 points, and recorded what the gate said.

QuestionsFlagged REGRESSIONINCONCLUSIVEMedian estimated change when flagged
6011.5%88.5%-15.0 points
20029.5%70.0%-9.0 points
80076.0%24.0%-5.6 points

With 60 questions the gate flagged the regression in only 11.5% of runs, and when it did, the median estimated drop was 15 points, three times the real one. Only the unlucky samples are large enough to cross the line, so the ones that do are exaggerated. If a small eval tells you a change cost you 15 points, it is likely less. At 800 questions the estimate (5.6 points) is close to the truth.

Step 7: Add a regression gate to your CI

Here is the harness that produced the Step 6 table. evalkit.py is about 120 lines and needs only numpy. It loads a JSONL golden set, grades answers with deterministic graders (exact, contains, regex and tool-call checks), and compares two runs with a paired bootstrap over questions.

python
from evalkit import load_cases, run_eval, gate

cases = load_cases("golden.jsonl")
base = run_eval(baseline_agent, cases, k=1)
cand = run_eval(candidate_agent, cases, k=1)

result = gate(base, cand)
print(result["verdict"], result["note"])
# REGRESSION   -> the 95% interval for the change is entirely below zero
# INCONCLUSIVE -> the interval includes zero: you cannot tell yet
# IMPROVED     -> the interval is entirely above zero
assert result["verdict"] != "REGRESSION"

The important design choice is the middle verdict. An eval that can only say pass or fail will turn noise into decisions. INCONCLUSIVE tells the team the set is too small for this question, and the note prints how many questions a 5-point check needs.

The pack also has 22 pytest tests covering the interval maths, each grader, seeded reproducibility, the paired comparison and the gate verdicts. One test checks that the article's coverage numbers match the code.

How to choose your eval size

The smallest regression you care aboutQuestions to aim forIf you cannot reach that
10 pointsabout 200 to 230A 100-question set is borderline
7 pointsabout 400 to 450Treat results as a warning, not a verdict
5 pointsabout 600 to 860Report the interval, never just the score
3 pointsabout 2,300Pool several releases or use a larger shared set

If you cannot grow the set, you still have options: add questions where failures cluster, report INCONCLUSIVE honestly, and prefer big, obvious wins over small ones. For retrieval evals specifically, my RAG chunk size test used a 32-question set and a paired bootstrap for exactly this reason, and the hybrid search comparison also states its limits. If you are still building the pipeline that you will evaluate, start with the production RAG pipeline architecture guide.

Hamel Husain's evals FAQ gives a practical starting point: review at least 100 traces, and for an LLM judge label 100 to 200 examples per failure mode. That is a good way to start building the set, and the numbers above tell you how much it can prove.

Common mistakes with LLM eval sample size

  1. Sizing the set by "what we had lying around". Choose the regression size first, then the number of questions.
  2. Reporting a score with no interval. Add a Wilson interval. It takes four lines.
  3. Using the normal interval near 100%. At 95% true pass rate and 20 questions it is zero-width more than a third of the time.
  4. Treating any drop as a regression. It fired in about half of no-change runs.
  5. Re-running until the score looks better. The run-to-run noise in Step 2 makes this easy to do by accident.
  6. Comparing two intervals by eye. Overlap tests miss real regressions. Compare per-question differences.
  7. Trusting a big drop from a small set. The estimate is inflated by the winner's curse.
  8. Counting related questions as independent. If ten questions come from one document, you effectively have fewer than ten. Miller's paper recommends clustered standard errors for this case.

What this test does not prove

This is a simulation, not a measurement of a real model, and the details matter.

  • No LLM was called. Real agents have their own failure patterns, and the Beta model of question difficulty is an assumption. I tested two other levels of unevenness in Step 5, not real data.
  • Pass/fail only. Rubric scores, LLM-as-judge noise and continuous metrics add variance I did not model.
  • Independent questions. I did not model clusters or duplicates.
  • One baseline. Every power number assumes an 80% starting pass rate. A 95% baseline needs different sizes.
  • Paired sample-size column is coarse. It uses a grid of sizes, so treat it as a rough range.
  • Production traffic is not i.i.d. Real users do not sample questions uniformly from your golden set.

If you re-run my code and get a different shape, tell me. I would rather correct this post than keep a wrong number.

How to reproduce

bash
unzip evalsize_pack.zip && cd evalsize_pack
pip install numpy scipy pytest
python sim.py            # about 5 seconds, writes results.json
python demo.py           # one run on 60 / 200 / 800 questions
python demo.py sweep     # 200 golden sets per size, writes sweep.json
python -m pytest -q      # 22 tests

I ran sim.py twice and the two results.json files were byte-identical, so your output should match the tables above.

FAQ

What is a good LLM eval sample size?

It depends on the smallest regression you need to catch. For a pass/fail eval at an 80% baseline, about 200 to 230 questions catch a 10-point drop, 600 to 860 catch a 5-point drop, and about 2,300 catch a 3-point drop, each at 80% power.

How many test cases do I need for a ±5 point margin of error?

At an 80% pass rate you need about 246 questions for a 95% interval of roughly ±5 points, and about 683 for ±3 points, using the standard formula. Use a Wilson interval when you have fewer than a few hundred.

Is 100 test cases enough for an LLM eval?

It is enough to start finding failures and to see large changes of about 15 points or more. It is not enough to detect a 5-point regression: in my simulation the paired test caught it only 26% of the time.

What is the Wilson interval, and why use it for LLM evals?

The Wilson score interval is a confidence interval for a pass rate that stays valid at small sample sizes and near 0% or 100%. The normal interval can become zero width or fall outside 0 to 1 in those cases, which is why papers on small LLM benchmarks recommend Wilson or Bayesian alternatives.

Should I compare two model versions with a paired test?

Yes. Run both on the same questions and test the per-question differences. In my simulation it raised detection power at 400 questions from 52% to 64% when questions were very uneven, and gave no gain when they were not.

Why does the same eval give different scores each run?

Each answer is a random draw, so a score is a noisy estimate. At 100 questions and an 80% pass rate, my simulated identical runs had a standard deviation of about 4 points, and 5% of pairs differed by 9 points or more.

How do I stop small evals from exaggerating regressions?

Report the interval, not just the point estimate, and treat a large drop from a small set as an upper estimate. In my sweep, a 60-question set that flagged a regression reported a median drop of 15 points when the real drop was about 5.

Sources

NEXT IN SERIES

RAG Chunk Size: What I Measured on 16,000 Words of Runbooks

I tested 18 RAG chunk size setups on 16,000 words of runbooks and compared the results with four published studies. Full code, confidence intervals and a practical default.

Continue Reading