Concepts / Designing Eval Sets for Real Distributions

Designing Eval Sets for Real Distributions

The spec-and-test tradition treats test cases as guarantees that always pass, while the eval discipline treats them as samples that should pass with high probability on the distribution that matters.

  • Programming

The Habit That Works Against a Team

Most engineers learn to trust software through one habit: write down what the system must do, write tests that check those requirements, and expect the tests to pass every time. For deterministic code this habit works very well. When a team begins building on a system whose behavior is judged statistically rather than absolutely, the same habit can start to work against them. The team keeps asking for a guarantee, and the approach they are using cannot supply one.

This article follows that friction. It looks at what a passing test actually means in each tradition, how an eval set relates to the real traffic a product receives, and what it looks like when a customer's own engineers start doing eval work themselves. Keep one question in mind as you read: when a test passes, what has been promised, and to whom?

One Passing Test, Two Meanings

Imagine a test case that checks one behavior of a system. In the spec-and-test tradition the test is written to hold for every run. If it passes, the team has confirmed a promise. If it fails, the system has broken that promise, and the failure is treated as a defect in the system.

In the eval discipline the same kind of case means something different. It is a measurement of a rate. The aim is for the case to pass with high probability across the distribution of inputs that matters to the product. A single pass or single fail says less than it appears to, because the question being answered is how often the system behaves acceptably across realistic traffic.

Test caseEval caseExpected to alwayspassPasses with highprobabilityFailure means brokenpromiseMeasures rate on realinputsmust holdon failureaims foryields
What does a passing test promise in each tradition? The spec-and-test column promises that every run holds; the eval column promises only that the case passes with high probability on the inputs that matter.

The diagram places the two traditions side by side. Both start from a test case, but they attach different promises to the same kind of result. Read down each column and notice where the promise lands: in the spec-and-test column it lands on every run, and in the eval column it lands on a rate across a distribution.

Guarantees Versus Rates

The source states the core distinction in one sentence: the spec-and-test tradition treats test cases as guarantees that always pass, while the eval discipline treats them as samples that should pass with high probability on the distribution that matters.

Definition

A test case in the eval discipline is a sample drawn from the distribution of inputs that matters to the product. Its passing or failing feeds an estimate of how often the system behaves acceptably on that distribution.

How an Eval Set Relates to Production Traffic

An eval set is not the full population of inputs a product will ever see. It is a collection of cases chosen to represent the distribution of inputs that matters. Each case sits inside that distribution as one sample, and the set as a whole is meant to be a usable picture of it.

Production inputsfull distribution of realtrafficDistribution thatmattersinputs the product willactually seeEval set casessamples drawn from thedistributionPass rateestimate of acceptablebehaviornarrowed tosampled asmeasured as
Where do eval cases sit relative to the full distribution of production inputs? They are drawn from it as samples, and the pass rate on those samples estimates behavior across the distribution.

Read the chain from the top. Production inputs are the whole stream of traffic. The distribution that matters is the part of that stream the product must handle well. Eval cases are samples taken from that distribution, and their pass rate is the measurement that stands in for behavior across it. The quality of the eval set therefore depends on how faithfully its cases reflect the distribution, not on how many cases there are.

Answering a Request for a Guarantee

Customer engineers trained in the spec-and-test tradition often request guarantees that an eval set cannot give. The source notes that the FDE must translate patiently, and that this translation is part of the customer's adoption process. The flowchart below sketches one reasoning path for such a request. The steps are a suggested pattern for the FDE, built from the source's framing rather than a fixed procedure stated in the source.

Customer asks for apass guaranteeIs every outputrequired to becorrect?Restate: eval gives arateAsk which inputsmatter mostTurn those inputsinto eval casesReport pass rate onthose casesyes
When a customer asks for a deterministic pass guarantee, what steps lead to a reframing response? The path moves from identifying the request, to restating what an eval can promise, to turning the customer's concern into eval cases.
Worked example

Reframing a request for every answer to be correct

A customer's engineer writes: 'Our tests must pass on every run. Give us a guarantee that the system never returns a wrong answer.' How should the FDE respond?

  1. 1
    Identify the request

    The engineer is asking for a per-output guarantee, which is the spec-and-test promise. An eval set cannot provide that.

  2. 2
    Restate what an eval gives

    Explain that the eval set measures how often the system behaves acceptably across realistic inputs. It estimates a rate; it does not certify each output.

  3. 3
    Locate the distribution

    Ask which inputs the product will see most, and which of them would be costly if handled badly. These answers define the distribution the eval set must sample.

  4. 4
    Build cases from that distribution

    Turn those inputs into eval cases so the measured rate reflects the traffic the customer cares about.

  5. 5
    Report the rate with its scope

    State the pass rate together with the distribution it was measured on, so the customer knows exactly what the number covers.

Result

The customer receives an honest measurement tied to a named distribution instead of a guarantee the eval approach cannot give. The translation is patient because the engineer's expectation is being reshaped, not dismissed.

Common Mistakes When Translating

  • Common mistake

    Promising that the system will be correct on every input

    What it looks like

    Telling a customer the eval suite proves no output will be wrong.

    Why it fails

    An eval set measures a rate across a distribution. It cannot promise that any single output is correct.

    Do this instead

    State the measured pass rate and name the distribution it was measured on.

  • Common mistake

    Treating a single failing case as a broken promise

    What it looks like

    Declaring the system defective because one sampled case failed.

    Why it fails

    Under the eval discipline a case is a sample. One failure is a data point about the rate, not proof of a broken guarantee.

    Do this instead

    Look at the failure in context of the rate and whether the case represents a region of the distribution worth tracking.

  • Common mistake

    Building the eval set from convenient examples only

    What it looks like

    Filling the set with cases that were easy to write down.

    Why it fails

    The set is supposed to sample the distribution that matters. Convenient cases may cover only a narrow part of it.

    Do this instead

    Draw cases from the realistic inputs the product will see, and check which regions are missing.

  • Common mistake

    Mixing the two questions in one report without saying which one is being answered

Spotting a Team That Owns the Discipline

Early in an engagement the FDE carries most of the eval thinking. Over time the work is meant to move into the customer's hands. The source identifies one specific signal that marks this move. The customer has joined the work when their own engineers start producing eval material.

Two concrete behaviors count. The first is filing bugs that take the form of missing eval cases, meaning the engineer points out a region of the distribution the set does not cover. The second is submitting their own labeled examples. Either behavior shows the team is reasoning in eval terms rather than waiting for the outside engineer to supply every judgment.

MEDIUM

A customer engineer files a bug titled 'Model fails on our long invoices' and attaches five example invoices with the expected extraction for each. Without yet giving an answer, decide which signal of ownership this represents and why it matters. Then state whether the bug is better described as a missing eval case or as a broken guarantee.

Hints
  • Ask whether the bug points to a region of the distribution the eval set does not cover.
  • Labeled examples submitted by the customer are one of the two behaviors the source names.

Key Takeaways

  • The spec-and-test tradition treats test cases as guarantees that always pass, while the eval discipline treats them as samples that should pass with high probability on the distribution that matters.
  • An eval set can estimate how often a system behaves acceptably across realistic traffic, but it cannot promise that any single output will be correct.
  • Requests for deterministic guarantees are a signal to translate patiently: restate what an eval gives, locate the distribution that matters, and build cases from it.
  • A customer team has joined the eval work when its own engineers file bugs as missing eval cases or submit labeled examples.