What Is an LLM Eval? Testing Model Outputs Explained
An LLM eval is a structured test suite that scores a model's outputs against a standard, letting you compare models and catch regressions systematically.
An eval — short for evaluation — is a structured test suite that scores a language model’s outputs against a defined standard, so teams can compare models, catch regressions after a prompt or model change, and decide whether a system is actually good enough to ship. Where traditional software testing checks for an exact expected output, evals have to grapple with a harder problem: a large language model’s response is open-ended text, and “correct” often has more than one valid form.
Why evals matter
Iterating on a prompt or swapping a model version by eyeballing a handful of outputs feels productive, but it doesn’t scale and it doesn’t catch regressions. A prompt tweak that improves one example can silently break ten others. Evals replace that guesswork with a repeatable, scored process: run the same set of inputs through the system, score every output the same way, and track the aggregate score over time. That turns “this feels better” into a number you can compare across versions.
Types of evals
Reference-based evals compare the model’s output against a known-correct answer. This works well for tasks with a single right answer — classification, extraction, translation of a specific term — using exact match or a similarity score. It works poorly for open-ended generation, where there are many acceptable phrasings of a good answer.
LLM-as-judge evals use a second model call to grade the first model’s output against a rubric — checking things like factual accuracy, tone, or whether the response followed instructions. This scales far better than reference-based scoring for open-ended tasks, but it inherits the judge model’s own blind spots and can show a bias toward outputs that resemble its own writing style.
Human evals put a person in the loop to rate or compare outputs directly. They’re the gold standard for subjective quality but are slow and expensive, which usually limits them to periodic spot checks or final validation rather than every iteration.
Task-based (functional) evals skip judging the text itself and instead check whether the model accomplished something verifiable — did the generated code pass its test suite, did the agent complete the multi-step task, did the SQL query return the right rows. These are the most objective evals available whenever the task has a checkable outcome.
Building an eval set
A useful eval set isn’t just a handful of easy examples the model is already good at. It needs:
- Representative cases — inputs that mirror what real users actually send, not synthetic examples that are easier to score.
- Edge cases — ambiguous inputs, missing information, boundary conditions that break naive implementations.
- Adversarial cases — inputs designed to elicit failure modes, including attempts at prompt injection if the system accepts untrusted input.
- Enough volume to be statistically meaningful — a handful of examples can swing wildly between runs; a larger, stable set gives a score you can actually trust run over run.
LLM-as-judge pitfalls
Using a model to grade another model’s output is convenient but introduces its own failure modes. Judges tend to favor longer, more confident-sounding answers regardless of accuracy. A judge from the same model family as the one being graded can show self-preference bias, scoring its own family’s outputs more favorably. And a judge is still a language model, so it can be fooled the same way the model under test can — including by hallucinated but fluent-sounding justifications for a wrong score. Mitigations include using a different, stronger model as the judge, giving the judge a precise rubric rather than an open-ended “is this good” prompt, and periodically validating a sample of judge scores against human ratings.
Where evals fit in the workflow
Evals show up at several points in an LLM-powered system’s lifecycle: validating that fine-tuning actually improved the target task rather than just memorizing the training set, comparing a reasoning model against a faster non-reasoning one to see if the accuracy gain justifies the added latency and cost, checking whether a change to a retrieval-augmented generation pipeline improved answer grounding, and running as a regression gate in CI so a prompt change can’t ship if it silently degrades quality on the eval set. Cost is part of that tradeoff too — a heavier prompting strategy like extensive chain-of-thought reasoning can improve eval scores while multiplying token spend, which is worth checking against a token cost calculator before deciding it’s worth shipping.
Reference-based vs LLM-as-judge vs human eval
| Reference-based | LLM-as-judge | Human eval | |
|---|---|---|---|
| Best for | Single-answer tasks | Open-ended, subjective quality | Final validation, nuanced judgment |
| Speed | Fast, cheap | Fast, moderate cost | Slow, expensive |
| Consistency | Perfectly consistent | Can drift, shows bias | Varies between raters |
| Scales to large sets | Yes | Yes | Difficult |
The takeaway
An eval is what turns “this output looks better” into a repeatable, comparable score. Reference-based scoring works for tasks with a single right answer; LLM-as-judge scales to open-ended quality but needs a tight rubric and awareness of its biases; task-based evals are the most objective option whenever the outcome is directly checkable; and human evals remain the standard for final, subjective calls. A good eval set covers representative, edge, and adversarial cases in enough volume to trust the score — without one, every model swap or prompt change is a guess.
Tagged
Keep reading
Chisato · · 5 min read What Is Catastrophic Forgetting in AI Fine-Tuning?
Catastrophic forgetting is when training a model on new data erases skills it already had. Why it happens during fine-tuning, and how teams work around it.
Chisato · · 4 min read What Is DPO? Direct Preference Optimization Explained
DPO tunes a language model on human preference data directly, without training a separate reward model or running reinforcement learning.
Chisato · · 4 min read What Is Constitutional AI? Training Models on Principles
Constitutional AI trains language models to critique and revise their own outputs against a written set of principles, reducing reliance on human labels.