Evals, and nondeterminism as a constraint
Tier 9 rested on an assumption so ordinary it never needed stating: a test either passes or it does not. Given the same input, the system produces the same output, and you assert on it. Every deploy gate, every regression suite, every "the tests are green" in this course depends on that.
You cannot unit-test a model. The same input may produce different output, the output is text with many acceptable forms, and "correct" is frequently a judgement rather than a value. Assertion has nothing to grip.
Nondeterminism is an architecture constraint, not a testing inconvenience
Worth taking seriously before reaching for a solution, because it propagates outward into components that have nothing to do with models:
- Retries stop being safe by default. Lesson 6.07 built idempotency on the premise that repeating an operation reproduces its result. Here a retry produces a different answer — so idempotency has to be established at a level above the model: cache the first result against the request's key and return it, rather than re-running and hoping.
- Response caching by exact match mostly misses. The input varies, the output varies; caching happens at the prefix level inside the serving layer (11.01) rather than at the response level outside it.
- Bugs may not reproduce. "It did this once" is a real report, and a debugging process built on reproduction has to be replaced by one built on logging inputs and outputs comprehensively enough to reason after the fact.
And it is not fully removable. Even with sampling turned off, output is not guaranteed byte-identical: on parallel hardware, floating-point arithmetic is not associative, so the same request batched differently can diverge on a single token and then diverge in earnest. Design for "equivalent", not "identical" — a system that requires byte-stability from a model has a requirement the hardware will not honour.
What replaces the test suite
An eval set: a collection of inputs paired with checkable properties, scored automatically, run on every prompt change, model change and retrieval change. The shift in mindset is the important part.
You are moving from assertion to measurement. You do not get pass or fail; you get a number, and the question is whether it moved. That changes what a deploy gate can say, and it changes what "done" means for a fix.
Scoring methods, cheapest and most trustworthy first:
- Programmatic. Anything mechanically checkable: is the JSON valid, does it satisfy the schema, is the cited document the right one, does the generated code compile and pass its tests, is the extracted date the expected date. Deterministic, free, unambiguous — use this wherever it is remotely possible, and design output formats specifically so that more of your evaluation can live here.
- Reference-based. Compare against a known-good answer by similarity. Weak as a quality measure and genuinely useful for catching regressions.
- Model-graded. A second model scores the output against a written rubric. Powerful, scalable, and it introduces a nondeterministic component into your measurement instrument — so it must be calibrated against human labels on a sample, or you are measuring the grader rather than the system.
- Human. The ground truth, and the bottleneck. Its highest-value use is not running the suite but calibrating the automated graders that do.
The discipline that makes it work
Every production failure becomes an eval case. That is Lesson 9.09's action item with a mechanism attached, and it is the only real defence against the characteristic failure of prompt-based systems: a change that fixes the reported case and quietly breaks three others. The set grows monotonically and accumulates everything the team has learned, which makes it the most valuable artefact the project owns — more than the prompt, which it can regenerate.
What it buys you at the deploy gate is narrower than "tests pass", and it is honest: the aggregate score did not regress, and these specific critical cases still pass. Combine that with 9.05's canary and 8.05's kill switch and you have a shipping story — measurement before, limited exposure during, fast reversal after.
Runs cost real money and real time, so tier them: a fast critical subset on every commit, the full set nightly. That is Lesson 7.03's batch-versus-stream reasoning applied to your own test suite, and the same rule decides it — what does it cost for this answer to be a few hours old?
The uncomfortable part, said plainly
You are shipping a component whose behaviour you cannot fully specify. That is a legitimate engineering position for many problems, and deciding it is unacceptable for a particular one is equally legitimate — that judgement is yours to make explicitly rather than to discover later.
What architecture can do is bound it. Constrain the output where the shape allows (enumerated choices and structured formats are far more checkable than prose). Validate what comes back rather than trusting it. Keep a deterministic path for the decisions where a wrong answer is unacceptable, and let the probabilistic component advise rather than decide. Lesson 9.04's containment thinking transfers directly: the question is not whether this component will be wrong, but what it is allowed to be wrong about.
An eval set built from cases the system already handles. Every one passes, the number reads 97%, and it measures nothing — it is a record of solved problems, and it will stay at 97% through every regression that matters. An eval set is worth exactly what its hardest cases cost you: the ambiguous ones, the adversarial ones, the ones where reasonable people disagreed about the right answer, the ones that embarrassed you in production. A suite that is comfortable to run is not testing anything.