A large language model does not give the same output twice, and there is often more than one acceptable answer. That makes AI features hard to test with traditional methods. Many teams respond by testing a handful of examples by hand, deciding it looks good, and shipping. Then quality drifts and nobody notices until users complain.
The fix is an evaluation suite: a structured, repeatable way to measure whether an AI feature does its job.
Start with the definition of good
Before building anything, agree with the business owner:
- What task the feature performs
- What a good output looks like, with examples
- What an unacceptable output looks like
- What error rate is tolerable, and for which kinds of errors
Some errors matter more than others. A summarizer that misses a minor detail is different from one that invents a fact.
Build the evaluation set
An evaluation set is a collection of realistic inputs with expected outputs or grading criteria.
- Collect real inputs, from logs, tickets or documents, covering common cases, edge cases and known difficult cases.
- Write expected outcomes with domain experts. For open-ended tasks, write grading criteria rather than exact answers.
- Include adversarial cases, such as attempts to make the system ignore instructions or reveal data.
- Review and version it. The evaluation set is a key asset; treat it like code.
Choose how to score
| Method | Good for | Watch out for |
|---|---|---|
| Exact or rule-based checks | Structured outputs, extraction | Too rigid for open-ended text |
| Model-graded scoring | Scale, open-ended outputs | Must be calibrated against human judgment |
| Human review | High-stakes or subtle quality | Slow and costly, so sample wisely |
Most teams combine all three: automated checks for every run, model-graded scoring for breadth, and human review of samples to keep the automated scores honest.
Set release thresholds
Decide in advance what scores a release needs, for example a minimum accuracy on the full set and zero failures on safety-critical cases. Writing thresholds down before seeing results prevents the temptation to lower the bar.
Run it on every change
Prompt edits, model upgrades, retrieval changes and new source data can all shift behavior. Run the evaluation suite in the pipeline so every change shows its effect before it ships.
Keep evaluating in production
- Sample real interactions for human review
- Collect user feedback with simple controls
- Watch for drift in scores, refusals and complaints
- Add new failure cases to the evaluation set
When to say no
Sometimes the right answer is not to release. If a feature cannot meet its thresholds, options include narrowing its scope, adding human review, improving the data or choosing a different approach altogether. Shipping an AI feature that users cannot trust costs more than waiting.
The evaluation suite is how you know an AI feature works. Without one, you are relying on hope.