A temperature-0 eval score is still just one sample
Run the eval five times and report a 95% confidence interval with a plain Python script you can build in an afternoon, so one unlucky 79% never misleads a client.
In brief
- Differences in hardware, batching and API behavior can make the same input produce different outputs. A single eval run is therefore not enough to report a score.
- 200 questions run 5 times are not 1,000 independent observations. Average per question first and then compute the error, or resample whole clusters.
- When comparing two systems on the same questions, use paired differences. If the confidence interval of the difference contains zero, neither side can be declared the winner.
Run a client’s 200-question eval five times in a row without changing a line of code, and you might get 81%, 84%, 79%, 83% and 82%. Run it once, land on the 79%, and you may end up telling the client the system is “not yet at 80%”.
Those numbers are hypothetical, but the phenomenon is real. Engineers at Indeed have documented that even at temperature 0, differences in hardware, batching and API behavior can still make the same input produce different outputs. A single run is one sample. It does not yet count as a measurement.
For an FDE, this is a matter of credibility. Clients decide whether to go live or buy more based on the number you report. This guide walks through six steps you can do on a laptop in an afternoon: run the eval five times, measure the noise, then report the score with a confidence interval.
What you will build, and what you need
The end result is a plain Python script that uses only the standard library. It reads the results of repeated runs and prints three things: the mean score with a 95% confidence interval, a confidence interval computed by cluster bootstrap, and the paired difference between a new model and the baseline.
You need an existing eval set in which each question is graded 0 or 1, or with a continuous score. You also need a function that calls your system and somewhere to store results as JSONL. The code below is a trimmed-down version for illustration, so you will need to wire it into your real harness.
Steps 1–2: hold everything fixed, then repeat
OneUptime recommends holding fixed everything that can be measured independently and repeating only the random part. In practice, that means locking the prompt version, the dataset, the model version and the grader. If you change the grader between runs, you are measuring two things at once and can no longer isolate the noise.
Next come the repeated runs. Anthropic, in its statistical guidance for evals, recommends resampling answers from the same model several times to reduce variance. Indeed suggests k=3 or k=5 runs per input if the budget allows.
import json
# run_eval is your function: call the system, grade it, return 0/1
with open("runs.jsonl", "w") as f:
for run in range(5):
for q in questions:
score = run_eval(q)
f.write(json.dumps({"qid": q["id"], "run": run, "score": score}) + "\n")
Check: the file must have exactly N × 5 lines, and each qid must appear exactly 5 times. Missing lines usually mean a timeout error was silently swallowed. Errors like that skew the score without anyone noticing.
Step 3: why 1,000 rows are not 1,000 observations
This is the most common mistake. According to Indeed, repeated-run data has a structure of N independent inputs, each with k correlated runs. Five answers to the same hard question tend to be wrong together. Treat them as five independent observations and the confidence interval comes out narrower than it really is.
The simplest fix is to average per question first, then compute the error on those N means. Anthropic uses the formula 1.96 × SEM: add and subtract this quantity from the mean to get a 95% confidence interval.
import json, statistics
from collections import defaultdict
by_q = defaultdict(list)
for line in open("runs.jsonl"):
r = json.loads(line)
by_q[r["qid"]].append(r["score"])
q_means = [statistics.mean(v) for v in by_q.values()]
mean = statistics.mean(q_means)
sem = statistics.stdev(q_means) / len(q_means) ** 0.5
print(f"{mean:.3f} CI95: {mean-1.96*sem:.3f} – {mean+1.96*sem:.3f}")
Go back to the example at the top. The mean of the five per-run scores is 81.8%. Because every question ran all 5 times, this matches the mean of the 200 per-question means that the script computes.
The 79–84% spread between runs and the SEM measure different things. The spread tells you how much a single run fluctuates; the SEM tells you how certain the 81.8% mean itself is, given that 200 questions are only a sample of the countless questions a client might ask.
That is why the SEM is computed on the 200 per-question means, as in the sem line of the code, rather than on the 5 per-run scores. Suppose the SEM computed that way is 1.5 percentage points. Then 1.96 × 1.5 = 2.94, and the 95% confidence interval runs from 78.86% to 84.74%.
That is far more informative than a lone 79% or 84%. When several questions share a passage, as in a reading-comprehension set with five questions on the same document, Anthropic recommends clustering by the unit of randomization, for example by passage. In that case, group by passage_id instead of qid.
Step 4: cross-check with a cluster bootstrap
The 1.96 × SEM formula is an approximation. When the eval set is small or scores bunch up near 0% or 100%, cross-check with a bootstrap. Indeed tested five bootstrap strategies and found that resampling whole input clusters achieved the correct nominal coverage in simulation, without being needlessly wide like the alternatives.
“Nominal coverage” here means that an interval labeled 95% actually contains the true value about 95% of the time. The function below takes by_q from step 3, a dict keyed by qid holding the list of scores across runs.
import random, statistics
def cluster_bootstrap(by_q, B=2000, seed=0):
rng = random.Random(seed)
keys = list(by_q)
stats = []
for _ in range(B):
sample = [rng.choice(keys) for _ in keys] # draw whole questions, with all 5 runs
stats.append(statistics.mean(statistics.mean(by_q[k]) for k in sample))
stats.sort()
return stats[int(0.025 * B)], stats[int(0.975 * B)]
Check: the bootstrap interval should be close to the one from step 3. If the two differ a lot, review how you grouped clusters before reporting to anyone.
Step 5: is the new model really better?
Clients rarely ask “what is the score?” They usually ask “is the new version better than the old one?” Anthropic points out that when two models are compared on the same set of questions, the variance coming from question difficulty drops out.
What remains is the variance of the answers. OneUptime also recommends paired differences, because both systems faced the same cases.
In the code below, cand and base are two dicts keyed by qid, each value a list of scores across runs, loaded from the result files of the new model and the baseline exactly as by_q was built in step 3.
diffs = [statistics.mean(cand[q]) - statistics.mean(base[q]) for q in base]
d = statistics.mean(diffs)
se = statistics.stdev(diffs) / len(diffs) ** 0.5
print(f"Δ = {d:.3f} CI95: {d-1.96*se:.3f} – {d+1.96*se:.3f}")
Reading the result is simple. If the confidence interval contains zero, you have no evidence that the new version is better. The thing to tell the client is “we can’t tell them apart yet”. Don’t say “up 1.2 points”.
Step 6: set thresholds afterwards, not up front
Many teams set a CI gate such as “block the release below 80%” on day one. OneUptime argues that thresholds should be set only after a variance study. In the example above, noise moved the score between 79% and 84%. An 80% threshold set before measuring noise will block releases at random.
What if the confidence interval is still too wide? According to Indeed, more runs per input reduce within-input noise and are usually cheaper, but the benefit is limited.
Adding new inputs, on the other hand, keeps narrowing the confidence interval. Anthropic also recommends power analysis to work out in advance how many questions you need. Writing more questions is therefore worth more than a sixth run.
Common mistakes
The easiest mistake is computing the SEM over all N × k rows as if they were independent, which makes the confidence interval look more certain than it is. Next comes letting the grader, prompt or data change between runs.
Also common is comparing two models with two separate confidence intervals instead of a paired difference. That throws away the advantage of both sides running on the same questions.
How this skill shows up at the client
In a client review, the number to report looks like this: “81.8%, 95% confidence interval 78.9% to 84.7%, on 200 questions × 5 runs”. That sentence tells the client how far to trust the number. It also heads off the moment next week when the score “drops” 3 points and you have to explain that it was only noise.
If you are aiming for an FDE role, look for job descriptions that mention “evaluation”, “eval harness” or “model quality”. On your CV, don’t just write “built an eval set”. A more specific line might read: “Ran a 200-question eval × 5 runs, reported scores with 95% confidence intervals, and reset release-blocking thresholds based on measured noise.”
Anyone can run an eval. What clients remember is who reported a number that didn’t need correcting the following week.
Was this article useful?
Thanks for the feedback!