Answers · Putting a model into service
How many cases do I need before the evaluation can even see a small improvement?
In shortAbout four hundred cases per set can see only a six-point move; a two-point improvement needs roughly four thousand two hundred per set.
A set of about four hundred cases can only see a difference of roughly six and a half points between two independently measured scores. If a two-point improvement matters, the arithmetic asks for roughly four thousand two hundred cases in each set.
The arithmetic
Take a score near 70 per cent, so , and . The standard error on one score is , which is 2.3 percentage points. Two independent scores each carry that error, and the errors combine rather than cancel: points on the difference. The smallest difference worth claiming is about twice its error, so points. A three-point move sits inside that, which is why it is not a small result but no result.
For a three-point target, , so about 1,900 cases per set. For a two-point target, , so about 4,200 cases per set. A one-point target needs cases per set. The square is the whole cost: halving the detectable difference takes four times the cases, and going from 6.5 points down to 2 points takes about ten and a half times as many.
| cases per set | error on one score | error on the difference | smallest difference worth claiming |
|---|---|---|---|
| 100 | 4.6 | 6.5 | 13.0 |
| 400 | 2.3 | 3.2 | 6.5 |
| 1000 | 1.4 | 2.1 | 4.1 |
| 4000 | 0.7 | 1.0 | 2.1 |
The gut-chosen set
The natural guess is that the evaluation either sees an improvement or does not, and that a disappointing run is bad luck. The set size fixed the resolution before the run. With 400 cases, every difference below 6.5 points is below the resolution, so reporting a three-point move as a small win is the mistake. The other common guess is that the error on a difference is the error on one score. It is not: two independent errors add in quadrature, which makes the difference error larger than either one by a factor of about 1.4. That is why a 400-case comparison cannot honestly separate 71 per cent from 74 per cent.
Where it changes
The calculation assumes two independent sets and a score near the middle of the range. A score near 50 per cent is the worst case, because is largest there: at 400 cases the error on one score is 2.5 points and the smallest claimable difference is about 7.1 points. A score near 95 per cent is measured more precisely, because is much smaller, so 400 cases resolve a smaller difference. If both versions are run on the same cases and compared case by case, the shared variation drops out and the curve is nearer , so 400 cases can resolve under three points rather than six and a half. The number of cases is therefore not a fixed property of an evaluation. It is a property of the comparison being made.
A dashboard makes the same arithmetic repeat across many numbers. If each score has a one in twenty chance of moving enough to look like a finding, then twenty numbers produce about one apparent finding per look even when nothing changed. Decide the primary number in advance, publish the smallest difference that set can detect next to it, and treat surprises from secondary numbers as candidates for a second run on fresh cases rather than as results.
Worth keeping
- At 400 cases and a score near 70 per cent, the standard error on one score is about 2.3 points, the error on a difference between two independent scores is about 3.3 points, and the smallest difference worth claiming is about 6.5 points.
- To detect a difference of two points with two independent sets of that kind takes roughly 4,200 cases per set.
- Running both versions on the same cases removes shared variation, so the same 400 cases can resolve under three points instead of six and a half.
Where this goes next
This question is one step of Judging a System, Not a Model, a course that works through its subject from the beginning. The page that teaches this part of it is Is That a Real Improvement, and it reads the whole way through whether or not you have an account.
What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.
Read that pageThe whole courseOther questions people ask about this
- Why do the numbers look good while users keep complaining?Because the score measures a fixed set of cases with a fixed rule, and the users are living through behaviour that the set and the rule never covered.
- My score went up two points — is that a real improvement or just noise?No. At four hundred cases a two point gain is inside the noise, so treat it as no result.
- Should my evaluation cases be real user queries or ones I write myself?Use real user queries, sampled by behaviour rather than at random, plus a held-out part nobody tunes on. Cases you invent measure what you imagined users ask.
- How small can my test set be and still catch a regression before a user does?About sixty auto-checked cases, run in two minutes on every change, blocking only on outright failures such as a case that used to pass now failing, never on a fall in the overall score.
- Why does the model return JSON wrapped in extra text when I asked for JSON?A request for JSON does not force the model to return only JSON, so you need to validate the reply and repair it once rather than assume it will parse.
- How do I make the model answer from the documents I give it instead of its own memory?Fence the documents as labelled reference material, put them before the question, tell the model to prefer them over memory, and require a passage number for each claim.