Method
Build the eval set before you write the prompt
- Written by
- The PrizenLabs team
- Published
- Reading time
- 5 min
On this page
Most AI projects begin with a prompt. Someone writes one, tries it on a handful of examples, likes what comes back and shows it to a colleague. A week later the prompt is three pages long, everyone has a favourite example that proves it works, and nobody can say whether last Tuesday's change made it better or worse.
We begin somewhere else. Before the first prompt, training run or retrieval index, we build an evaluation set: real inputs from your own data, each with the answer an expert would accept. It is step two of our method, and it is the step that makes every later one cheaper.
What an eval set is
An evaluation set is a fixed collection of test cases. Each case has an input, such as an email, a contract clause, a support ticket or a question, and a way to judge the output: the right label, the fields that must be extracted, the facts the answer must contain, or a rubric an expert would apply.
It is not a benchmark from a paper. Public benchmarks measure general ability. Your eval set measures whether this system does this job on your data, which is the only question your business needs answered.
Why it comes first
It turns opinions into numbers. Without an eval set, a prompt change is judged by whoever tried it last. With one, it gets a score on the same two hundred cases as every earlier version. Arguments about wording become a look at a table.
It decides the architecture. Whether you need retrieval, fine-tuning or a better prompt is an empirical question. The eval set lets us try the cheap option first and keep it if it passes. Many projects end up simpler than anyone planned, because the simple version cleared the bar.
It makes models swappable. New models arrive every few months. Teams without an eval set either never upgrade or upgrade blind. Teams with one run the new model against the set in an afternoon and move when the numbers say so.
It starts your audit trail. Regulators and enterprise security reviews increasingly ask how an AI system was tested. A versioned eval set with stored results answers that with evidence rather than assurances; we cover the regulatory side in the EU AI Act evidence trail.
How we build one
1. Start from the decision
The first week of an engagement is spent finding the decision worth automating and measuring how it is made today. That tells us what a test case looks like. For a claims triage system, a case is a claim and the queue it should land in. For a contract assistant, a case is a question and the clauses that answer it.
2. Sample real cases, not invented ones
We pull cases from your history, not from imagination. Invented cases are too clean: no typos, no scanned pages, no half-finished forms. We sample across the variety you actually receive, and deliberately include the awkward ones: the long document, the ambiguous request, the case two experts would disagree on.
Fifty to two hundred cases is enough to start. The goal on day one is coverage of the kinds of input, not statistical precision.
3. Have experts write the answers
The people who do the work today label the cases. Where they disagree, we keep the disagreement and write down the rule that settles it. Those rules often become the most useful part of the system's instructions, and sometimes the decision logic in code.
4. Choose how each case is graded
We use the strictest check that fits:
- Exact checks for labels, numbers, dates and yes-or-no answers.
- Schema checks for structured output: does the JSON validate, are required fields present, do the totals add up.
- Reference checks for extraction: does the extracted value match the source document.
- Rubrics for open-ended answers, written by your experts, graded by a model and spot-checked by people. A model grader is a tool, not a judge, so we measure how often it agrees with your experts before we trust it.
5. Split by segment
A single average hides the failures that matter. We report scores by document type, customer segment, language and difficulty, so a change that helps the common case and quietly breaks a rare but expensive one shows up before release.
6. Run it on every change
The eval runs in continuous integration. Every prompt edit, model change, retrieval tweak and new tool definition produces a scorecard, and a release goes out only if it passes. It is the discipline you already apply to code, applied to the part of the system that used to be judged by eye.
What the eval set is not
It is not finished. Every week in production produces cases the set did not anticipate. When a person overrides the system, or a user reports a wrong answer, that case goes into the set with the right answer attached. Over months the set becomes a precise description of what your organisation means by correct, and that is worth more than any single model.
It is also not a reason to delay. The first version takes days, not months. The cost is a few hours of expert time to label cases, which is far less than discovering after launch that nobody can say whether the system works.
What changes for the team
The conversations change first. Instead of "it seems better", people say things like "invoices went up, credit notes went down; let's look at the credit notes". Product owners can set a launch bar in advance. Security teams can see what was tested. Engineers can try a bolder idea, because the set will catch it if it breaks something.
The eval harness is one of the accelerators we bring to every build: the labelling guide, the graders, the CI job and the scorecard. It is also the core of our LLMOps, evaluation and guardrails work on systems someone else built, where the first job is usually to trace a week of real traffic and turn it into a first eval set. The same habit shows in our products: OverseeX proposes nothing until a repository's own type-check and tests have passed.
Where to start
Pick one AI feature you already run, or plan to. Collect fifty real inputs and ask the person who knows the work best to write down the right output for each. Run your current system against them and score it honestly. You will learn more from that afternoon than from a month of demos, and you will have the first piece of every later decision.
If you would like help with the rest, book a working session.