LLM Evaluation Design: From Task to Regression Suite
How to design an LLM evaluation: task-grounded eval sets, grader choice, sampling variance, and the contamination traps that mislead benchmark scores.
A public benchmark score tells you how a model ranks against other models on someone else’s task. It rarely tells you whether the model will work for yours. Building your own evaluation is the only way to answer that, and most of the difficulty is in design rather than in tooling.
Start from the failure you care about
Before writing any harness, define the specific behaviour you are trying to measure and what a failure looks like in production. An eval that produces a single aggregate score across mixed capabilities hides exactly the information you need. Break the task into categories that fail for different reasons, for example retrieval misses, formatting violations, refusals, and factual errors, and report each separately.
Build the set from real inputs where you can. Synthetic cases generated by a model tend to cluster around what that model finds natural, which systematically misses the inputs that break things.
Choosing a grader
Graders fall into three broad classes.
Programmatic graders check something exactly: does the output parse as valid JSON, does the code compile and pass unit tests, does the extracted field match the reference string. These are cheap, deterministic and reproducible. Use them wherever the task allows.
Model graders use a language model to judge an output against a rubric. They handle open ended tasks that no assertion can check, but they inherit the judge model’s biases. Known effects include favouring longer answers, favouring answers stylistically similar to the judge’s own outputs, and position bias when comparing two candidates. Randomise the order of candidates, keep rubrics concrete and testable, and validate the judge against human labels on a sample before trusting it at scale. Each of those biases has a published detection method and a specific fix, set out in the guide to detecting and correcting LLM-as-a-judge bias.
Human grading remains the reference standard for subjective quality. It is slow and expensive, so use it to calibrate the automated graders rather than to run the whole suite.
Sampling, variance and pass@k
Generation is stochastic, so a single sample per prompt gives a noisy estimate. Pass@k measures the probability that at least one of k samples is correct. It is the right metric when a downstream system can filter or verify candidates, for example running generated code against tests. It is the wrong metric when the user sees only one answer, in which case the single sample success rate is what matters.
Report uncertainty. Two models differing by a small margin on a small eval set may not be distinguishable at all. Confidence intervals on the score, and holding decoding parameters fixed across compared runs, are what keep an eval from producing conclusions the data does not support. The Pass@k and evaluation cost calculator gives the generation count, the token spend and the worst-case margin of error for a given set size and k, which is the quickest way to check whether a planned run can resolve the difference you care about.
Contamination and overfitting
Public benchmark items appear in training data. When a model scores unusually well on a well known set relative to how it behaves on fresh problems of the same difficulty, contamination is the first explanation to check. Keeping a private held out set that has never been published anywhere is the practical defence. This applies most strongly to the oldest and most republished suites, which is one of several reasons a headline number from them should be read carefully; what each one contains and how it is scored is covered in LLM benchmarks explained.
The equivalent problem in your own work is tuning prompts against the test set. Once you have iterated on the same examples repeatedly, the score reflects your fitting rather than the model’s capability. Keep a development set for iteration and a separate test set touched only for final measurement.
Making it a regression suite
An eval that runs once is a report. An eval that runs on every prompt change, model version and retrieval configuration is infrastructure. Version the dataset, pin the grader, log per item outputs rather than only the aggregate, and diff item level results between runs. Most real regressions show up as a handful of newly failing items, which an aggregate score can easily hide.
The runner is the easy part of that. Declarative harnesses fit continuous integration, benchmark harnesses fit model selection, and retrieval pipelines need metrics that separate the retriever from the generator; the trade-offs are laid out in LLM eval frameworks compared.
Common mistakes
Evaluating on a set too small to detect the differences you care about. Grading with the same model that produced the outputs. Mixing capability categories into one number. Changing the dataset and the model at the same time, which makes the comparison meaningless.
Sources
Related
LLM-as-a-Judge Bias: How to Detect and Correct It
Position, verbosity and self-preference bias in model graders, how to measure judge agreement against humans, and the calibration steps that reduce each.
LLM Benchmarks Explained: MMLU, HumanEval, GSM8K
What MMLU, HumanEval and GSM8K actually contain, how each score is computed, and the point where a headline benchmark number stops being useful.
LLM Eval Frameworks Compared: Pick the Right One
A comparison of lm-evaluation-harness, OpenAI Evals, HELM, Inspect, promptfoo, DeepEval and Ragas, with the task shapes each harness actually fits.