How many eval cases before you trust a prompt change? Simulated numbers
A prompt that truly passes 85% against one that passes 80%: on 30 test cases the better one scored higher only 63% of the time, and the worse one was ahead 25% of the time. The intervals and the simulation behind that.
Prakhar
Backend engineer · PressentifyPublished

You change a prompt, run your 30 test cases, and the score goes from 80% to 87%. Do you ship it? A small test set gives noisy scores, and noise looks exactly like improvement when you only look at one run. Here is how big the noise is, computed two ways, so you can decide how many cases you need.
A score is an estimate, not a fact
If a prompt truly passes 90% of the kinds of requests you care about, a run of 30 cases will not report exactly 90% every time. It will report 27 out of 30 often, and 25 or 29 not rarely. What you want to know is the range the true pass rate could plausibly be in. For pass or fail counts a standard answer is the Wilson score interval, which behaves better than the textbook one when the sample is small or the rate is near 100%.
import math
def wilson(k, n, z=1.96): # 95% interval for k passes out of n
p = k / n
d = 1 + z * z / n
c = (p + z * z / (2 * n)) / d
m = z * math.sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / d
return c - m, c + m
wilson(27, 30) # (0.743, 0.966): 74% to 97%Here is the 95% interval around an observed 90% pass rate for different test set sizes:
n= 20: 70% to 97% (width 27 points)
n= 30: 74% to 97% (width 22 points)
n= 50: 79% to 96% (width 17 points)
n= 100: 83% to 94% (width 12 points)
n= 200: 85% to 93% (width 8 points)
n= 500: 87% to 92% (width 5 points)
n=1000: 88% to 92% (width 4 points)
How often the better prompt wins
The interval says how well you know one number. The question you actually face is comparing two prompts. We simulated a case where prompt B is truly better: it passes 85% and prompt A passes 80%. We scored each on its own set of n fresh cases, 40,000 times for each size, and counted how often B scored higher.
import random
rnd = random.Random(1)
n, trials = 30, 40_000
wins = ties = 0
for _ in range(trials):
a = sum(rnd.random() < 0.80 for _ in range(n)) # prompt A truly passes 80%
b = sum(rnd.random() < 0.85 for _ in range(n)) # prompt B truly passes 85%
wins += b > a; ties += b == a| Cases per prompt | B scores higher | Tied | A scores higher |
|---|---|---|---|
| 20 | 58% | 16% | 26% |
| 30 | 63% | 12% | 25% |
| 50 | 70% | 8% | 21% |
| 100 | 80% | 5% | 15% |
| 200 | 89% | 2% | 8% |
| 500 | 98% | 0% | 2% |

That last column is the one to read twice. At 30 cases, a quarter of the time you would see the worse prompt win and might ship it. The better prompt wins clearly (more than 4 times in 5) only from 100 cases up.
Limits of this simulation
What to do with this
- Report a score with its interval, not alone: “27 of 30 (74% to 97%)” tells a different story than “90%”.
- Decide before the run what difference matters. By our table a five-point change needs a few hundred cases to show reliably; a much bigger change is easier to see with fewer, though we did not simulate that.
- Score old and new on the same cases, and read the cases that changed. A prompt that fixes 6 and breaks 4 is not the same as one that fixes 2 and breaks 0.
- Keep a growing set. Add every real failure you meet to it, so the set gets bigger where it matters.
- Do not tune the prompt against the same cases you then report on. Keep some cases back.
Sources & Credits
- Edwin B. Wilson, “Probable Inference, the Law of Succession, and Statistical Inference,” Journal of the American Statistical Association, 1927, the source of the Wilson interval.
- “Binomial proportion confidence interval,” Wikipedia, for the formula: en.wikipedia.org
- “McNemar’s test,” Wikipedia: en.wikipedia.org
The intervals, the simulation, the tables and the charts are our own work (Python 3, 40,000 trials per row, seed 1, run on 17 November 2026). The prompts and the 80% and 85% pass rates are made up to show the effect; they are not from a real system. Last verified 2026-11-17. Spotted a mistake? Tell us and we will correct it here with the date.
Share this article
Written by
Prakhar
Backend engineer · Pressentify
Backend engineer building Pressentify — interactive cheatsheets, handbooks and a job-hunt workspace.
Get the next one in your inbox
One practical backend article at a time. No spam; unsubscribe in one click.
Keep reading

Prompt caching break-even: it pays on the second request, if you stay inside the cache lifetime
Using the multipliers in Anthropic's prompt caching docs (read on 17 November 2026): a 5-minute cache write costs 1.25x, reads 0.1x or less. The arithmetic shows caching wins from request two, and loses 25% if the cache keeps expiring.
17 Nov · 3 min

ChainDrop: how the self-propagating npm worm steals tokens and republishes itself
A Shai-Hulud-family worm turns one stolen npm token into poisoned releases of every package that publisher controls. What the advisories say, and what rotation and allowlisting limit.
· 6 min

Consistent hashing, measured: how many keys move when you add a node
Adding an 11th node to a hash(key) % N cluster moved 90.7% of 100,000 keys in our test; a consistent-hash ring moved about 9%. What virtual nodes change, and what they cost.
17 Nov · 4 min