Hypothetical scenario. Northwind’s gateway can route a candidate configuration, and Maya likes its fluent policy answers. Dev reports improved evaluation scores. Priya asks whether the same cases contain relevant context, supported claims and a useful answer under the employee’s permissions.
Maya: “The demonstration reads better. Which failures did the change remove?”
Dev: “We can record evidence and task outcomes for each case.”
Priya: “Keep those outcomes together so separate good-looking totals cannot conceal different failures.”
You will separate context relevance, groundedness and answer relevance from end-to-end acceptance. Use the supplied worked comparison to connect a task contract, representative cases and case-level observations before deciding whether to release a candidate.
Which cases actually satisfy the whole answer contract?
Context relevance asks whether supplied passages address the question. Groundedness asks whether the answer's claims are supported by the supplied evidence. Answer relevance asks whether the response addresses what was requested. This commonly used RAG-triad breakdown is useful as a diagnostic vocabulary, not an exhaustive acceptance standard. Permission, freshness and end-to-end task completion remain separate requirements.
Hypothetical scenario. In a chosen ten-case set, eight contexts are relevant, seven answers are supported and nine answers address their questions. These are three marginal counts; they do not show that seven cases pass all three. If the overlap is unknown, do not multiply 0.8 × 0.7 × 0.9 and present it as observed success. Record case-level outcomes and inspect which failure category appears first in the actual evidence path.
Hypothetical scenario. Maya asks whether a new prompt is better; the team has only a few memorable examples.
In short. Label representative tasks before tuning. Separate development cases from release cases.
A better demo is not yet a better service
Hypothetical scenario. A document assistant receives a longer prompt and produces a convincing answer to the question used in its demonstration. On another question it quotes the wrong policy version. The team needs a way to decide whether the change improved the intended task, rather than whether one response sounds more polished.
The earlier lessons established model behavior, evidence retrieval and runtime limits. Evaluation turns those mechanisms into a decision process. It defines the task, acceptable outcomes, representative cases and evidence needed to choose between a baseline and a candidate.
Begin with the smallest useful baseline. For a policy question, a ranked list of eligible excerpts may already help. Generation should justify the additional failure modes and operating cost it introduces. The baseline is a comparison point, not a deliberately weak opponent designed to make the candidate look successful.
Join answer quality with coverage and eligibility
Hypothetical scenario. A release answers more cases but adds unsupported claims. Keep case-level answer disposition, source evidence, permission and task outcome so coverage cannot conceal lower support. Compare baseline and candidate on the same versioned cases.
| Artifact | Concrete evidence | Decision boundary |
|---|---|---|
| Case | identity, cohort, expected behavior | Independent task evidence |
| Outcome | answer/refusal/failure, support, authority | Joined acceptance |
| Version tuple | model, prompt, index, policy | Reconstruct comparison |
Relevance, groundedness and useful completion are different predicates. Declare how they combine and retain missing outcomes. A selected cohort of ten cases with eight answers and six supported answers has 8/10 answer coverage, 6/8 support among answers and 6/10 supported coverage. These denominators answer different questions. Include required rare cohorts and abstentions before examining aggregate scores.
One score can hide the wrong behavior
An overall average can combine unrelated outcomes: correct retrieval, unsupported synthesis, unnecessary refusal and permission violations. A favorable mean does not establish that every required boundary is respected. Define required constraints separately from qualities that can trade against one another.
A lexical overlap measure can reward repeating reference wording without understanding whether the answer identifies the right customer or version. Conversely, a correct paraphrase can use different words. Choose a measurement that reflects the decision; do not use an available metric simply because it returns a number.
A test collection also encodes assumptions about users and sources. Cases copied only from successful demonstrations omit the conditions likely to break the service. Include exact identifiers, ambiguous questions, missing evidence, conflicting versions, access restrictions and multi-step source dependencies where those occur in the intended product.
Write a task contract before a rubric
A task contract names the reader, input, permitted evidence and acceptable output. A rubric then makes judgment concrete. For a bounded policy assistant, require the correct entity and policy version, support for material claims, an eligible citation and an explicit limitation when evidence is inadequate.
Case records should preserve enough context to interpret an answer: source snapshot, access scope, expected behavior and the reason it matters. Some tasks have several acceptable answers. Write the acceptance rule rather than forcing one reference sentence to stand for every valid response.
Keep development examples distinct from held-out review cases. Once a team repeatedly edits prompts against a set, that set becomes development evidence. A nominally hidden file is not a reliable final comparison if its contents have already shaped the candidate.
Apply Evaluation Sets: Building the Test Before You Tune at the acceptance boundary
An evaluation set is a decision instrument, not a collection of examples that merely looks representative. Northwind needs to name the accepted outcome, the evidence required to judge it, and the slices that can block release. Version the task, cases, sources and rubric together so a later comparison does not silently change the question being asked.
Consider a hypothetical set of one hundred requests divided into sixty ordinary questions, twenty policy exceptions, ten missing-evidence questions and ten unauthorized-action requests. These counts total 60 + 20 + 10 + 10 = 100. The expected result is not always an answer: some cases require an abstention or a refusal. Scoring every refusal as failure would encode a different task from the one the service is permitted to perform.
Suppose a candidate improves eight ordinary answers but loses three required exception cases. It changes the aggregate count by 8 − 3 = 5, yet that positive total cannot override a release rule requiring the exception slice to hold. Report the paired changes and inspect their reasons. A mean score alone hides which promise the application stopped keeping.
Keep training examples, prompt-tuning cases and held-out release evidence distinct. Repeatedly choosing changes against the same visible cases can adapt the development process to those cases even without updating model weights. Preserve fresh challenge cases and describe how source revisions or task changes affect the set's continued relevance.
Finally, connect evaluation to an actual action. State the baseline, proposed change, accepted comparison and stopping condition before interpreting the result. A failing case should identify a next investigation: absent evidence, incorrect synthesis, changed permissions, invalid output or an execution problem. This lets the evaluation direct engineering work instead of becoming a score displayed after the release decision has already been made.
Work through a paired comparison
Hypothetical scenario. Choose ten review cases. The baseline meets the full rubric on six, and the candidate on eight. The observed fractions are 6 ÷ 10 = 0.6 and 8 ÷ 10 = 0.8. The difference is 0.8 − 0.6 = 0.2, or 20 percentage points on this constructed collection.
Pairing reveals more. Suppose both systems pass five cases. The candidate fixes three cases the baseline fails, while regressing one that the baseline passes; both fail one. The categories sum to 5 + 3 + 1 + 1 = 10. Baseline passes are 5 + 1 = 6, candidate passes are 5 + 3 = 8, and net improvement is 3 − 1 = 2 cases.
The one regression may be a permission violation while the three fixes improve wording. A blended count cannot decide whether that trade is allowed. Review the changed cases and apply the declared constraint, not only the net gain.
For a separate retrieval example, choose four required eligible passages and retrieve five passages, of which three are relevant under the case labels. Recall is 3 ÷ 4 = 0.75; precision is 3 ÷ 5 = 0.6. These figures concern labeled passage retrieval. They do not establish answer correctness, and the denominator must state whether relevance is assessed at passage or document level.
If the same ten cases are run three times per system, each system produces 10 × 3 = 30 outputs. The repeated outputs help inspect variability, but do not create 30 independent user tasks. Report case coverage and repeated attempts separately.
In the wild: Evaluation Sets: Building the Test Before You Tune
Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena: Model judges have limitations requiring separate evaluation.
Representativeness is a design obligation
A small illustrative set supports explanation and debugging, not a precise population-accuracy claim. Real evaluation needs a sampling rationale, relevant slices and enough evidence for the decision's consequences. Rare high-impact cases may need deliberate coverage rather than hoping they appear in a random sample.
Keep task families visible. A candidate can improve common summary questions while damaging exact policy exceptions. Report counts and denominators for each slice, and distinguish naturally sampled prevalence from deliberately constructed stress cases.
Reference labels can be wrong or underspecified. Review disagreements and revise the rubric with a recorded reason. Do not silently rewrite a reference to make a favored candidate pass. Preserve the earlier result so a rubric change is not mistaken for a model improvement.
The test set leaks into the prompt
Hypothetical scenario. Engineers inspect every failed held-out question and add its answer to the prompt. The next run passes more cases, and the result is described as improved generalization. In fact, the comparison now measures performance on cases used to develop the system.
Retain those cases as regression tests because they still catch known failures. Create a separate review set reflecting the intended task distribution, and document which examples influenced development. A split by random rows may still leak near-duplicate questions or document versions across boundaries.
Keep sensitive source content out of unrestricted evaluation artifacts. Evaluation requires the same permission and retention decisions as serving. A copied production question can contain private information even when its expected answer looks harmless.
Three evaluation misconceptions
“More cases automatically mean better coverage.” Repeating one easy task family increases count without covering missing behaviors.
“The judge produced a score, so the rubric is objective.” The next chapter examines the judge as another fallible measurement component.
“A passing answer proves retrieval worked.” The model may rely on prior knowledge or guess correctly. Inspect the eligible evidence path separately when source support is part of the contract.
Use evaluation to choose an intervention
Use failures to select the next change. Missing eligible evidence suggests ingestion, access filtering or retrieval work. Adequate evidence with unsupported synthesis suggests the answer path. Structural failure suggests output validation. Uncertain runtime outcomes need request accounting, not a more elaborate relevance metric.
Before comparing, freeze relevant configuration: model identifier, prompt, source snapshot, retrieval settings and rubric. If several change together, the comparison can still evaluate the combined release, but it cannot identify which individual change caused the result.
The practical deliverable is an evaluation card: task, cases, rubric, baseline, changed outcomes, important slices, limits and release decision. It should let another reviewer understand why the evidence supports the decision and where that conclusion stops.
Limits of Evaluation Sets: Building the Test Before You Tune
The evaluation set and rubric define the question that a reported result answers. Development against visible cases can erode their independence. Preserve important slices, source versions and permitted refusal outcomes rather than allowing an aggregate score to redefine acceptance.
Test the case boundary
Can six supported answers be reported as 75% overall task success?
Reveal the design reasoning
Not over the ten eligible cases. That is 6/8 support among answers; supported coverage is 6/10. State the accepted-task rule and preserve the denominator.
Decision: Decide releases from joined case-level evidence, not a blended proxy.
Check yourself: inspect the comparison
A candidate improves from six to eight passing cases out of ten. Is that enough to claim a population improvement of 20 percentage points?
No. That is the observed difference on the chosen cases. Inspect pairing, sampling, variability, rubric validity and failure severity before a broader conclusion.
Three fixed failures accompany one new permission leak. Can the net gain decide release?
No. Apply the declared permission constraint separately. More useful answers cannot compensate for an unacceptable disclosure boundary.
Every test question has influenced prompt editing. What remains useful about the set?
It remains a development and regression collection. Use a separate appropriately constructed review set for a fresh comparison, accounting for duplicates and shared source material.
Northwind decision log
Label representative tasks before tuning.
Separate development cases from release cases.
Refresh the set when the workload changes.
Go deeper into relevance and judgment
- Book chapter: Designing Machine Learning Systems, chapter 6: Model Development and Offline Evaluation — Chip Huyen. Design held-out evaluation and monitor shifts in the target task.
- Book chapter: Designing Machine Learning Systems, chapter 8: Data Distribution Shifts and Monitoring — Chip Huyen. Design held-out evaluation and monitor shifts in the target task.
- Video lecture: Causal abstraction | Stanford CS224U Natural Language Understanding — Chris Potts. Use model-analysis interventions to ask what an evaluation actually distinguishes.
- Primary paper: Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena — Lianmin Zheng and colleagues. Background for the next lesson's measurement limitations.
Check the mechanism in this lesson
Can three marginal pass rates be multiplied to claim observed joint success?
Compare the explanation
No. The case-level overlap and dependence are unknown. Record whether each actual case passes all required checks; a product of marginal counts is not a substitute for those observations.
Carry the decision forward
Northwind now has case-level outcomes and a rubric for interpreting them. Page 39 evaluates the automated judge itself: consistent preferences require calibration and disagreement review before they can inform a release decision.