Agent Engineering

Eval Harness

Also known as: LLM evals, evaluation suite

Definition

An eval harness is the automated test suite for a non-deterministic system: a fixed dataset of inputs, a scoring method per case, and a scoreboard run on every change. It is what turns prompt and model changes from vibes into a measurable regression signal.

Last reviewed · Part of the Architecture Glossary

In practice

Scoring methods, cheapest and most reliable first:

MethodUse forCaveat
Exact match / regexExtraction, classification, JSON fieldsOnly for deterministic outputs
Programmatic assertionSchema validity, tool called, code compilesCheap, deterministic, underused
Retrieval metricsrecall@k, MRRIsolates the retrieval half
LLM-as-judgeOpen-ended quality, faithfulnessNeeds its own calibration against human labels
Human reviewThe final arbiterExpensive; reserve for the judge's calibration set

Build the dataset from production failures. Every bug report becomes a case; the suite grows into a map of exactly how your system fails. Fifty real cases beat a thousand synthetic ones.

Report per-category pass rates rather than one aggregate. A change that lifts the mean while breaking every date-arithmetic case is a regression the average hides.

When it matters

Before the second prompt change, and certainly before any model upgrade — the harness is what makes "should we move to the new model" a one-hour question instead of a quarter-long argument.

Common mistake

Running evals manually before releases. If it is not in CI with a threshold, it decays into a script nobody has run since the person who wrote it changed teams.

See also

Go deeper