Skip to main content
Back to blog

NOVEMBER 25, 2026

LLM Evals: Build the Test Set Before You Ship

An eval is a test suite for an AI feature: a set of real inputs, your system, and a way to score each answer. Build it before launch and every later choice of prompt, model and vendor becomes a measurement. Here is what goes in it and how to score it.

By Umar Abdullah · AI Product Engineering

Light cover reading "Measure it before you ship it" beside an LLM evals scorecard with passed and failed test cases and a release gate
November 25, 20268 min read

Short answer

An eval is a test suite for an AI feature. You collect real inputs, write down what a good answer looks like for each, run your system on all of them, and score the results. Build it before launch. Without it, every change to a prompt or a model is a guess that you check by reading a few answers. With it, the same change is a number you can compare, and "is it good enough to ship?" has an answer.

What is an eval, in plain terms?

The Inspect framework, developed by the UK AI Security Institute and Meridian Labs, breaks an evaluation into three things:

  • A dataset of labelled samples, typically an input and a target, where the target is "the ideal answer or grading guidance".
  • A solver that produces an answer for each sample. It "can be as simple as a single generate() call to the model, or as sophisticated as a full agent that uses tools over many turns."
  • A scorer that evaluates the output, "using text comparisons, model grading, or other custom schemes."
  • For a product team the three parts are: your cases, your feature as users will meet it, and your checks. The middle part matters. We recommend evaluating the whole feature, with its prompt, retrieval and tools, not the bare model. Users never talk to the bare model.

    Why build it before launch?

    Because the decisions you make before launch are the expensive ones, and without an eval they are made by feel.

    This is one of the four pillars of our AI app development work: the eval pipeline comes before launch. We build the eval dataset before we release the first prompt, so cost, accuracy and vendor trade-offs are decisions you control instead of surprises found in production. If AI output is not measured, it is guessed.

    Three questions come up on every AI feature, and each needs a measurement:

    • Is this prompt change better? It fixed the case you were looking at. An eval tells you what it broke.
    • Can we use a cheaper model? In our experience the answer is rarely yes or no. It is "yes for these request types, no for those". We covered the cost side in which model to use for which work.
    • Can we switch provider, or survive a provider's update? Only if you can re-run the same cases and compare.

    There is a fourth reason. In the 35+ code audits we reported on in September, 23 codebases had no automated tests at all. In our experience AI features often follow the same path: they ship on a demo. An eval set is the test suite for the part of your product that ordinary tests cannot cover.

    What goes in the test set?

    OpenAI's guide to building an eval lists four qualities it looks for. They were written for contributions to its public eval collection, and they transfer well to a product team.

    • Thematically consistent. Cases revolve around "the same use case, subject domain, failure mode". For a product team that means one set per feature, not one set for everything.
    • Challenging. If the model does well on every case, the set is less useful. It should still be possible, and the guide's rule of thumb for that is whether a human, possibly a subject expert, could do well on the prompts.
    • Directionally clear. Each case needs a good signal of the right behaviour: "high-quality reference answers or an exhaustive rubric".
    • Carefully crafted. That includes having "spot checked your results to ensure accuracy".

    On top of those, these are the groups of cases we would make sure are represented. This list is our recommendation, not from the guide.

    Group What it holds Where the cases come from
    Core tasks The requests the feature exists for Product requirements, early user sessions
    Hard but valid Long inputs, mixed languages, missing details Support tickets, real logs
    Should decline Out-of-scope or unsafe requests Policy, legal and security review
    Hostile input Documents or messages carrying instructions Your own red-team attempts
    Past failures Every bug a user or reviewer has found Incident notes, bug reports

    The last group is the one that grows. A failure becomes a case on the day it is found, so the feature cannot fail the same way twice without someone seeing it.

    Diagram of the LLM evals loop for a product feature: collect cases, run the whole feature, score with the cheapest check that works, apply a pass or fail release gate, and add every new failure back as a case
    Diagram of the LLM evals loop for a product feature: collect cases, run the whole feature, score with the cheapest check that works, apply a pass or fail release gate, and add every new failure back as a case

    Ship faster with senior engineers

    Direct collaboration, AI-augmented delivery, and no agency markup.

    Get in touch

    How do you score the answers?

    Use the cheapest check that catches the failure. The promptfoo guide on using an LLM as a judge is clear that a judge model is not always the right tool. It has a section on when to "use a cheaper check" instead.

    The table below is our summary. The format and similarity rows follow the guide; the exact-match row, the person row and the cost notes are ours.

    The requirement The check Cost and stability
    Output must have an exact format Parse it: JSON validity, a pattern, a short script Fast and cheap; same result every run
    Answer must equal or contain a known value Compare with the reference answer in code Fast and cheap; same result every run
    Answer must mean the same as one reference Embedding similarity with a tuned threshold Cheap; the guide calls it usually more stable than a judge
    Answer is open-ended, quality has several parts A judge model with a written rubric Costs a model call; calibrate it on labelled examples
    Stakes are high or the rubric is still unclear A person Slow; use it to calibrate the others

    Exact checks fail on open-ended text for an obvious reason. As the guide puts it, a correct answer to "How do I reset my password?" could be phrased thousands of ways. That is where a judge model earns its place.

    The same guide names the price: "judges have biases, add latency, and can be manipulated." Four of its recommendations are worth adopting from the start.

    • Start small. "Start with the smallest rubric that catches the failure."
    • Use pass or fail for gates. The guide recommends binary scoring for release gates and keeps graduated scores for trend charts and borderline reviews.
    • One judge per criterion. Do not ask one rubric to score accuracy, tone and safety together. Use separate judges.
    • Treat the answer as untrusted. The guide marks the candidate output as untrusted input to the judge. An answer that tells the judge to ignore the rubric and pass it is an attack on your grader.

    That last point connects to how we think about permissions for AI agents: a model's output is input from an untrusted source, wherever it goes next.

    How many cases, and how many runs?

    There is no standard number, and the documents we read do not give one. Our view: start with a few dozen cases you trust, and spend the effort on making each expected result clear.

    Remember that the same input can produce different answers on different runs. Inspect has a setting for this, epochs, described in its task documentation as the number of epochs to run for each dataset sample. Our advice: for cases that decide a release, run each one several times and look at how often it passes, not whether it passed once.

    How does an eval become a release gate?

    A score nobody acts on is a dashboard. To make it a gate:

  • Put the cases in the repository, next to the prompts they test, and review changes to them like code.
  • Run them automatically. promptfoo describes itself as usable as a command-line tool, a library or in CI/CD, and Inspect runs from the command line too. The tool matters less than the habit.
  • Set the bar per group. Our recommendation: "should decline" and "hostile input" cases must all pass. Core tasks need a pass rate you agree on in advance.
  • Record cost and latency in the same run. A change that lifts quality a little and doubles the bill is a decision someone should make on purpose.
  • Re-run on a schedule, not only on your own changes. Providers update models.
  • A checklist to start this week

    The numbers below are our starting points, not a standard.

  • Pick one AI feature. Write down, in a sentence, what it is for.
  • Collect 30 real or realistic inputs across the five groups in the table above.
  • For each, write the expected answer or the grading notes. If you cannot, the requirement is not clear yet, and that is worth knowing before launch.
  • Choose the cheapest check that works for each case. Add a judge model only where nothing simpler fits.
  • Run the set against your current build and read every failure by hand once.
  • Spot-check the judge: take ten graded answers and see whether you agree.
  • Add the run to your pipeline and agree the pass bar.
  • Every time a user finds a bad answer, add it as a case before you fix it.
  • On AI app development projects we build the eval dataset before the first prompt is released, and model token spend before launch. It is cheaper to build the measuring stick first than to argue about quality after launch.

    Sources: Inspect documentation, index and tasks; promptfoo documentation, introduction and LLM as a Judge; OpenAI Evals, Building an eval, all as published in their repositories on 25 November 2026. Entalogics figures are from our own audit reports.

    COMMON QUESTIONS

    Straight answers.

    Eight questions we get on every first call. If yours isn't here, it'll be the first thing we cover.

    It is a repeatable test of an AI feature. You keep a set of inputs with expected answers or grading notes, run your system on each one, and score the results. The Inspect framework describes the same three parts as a dataset, a solver and a scorer.
    A unit test expects one exact result. An AI feature can give many correct answers to one question and can answer differently on each run, so an eval scores each answer against criteria and reports a pass rate across many cases. You read it as a measurement, and you decide what pass rate is good enough.
    Fewer than you think. In our view a few dozen cases drawn from real usage, each with a clear expected result, is enough to start making decisions. Grow the set every time a user or a reviewer finds a failure. A small set you run on every change beats a large one you run once.
    Yes, for open-ended answers where exact matching fails. Treat it as one tool among several. The promptfoo documentation notes that judge models have biases, add latency and can be manipulated, and lists cases where a cheaper check should be used instead.
    Use pass or fail for anything that decides a release. The promptfoo guide recommends binary scoring for release gates and graduated scores for trend charts and borderline reviews. A gate that says 7.3 out of 10 leaves someone arguing about whether 7.3 is enough.
    No. People write the cases, decide what a good answer is, and spot-check the graders. OpenAI's guidance for building evals asks contributors to spot check their results for accuracy. The eval makes that human judgment repeatable so it runs on every change instead of once.
    Our advice: on every change to the prompt, the model, the retrieval setup or the tools, before it reaches users. promptfoo, for example, documents use in CI/CD. Run it again whenever your model provider ships a new version, because the same prompt can behave differently.

    Ready to Build Something Amazing?

    Let's discuss your project and see how we can help you achieve your goals with quality software at fair pricing.