Eval Discipline: Matching Checks to Case Difficulty
In AI engineering, the eval set is the specification: a collection of input-output pairs, sometimes with rubrics, that defines what good performance looks like, and it is the source of truth.
A Demo That Looked Right
A project often begins with a clear picture of what to build. The harder question comes next: how will you know that what you built actually works? In AI engineering, the answer is an artifact called the eval set. This article argues that the eval set is not a formality added at the end of a project. It is the thing that decides whether the project succeeded.
What do you think happens?
A team demonstrates its system to a stakeholder and the demo looks impressive. The team then runs the system against its eval set for the first time. What do you think happens?
Reveal answer
The system fails the eval set.
A demo shows a few cases chosen to look good. The eval set is the structured measure of performance, so a convincing demo does not guarantee a passing eval run. The source describes exactly this scenario: the demo looks impressive, and then the first eval run fails.
The gap between a persuasive demo and a failed eval run is the reason eval discipline exists. Before this article moves on, keep one question in mind: what does the system have to be measured against, and who decided what that measure is?
The Specification in Conventional Software
In traditional software development, the specification is a document. It describes what the system is supposed to do, what inputs it takes, what outputs it produces, and what edge cases it has to handle. Engineers read the specification and write code that satisfies it. Tests then check that the code matches the specification. In this arrangement, the specification is the source of truth.
Trace the flow step by step. The specification is written first, in prose. The code is written to satisfy that prose. The tests check the code against the prose. Whatever defines correctness sits in a written description, and everything downstream is judged against it.
The Eval Set Replaces the Document
In AI engineering, the specification is the evaluation set. The model plays the role of the implementation, and the implementation is judged against the eval set. The eval set is the source of truth. This may sound like a small change, but it inverts the engineering process. The thing that defines correctness moves from a description written in prose to a collection of concrete examples that the system is measured against.
Read the two columns as a parallel. In the left column, a written description is the source of truth and code is the thing being checked. In the right column, concrete examples are the source of truth and the model is the thing being checked. The change is not cosmetic. Correctness is now defined by examples, so the quality of those examples determines what counts as correct.
Anatomy of an Eval Case
An eval set is a collection of input-output pairs, sometimes with rubrics, that defines what good performance looks like. Each pair pairs an input the system will receive with an expected output. A rubric is an optional set of criteria for judging a response when a direct match with the expected output is not the right test.
Notice the hierarchy. The eval set is a collection, each case is one pair, and the input and expected output are the core of every case. The rubric is not required for every case. It appears when the right judgment is about qualities of a response rather than an exact match.
A Worked Eval Case
Turning a Policy Question into Eval Cases
A team is building a support assistant that answers questions about a hypothetical returns policy: items may be returned within 30 days, and sale items are final. The team needs to write eval cases that define good performance for this assistant.
- 1Start from what the customer needs
The eval set should reflect what the customer actually needs, not only the scenarios the demo showed. Customers ask about the policy in many phrasings, including edge cases such as sale items.
- 2Write the input and expected output
One case might pair the input Can I return a sale item? with an expected output stating that sale items are final. A second case might pair an ordinary return question with an expected output stating the 30-day window.
- 3Add a rubric where a match is not enough
A reply to a more open-ended question, such as one asking how to explain the policy kindly, may be better judged against criteria like accuracy and tone than against one exact string.
- 4Check coverage against the customer's real questions
If the set contains only the easy questions, the eval set is silent on the cases the customer cares about most. Coverage is judged by the customer's needs, not by how many cases were written.
The eval set now defines good performance for this assistant through concrete cases, including an edge case the demo never showed. The cases are the specification the system will be measured against.
Why a Passing Eval Set Still Fails
The eval set can fail in two directions. If it tests for things the customer does not care about, effort goes into the wrong checks. If it omits things the customer does care about, the checks are silent on exactly the behavior that matters most. In either case the eval set is wrong or incomplete, and the consequence is the same: a system that passes a poor eval set will still fail in production.
The downstream pattern is predictable. The system ships, performs unevenly in production, and the team spends months debugging in production what should have been caught during validation. Because the eval set decides whether validation succeeds, and validation decides whether the engagement succeeds, an eval set that misses real cases undermines the whole project. The reverse is also part of the rule: a system that fails the evals on its first run is not yet ready to ship.
Mistakes That Hollow Out an Eval Set
Common mistake Skipping the eval set to get to implementation faster
Why it failsThe eval set feels like overhead, but it is the artifact that defines correctness. Without it, nothing measures whether the build works.
Do this insteadTreat building the eval set as core project work, since it is the highest-leverage and most underestimated activity in an AI engagement.
Common mistake Treating the eval set as a check-the-box exercise
Why it failsA quickly written set of easy cases passes easily and gives false confidence about the hard cases.
Do this insteadChoose cases that reflect what the customer needs, including cases the demo never showed.
Common mistake Measuring things the customer does not care about
Why it failsEffort goes into the wrong checks, and the behavior that matters is left untested.
Do this insteadAnchor each case to a real customer need, not to what is easy to write.
Common mistake Using a single exact-match check for every case
Why it failsSome cases are gray, and a direct comparison is not enough to judge them.
Do this insteadMatch the check to the case difficulty, using the three-level ladder described in the next section.
The Three-Level Ladder
Once the eval set exists, the team still has to decide how each case will be checked. The course presents a three-level ladder for eval discipline, and each level matches a different kind of case. Follow a case through the ladder below. Start at the top of the flow with an incoming case and ask the question at each decision point.
Read the flow as a routing rule. The simplest check is tried first, because it is the cheapest and most direct. Only the cases that check cannot settle move on. Each level is defined by the kind of case it handles, so the ladder is less a sequence of steps than a match between case difficulty and check depth.
Before reading the subsections, predict which level should judge a case where the correct answer is a single exact value that the system either produces or does not.
Hints
- Ask whether the correct output can be checked directly.
- The lowest level of the ladder is for cases where direct checking is possible.
Routing Cases in Practice
A support assistant is asked to explain its returns policy in a friendly way. A second eval case asks whether a specific item bought on sale is returnable. For each case, name the ladder level that should judge it and explain why, using the difference between direct checking and gray judgment.
Hints
- The sale-item question has one correct answer that can be checked directly.
- The friendly-explanation case asks about qualities of a response, so a direct comparison is not enough.
Key Takeaways
- In AI engineering the eval set is the specification: a collection of input-output pairs, sometimes with rubrics, that defines good performance and serves as the source of truth.
- The eval set decides whether validation succeeds and validation decides whether the engagement succeeds, so a wrong or incomplete eval set undermines the whole project.
- A system that passes a poor or incomplete eval set can still fail in production, because a pass only certifies the cases the set contains.
- The three-level ladder matches check depth to case difficulty: assertion-style tests for easy cases, LLM-as-judge checks for gray cases, and human review for the hardest cases.