Concepts / Evaluating AI Systems: A Shift in Engineering Mindset

Evaluating AI Systems: A Shift in Engineering Mindset

With a specification, the engineer's job is to produce a deterministic system that exactly matches the spec.

  • Programming

Two Engineers, Two Different Questions

Imagine two engineers who are each handed a system to build. The first receives a document that lists exactly what the system must do for every input it could receive. The second receives a collection of example cases, a rough description of what good performance looks like, and a warning that the bar may move as the project goes on. Both engineers will write code and run tests. Yet their daily work is shaped by different questions. The first engineer asks whether the system does what the document says. The second asks how well the system will perform across the situations it meets.

This article is about that difference. Moving from a specification to an eval set is more than a change in tooling or in the kind of artifact a team writes. It changes what the engineer is aiming for, and it changes how the engineer knows whether the aim has been reached.

What a Specification Asks the Engineer to Build

Definition

A deterministic system is one that exactly matches its specification. When the target is a specification, the engineer's goal is to produce such a system.

Success under a specification is a yes-or-no judgment about correspondence. The behavior either agrees with what the specification asks for, or it does not. The engineer's question is therefore a matching question: does this system, for this input, do what the document says it should do?

Because the target is a fixed document, the engineer can in principle check every case the document covers against it. Each case is judged on its own. A single mismatch is a failure of the system against the specification.

What an Eval Set Asks the Engineer to Build

Definition

A stochastic system is one that performs well on average against certain criteria. When the target is an eval set, the engineer's goal is to produce such a system.

The judgment is no longer a matter of exact agreement. It is a matter of how the system fares over the whole collection of cases the eval set represents, measured against the criteria the team has chosen. An eval set is a collection of cases, and the engineer's question is how the system performs across that collection rather than whether it reproduces a single stated answer.

Judging Each Kind of System

The clearest way to see the contrast is to ask, for each kind of system, what counts as correct. Under a specification, correctness is a case-by-case match against a fixed document. Under an eval set, correctness is an aggregate result measured on criteria that may be revised. The same input can therefore produce a fixed, checkable output in one world and a range of acceptable outputs in the other.

Fixed specificationanchor documentEval setcollection of casesExact case matchyes or no per caseAggregate performancejudged on averageDeterministic systemmatches its specStochastic systemperforms well on averagechecked againstdefinesmeasured acrossdefines
What is the criterion for correctness in each case, and how does the same input lead to a fixed output in one case but a range of outputs in the other?
QuestionSpecification targetEval set target
What is the goal?A deterministic systemA stochastic system
What defines success?Exact correspondence with the specGood average performance on criteria
How is a case judged?Individually, yes or noIn aggregate across the collection
Are the criteria fixed?The document anchors the judgmentThe criteria may need revisiting

The two targets compared on the points that shape the engineer's work

Why the Engineer's Relationship Changes

The shift is best understood as a change in the engineer's relationship with the system. In the specification world, the engineer stands in a relation of matching. The job is to bring the system into line with a stated target and then confirm that the match holds. In the eval set world, the engineer stands in a relation of stewardship over an average. The job is to shape a system whose overall behavior is good, while accepting that individual cases will vary and that the yardstick itself may be revised.

Spec documentdefines every requiredbehaviorEval setexample cases and rough barMatch each caseconfirm correspondenceSteward the averagecriteria may be revisedDeterministic systemexact agreementStochastic systemgood overall behaviorguidesproducesguidesproduces
What changes about the engineer's target and workflow when the artifact that defines success moves from a spec document to a collection of test cases?

Notice what this does to the engineer's daily questions. Under a specification, the engineer keeps asking whether the system matches the document. Under an eval set, the engineer keeps asking how the system performs across the cases it will meet, and whether the criteria still describe what the project needs. The technical work of writing code and running tests remains, but it is organized around a different aim.

Tracing an Input Through an Eval

Follow what happens when an eval set is used. A fixed collection of inputs is passed through the system. Each output the system produces is then scored against the team's criteria. The scores are gathered and read together, and the question the team asks is about the pattern across them. Variability enters at the point where the system produces its output for a given input, since a stochastic system does not have to give the same output every time. The criteria stay the same step to step within a given evaluation, but the team is free to revisit them between evaluations.

Eval set inputsfixed collection of casesStochastic systemoutput can varySystem outputsone or more per inputScoring againstcriteriacriteria may be revisedAggregate judgementperformance across the setpassed inproducesgraded bysummarized as
How do a fixed eval set of inputs pass through the system and get scored, and where does variability enter the path from input to judgement?

Worked Example: One Input, Several Runs

The example below is an invented illustration, written to show how the same engineering question is framed under each kind of target. It is not drawn from the source.

Worked example

A ticket-summary system judged two ways

A team builds a system that writes a one-sentence summary of a customer support ticket. The question is how to decide whether the system is ready. Under a specification, the team writes exact expected summaries. Under an eval set, the team collects many tickets and describes what a good summary looks like.

  1. 1
    Specification framing

    The team writes an exact expected summary for a given ticket. Running the system on that ticket produces either a match or a mismatch. A mismatch is a failure against the document.

  2. 2
    Eval set framing

    The team gathers a collection of tickets and a rough description of a good summary, such as covering the customer's problem and the requested action. The system is run across the collection and the results are judged in aggregate.

  3. 3
    Same input, different question

    For one ticket, the specification team asks whether the output equals the stored answer. The eval set team asks whether the output is good enough across the set, and whether the criteria still describe a useful summary.

  4. 4
    Revisiting the bar

    If the project discovers that customers care more about the requested action than the problem, the eval set team can revise its criteria. The specification team would have to rewrite the document to change what counts as correct.

Result

The same system can be judged by two different targets. The specification target asks for exact correspondence case by case. The eval set target asks for good average performance on criteria the team may refine.

Mistakes When Judging a Stochastic System

Engineers who are used to specifications often carry their habits into eval set work. The mistakes below are common when that carryover happens.

  • Common mistake

    Checking a stochastic system against a single expected output

    What it looks like

    The team runs the system once on a case, sees the output match the expected answer, and declares the system working.

    Why it fails

    A stochastic system does not have to produce the same output every time, and a single matching run says little about how the system performs over the cases it will meet. One pass is one sample, not evidence about the average.

    Do this instead

    Run the system across the whole collection of cases, look at the spread and the average of the scores against the criteria, and judge the pattern rather than one run.

  • Common mistake

    Treating the criteria as permanent

    What it looks like

    The team fixes its criteria in the first week and never looks at them again, even after the project's needs change.

    Why it fails

    The source describes the criteria for a stochastic system as things that may shift, so treating them as fixed ignores what the project has learned.

    Do this instead

    Revisit the criteria as the project goes on, and be willing to change them when they no longer describe what good performance means.

  • Common mistake

    Expecting exact agreement with a document

    What it looks like

    The engineer writes a single correct answer for each case and marks any different wording as a failure.

  • Common mistake

    Describing the change as only a tooling change

    What it looks like

    The team swaps a specification file for a spreadsheet of cases and assumes the work is otherwise the same.

    Why it fails

    The move from specification to eval set changes what the engineer is aiming for and how the engineer knows the aim has been reached, not just the file format.

Practice: Choosing the Right Target

MEDIUM

A team is building a system that must return exactly one of three fixed status codes for each incoming request, and any other output is wrong. A second team is building a system that drafts replies to customer emails, where many different drafts could be acceptable. For each team, state whether the target is best described as a specification or an eval set, which kind of system the team is aiming for, and what the criterion for correctness is.

Hints
  • Ask whether correctness is a yes-or-no match against a fixed document or a judgement made over a collection of cases.
  • A deterministic system is one that exactly matches its specification; a stochastic system performs well on average against criteria.

Key Takeaways

  • With a specification, the engineer's goal is a deterministic system that exactly matches the spec, judged by a yes-or-no correspondence case by case.
  • With an eval set, the engineer's goal is a stochastic system that performs well on average against certain criteria, judged over the whole collection of cases.
  • The criteria for a stochastic system may shift, so the engineer must be willing to revisit them rather than treat them as fixed.
  • The move from specification to eval set changes the engineer's relationship with the system, from matching a target to stewarding an average, not only its technical details.
  • Checking a stochastic system against a single expected output is a common mistake, because one run is not evidence about overall performance.