Conventional tests assert that a function returns a specific value. A model returns something different each time, which means the testing approach has to change rather than be abandoned.
What replaces assertions?
A set of representative inputs with known good outcomes, run regularly, with the results reviewed. That is an evaluation set, and building one is the single most useful thing you can do.
How big should it be?
Twenty to fifty cases for most applications. Enough to cover the range and few enough that you will actually rerun them after changes, which is what matters.
What should the cases cover?
- Typical inputs. The common path.
- Edge cases. Where rules conflict.
- Bad input. Missing, malformed, irrelevant.
- Things it should refuse. Outside scope.
- Cases that failed before. To catch regressions.
What can be checked automatically?
Structure, format, presence of required fields, whether a classification matches an expected label. That covers more than people assume, particularly for structured output.
What needs a person?
Quality of generated text. Reading a sample is the only reliable judgement, and a handful of outputs read carefully tells you more than any automated measure of prose.
What about disagreement between reviewers?
Common and informative. Two people scoring the same outputs differently usually means the criteria are vague rather than that one of them is wrong.
Tightening the criteria until reviewers agree is worth the effort, because it also clarifies what you actually want. Vague standards produce vague prompts, and the exercise of making judgement repeatable improves the specification as much as the evaluation.
What about using a model to judge?
Common, useful and not a substitute for reading some yourself. A model scoring outputs against criteria scales well and inherits its own blind spots, so calibrate it against human judgement first.
What about the cases you keep failing?
Worth separating from general quality. An evaluation set where the same three cases fail every time is telling you something specific, and averaging it into an overall score hides it.
Those cases frequently share a property: an unusual format, a missing field, an ambiguous instruction. Identifying what they have in common produces a targeted fix, where a general effort to improve quality does not.
When should you rerun the set?
After prompt changes, before deploying, and when the provider updates a model. That last one matters most, since behaviour can shift without any change on your side.
What should you record?
Outputs, not just pass or fail. Having the previous results is what lets you see how behaviour changed rather than only that it did, which is the useful information.
What about cases you cannot anticipate?
The argument for sampling production traffic. An evaluation set contains what you thought of, and real usage reliably contains inputs nobody would have invented.
Reading twenty real interactions a week is a small habit with a large effect. It surfaces the systematic problems, and the interesting failures become new evaluation cases, which is how the set stays representative rather than becoming historical.
What about comparing models?
The evaluation set makes this straightforward, which is a benefit people do not anticipate. Running the same cases through a cheaper model tells you whether the expensive one is earning its cost.
That question is worth revisiting periodically. Model capability improves and prices change, so a choice made a year ago may now be wrong in either direction, and the set you already have answers it in an afternoon.
What about production monitoring?
Sample real outputs regularly. An evaluation set tests what you anticipated; real traffic contains what you did not, and reading twenty real responses a week surfaces problems nothing else will.
What is the minimum worth doing?
Twenty cases in a file, a script that runs them, and reading the output after every change. That is an afternoon of work and it is the difference between knowing something works and hoping.