Building Evaluation Sets
An evaluation set is the unit-test suite of an AI feature, and it is only as good as its cases and its labels. A set your team will trust is built from real traffic and past failures, sized for the precision you need, audited for wrong answers, versioned like code and kept alive by a named owner.
After this chapter you can
- Build an eval set from real requests, past failures, edge cases and should-not cases, and report the mix by source and subgroup.
- Calculate the margin of error at the current set size and compare it with the release gate.
- Audit labels with a second reader, and fix the whole batch when disagreement exceeds the written threshold.
- Separate a development set from a locked set that is scored only at decision points.
- Version the set like code, rescore production on each new version, and name one owner with a refresh rule.
Your team has a prototype that answers well in every demo. Someone asks how good it is, and the honest answer is a feeling. The manager’s question is practical: how do I build an eval set my team will trust and keep up to date? The short answer is that you build it the way you would build a test suite for a payment service, with one difference that changes the work. In ordinary software the expected result is rarely in dispute. In an AI feature, deciding what counts as a correct answer is a large share of the job.
An episode from coding benchmarks shows how far wrong a respected test set can be. In 2024, OpenAI worked with 93 software developers experienced in Python to screen a sample of 1,699 problems from SWE-bench, a widely used test of whether a model can fix real issues in open-source repositories. The screeners flagged 38.3 percent of the sampled problems for underspecified descriptions and 61.1 percent for unit tests that could reject a valid solution. The two flags overlap, and in total 68.3 percent of the sample was filtered out; the verified subset has 500 problems1. In OpenAI’s report GPT-4o with the best open-source scaffold scored 33.2 percent on the cleaned subset against 16 percent on the original, a little over double. The lesson for you is not about coding models. A low score can reflect a bad test as well as a bad system, and reading the cases is how a team finds out.
What an eval set is, and what it is not
An eval set is a fixed collection of inputs, each with the information needed to judge the output: a reference answer, a checklist of required facts, or a rule such as “must cite a source”. A run of the feature over the set produces a score. When the prompt, the model, the retrieval index or the code changes, you run it again and compare.
Two differences from a unit test matter for planning. First, the score is a rate, not a pass or fail, so it comes with noise, and you need enough cases for the rate to mean something. Second, the labels can be wrong, ambiguous or contested, so the set itself needs testing. Everything below follows from those two facts.
An eval set is also not a benchmark you download. Public benchmarks tell you about models in general. Your set tells you about your feature on your users’ requests, which is the only question you are accountable for. Level 1 made the point in Accuracy, Hallucination and Reliability: reliability is measured on your own work. This chapter is how a team does that measuring. The next chapter, on automated scoring, assumes the set exists.
Where the cases come from
Anthropic’s engineering team, writing about evaluating agents in January 2026, advises starting from what a team already checks by hand and from reported failures, drawn from bug trackers and support queues, and prioritizing by user impact2. The practical merit of that rule is that every case then has a reason to exist. Five sources cover most features:
- Real requests. A sample of production or pilot traffic, with personal data removed, is the closest thing to the future. If there is no traffic yet, use the tickets, emails or questions the feature will replace.
- Past failures. Every bad answer found in testing, review or by a customer becomes a case. This is the only source that grows by itself.
- Edge cases. Empty input, very long input, mixed languages, requests the feature should decline, and requests that look similar but need a different answer.
- Contrast cases. Include cases where the behavior should occur and cases where it should not. A set that checks only for refusals will reward a feature that refuses everything.
- Adversarial cases. Attempts to make the feature leak data or ignore its instructions. The security chapter in this module owns the threat model; here, you only need to carry its attacks into the set as cases.
Representative does not mean random. A random sample of traffic tends to be dominated by easy, common requests, so a feature could score 95 percent overall while failing most of the rare, expensive ones. The remedy is to stratify. List the request types, languages and customer segments that matter, and give each a minimum number of cases, even where it is rare in traffic. Then report the score by group as well as overall. A single average hides exactly the failures a director will ask about later.
How many cases you need
A manager’s most useful piece of arithmetic is how much a score can move by chance. Treat each case as pass or fail. With a true pass rate of 90 percent, the 95 percent margin of error on the measured rate (normal approximation) is about plus or minus 8.3 points at 50 cases, 5.9 at 100, 4.2 at 200 and 2.9 at 400. Those figures come from the standard formula, 1.96 times the square root of p(1-p)/n, and they are computed here, not measured on any system.
Three decisions follow. Start small: Anthropic’s advice is that 20 to 50 tasks drawn from real failures is enough to see large changes early2. Do not wait for a perfect set before measuring anything. Grow to the size the decision needs: if a release gate must catch a regression of about 5 points, the table suggests a few hundred cases (an illustrative estimate; comparing two runs on the same cases is somewhat tighter). And never read a subgroup score from a handful of cases. If “Spanish requests” has 12 cases, a swing of two cases is 17 points, which is noise. Set a rule such as “no subgroup is reported below 30 cases”, and let the team label small groups as indicative.
The cost is mostly labeling time, not compute. Assume, illustratively, that a domain expert needs 4 minutes to write and check one case, 200 cases take about 13 hours (800 minutes), roughly two working days spread across the team. That is a modest price against a feature that ships on a guess.
Labels: the set needs testing too
Gema and colleagues re-annotated a subset of MMLU, a standard knowledge benchmark, and estimated that 6.49 percent of its questions contain errors, with 57 percent of the analysed questions in the Virology subset affected3. That is one benchmark, and the errors were not spread evenly: most subjects were far cleaner than Virology. Your set is smaller and more focused, so the finding is a warning to audit, not a forecast of your error rate: wrong or ambiguous labels can cap the score you compute.
Three practices keep the labels honest. The first is an ambiguity test. Anthropic’s advice is to write tasks so that two domain experts would independently reach the same verdict, and to include a reference solution that proves the task can be solved2. A case two experts would grade differently is not ready. Chapter seven in this module, on human review, covers how to measure that agreement.
The second is a label audit. Before a version is frozen, have a second person re-check a random sample of 30 to 50 cases. If more than 5 percent contain an error or an ambiguity, fix the whole batch and audit again. The 5 percent threshold is a team default, not a standard, but it should be written down, because otherwise it silently becomes whatever is convenient.
The third is failure reading. When the feature fails a case, the first question is whether the case is right. Reading failing cases weekly is the cheapest way to find label errors, and an aggregate score alone will not show them.
Keep a locked set, and version everything
If the team tunes prompts against the same cases it uses to report progress, the score can rise while real quality stays flat. This is ordinary overfitting, applied to prompts and retrieval settings. The remedy is two sets. A development set is open: engineers read it, debug against it and learn from it. A locked set is a held-back portion, scored only at decision points such as a release gate, and read only by its owner. An illustrative split is 70 percent development and 30 percent locked, with the locked share large enough to meet the size rule above. When the locked set leaks into prompts or examples, retire it and build a new one.
Version the set like code. Keep it in the repository or a data store with history, give each release a version number, and write a changelog line for every change: what was added, removed or relabeled, and why. Never edit a frozen version in place. When the set changes, rescore the current production system on the new version, so the baseline moves with it. Without that step, a score of 88 on version 1.3 and 91 on version 1.4 looks like progress when it only reflects a different test.
Two retirement rules keep the set useful. Remove cases that the feature passes in every run for several versions only if the behavior is no longer at risk; otherwise keep them as regression checks. And watch for saturation, which Anthropic’s article describes as pass rates near 100 percent that no longer give a signal for improvement2. A saturated set tells you nothing about the next change, and the cure is harder cases, not a victory lap.
A team-sized worked example
Treat the scenario here as fiction: each figure in it was made up for the example. A team of seven engineers is building a feature that summarizes incident tickets for the on-call lead. The tech lead asks the team to build the set before tuning anything.
In week one, two engineers and the on-call lead pull 120 closed tickets from the past quarter, remove names and customer identifiers, and add 40 cases from tickets that earlier summaries got wrong in a pilot. They write 20 edge cases: a ticket with no resolution, one in two languages, one with 300 comments. They add 20 should-not cases (this team skips adversarial cases because the summarizer has no tools), such as tickets that contain only a password reset request, where the right output is “nothing to summarize”. The total is 200 cases. Each has a short checklist of facts the summary must contain (affected service, start time, current status) and facts it must not invent.
In week two, the on-call lead and a senior engineer independently grade a 40-case sample. They disagree on 5 cases, which is 12.5 percent, above the team’s 5 percent threshold. Four of the five were ambiguous checklists, such as whether “started around noon” satisfies “start time”. The team rewrites the rules for all 200 cases and re-audits another 40, where the disagreement falls to 1 case, 2.5 percent. They freeze version 1.0, split it into 140 development and 60 locked cases, and note that the locked set has a margin of about 7.6 points at a 90 percent pass rate, good enough to catch big regressions only. They schedule a doubling of the locked set before the first customer-facing release.
The first score, 71 percent on the 140 development cases for a plain prompt, is the number everything later is measured against. A month later a support engineer reports a summary that blamed the wrong service. The team adds it as case 201 in version 1.1, with a changelog line, rescoring the production system on 1.1 before touching the prompt. Nothing about this is advanced. It is the discipline of a test suite, applied to answers.
Case: the benchmark that was wrong
The opening story is a case in its own right, and the manager’s reading of it is narrow on purpose1. OpenAI’s screeners found that a large share of one popular test’s problems were underspecified or had tests that rejected valid fixes. The result was a smaller, cleaner set of 500 problems, and higher measured scores for the same model and scaffold. Three points carry over. Humans reading cases found what the aggregate score could not. The cost was real labor: 93 reviewers. And the result was a subset of the original set, which suggests a set can be improved by filtering, not only by a rebuild. What the case does not show is how common such flaws are in other test sets, or whether the filtered 500 are free of flaws. Gema and colleagues’ findings on MMLU point the same way, but each set needs its own audit.
What this means for engineering managers
Monday action: ask the owner of your feature’s test set for the audit record below, and if none exists, have a second person re-grade 40 cases this week.
Eval set: ______ version: ___ owner: ______ refresh rule: ______ (e.g. each production failure becomes a case in ___ working days)
Cases: ___ total = ___ real + ___ past failures + ___ edge + ___ should-not + ___ adversarial
Subgroups reported (each with at least ___ cases): ______
Label audit: ___ of ___ re-graded cases disagreed (___%). Rule: above ___% (team default, illustrative) fix before freezing
Locked set: ___ cases, read only by ______; margin of error at current pass rate: +/- ___ points
Changelog line for this version: ______
Check yourself
- A public benchmark score is enough evidence that your feature works on your users’ requests.
- With 100 cases and a true pass rate of 90 percent, the 95 percent margin of error is about 6 points.
- If a case is failing, the feature is always the thing to fix.
- A team may tune prompts against the locked set because it is the most reliable data.
- When the eval set changes, you should rescore the current production system on the new version.
- Production failures should become new cases in the next version of the set.
Reflection
What comes next
A set you trust is useful only when it is run, and running 200 cases by hand on every change does not last. The next chapter, Automated Evals, LLM Judges and Regression Gates, covers how to score on every change, how to check a model judge against people, and where to put a gate that blocks a regression.
Laws referenced
Not legal advice. Laws change; verify before relying on this, and consult counsel for decisions.
EU AI Act · EU
Regulation (EU) 2024/1689, as amended by Regulation (EU) 2026/1744
Risk-based rules. Prohibited practices include social scoring, untargeted scraping of facial images, and emotion recognition in workplaces and schools (with narrow exceptions). High-risk systems (Annex III: biometrics, safety components of critical infrastructure such as energy, water and traffic, employment and worker management, credit, education, essential services, law enforcement, migration, justice) need risk management, data governance, documentation, logging, human oversight, human oversight that keeps people able to understand the system, notice automation bias (over-reliance on its output), override it or stop it (Art. 14(4)), appropriate accuracy, robustness and cybersecurity (Art. 15), automatic logging of events (Art. 12), a provider quality-management system (Art. 17) and conformity assessment. An Annex III system is not high-risk if it poses no significant risk of harm, for example a narrow procedural or preparatory task that does not replace human assessment; systems that profile people are always high-risk, and a provider relying on this exception must document it and register (Art. 6(3)). Deployers of high-risk AI must use it as instructed, assign competent human oversight, monitor its operation, keep logs for at least six months and report serious incidents (Art. 26); employers must inform workers' representatives (Art. 26(7)). Public bodies, private providers of public services, and deployers of credit-scoring or life and health insurance pricing systems must carry out a fundamental-rights impact assessment before first use (Art. 27). Providers must run post-market monitoring (Art. 72). A deployer that puts its name on a high-risk system, substantially modifies it, or changes its purpose so that it becomes high-risk takes on the provider's obligations (Art. 25(1)). A substantial modification (Art. 3(23)) of a high-risk system needs a new conformity assessment, unless the change was pre-determined and documented at the first assessment, as with planned continuous learning (Art. 43(4)). Providers of general-purpose AI models (from 2 Aug 2025) must keep technical documentation, have a policy to comply with EU copyright law including text-and-data-mining opt-outs, and publish a sufficiently detailed summary of training content (Art. 53). Research, testing and development before a system is placed on the market or put into service is outside the Act, except testing in real-world conditions (Art. 2(8)). Since the 2026 Omnibus, the Art. 4 AI-literacy duty is an obligation of effort (take measures to support literacy), not of result. Fines reach EUR 35 million or 7% of global turnover for prohibited practices.
- 2024-08-01 — Entered into force
- 2025-02-02 — Prohibited practices (Art. 5) and the AI-literacy duty (Art. 4) apply
- 2026-07-27 — Omnibus softens Art. 4: providers and deployers must take measures to support AI literacy; no specific level must be guaranteed
- 2025-08-02 — General-purpose AI model obligations apply; governance and penalties regime in place
- 2026-08-02 — Transparency duties (Art. 50) apply: disclose AI interaction, label synthetic and deepfake content (marking for generative systems already on the market: 2 Dec 2026)
- 2027-12-02 — High-risk obligations for Annex III systems (e.g. hiring, credit, education, essential services) - moved from 2 Aug 2026 by the 2026 Omnibus
- 2028-08-02 — High-risk obligations for AI in products regulated under Annex I
Last verified 2026-10-06 · official text
General Data Protection Regulation · EU
Regulation (EU) 2016/679
Personal data is any information relating to an identified or identifiable person, directly or indirectly, including by an identifier such as an online ID (Art. 4(1)). Lawful basis and purpose limitation (Arts. 5-6); processing special-category data, including biometric data used to identify a person, health data and data revealing ethnicity, is prohibited unless a specific exception applies (Art. 9); data protection by design and by default (Art. 25); processors such as AI vendors may act only under a written contract with required terms and sufficient guarantees (Art. 28); transparency to data subjects (Arts. 13-14); right not to be subject to a decision based solely on automated processing with legal or similarly significant effects (Art. 22); breach notification to the supervisory authority within 72 hours (Art. 33) and to individuals without undue delay when the risk is high (Art. 34); data protection impact assessment for high-risk processing (Art. 35). Fines up to EUR 20 million or 4% of global turnover.
- 2018-05-25 — Applies
Last verified 2026-10-08 · official text
References
- OpenAI. Introducing SWE-bench Verified. OpenAI. 2024.
- Anthropic Engineering. Demystifying evals for AI agents. Anthropic. 2026.
- Aryo Pradipta Gema and colleagues. Are We Done with MMLU?. arXiv 2406.04127. 2024.
Further reading
- OpenAI. Introducing SWE-bench Verified. OpenAI. 2024.
- Aryo Pradipta Gema and colleagues. Are We Done with MMLU?. arXiv 2406.04127. 2024.
- Anthropic Engineering. Demystifying evals for AI agents. Anthropic. 2026.
Sources last verified 2026-10-12.