Course contents
Production Eval Loops
Wire evals into CI, releases and live traffic: per-case regression gates, canaries, the model-migration ritual, and the flywheel that turns every failure into a permanent test.
Evals pay off when they run on their own, at every point where behavior can change: before a change merges, before it reaches all users, and continuously in production. Each stage feeds the next, and production feeds back into the dataset. That loop is what separates a system that improves from one that oscillates.
Before merge: evals in CI
Run evals on every change to prompts, retrieval, tools, model config or guardrails, exactly like tests, because that's what they are. Use tiers: a fast smoke suite (a few dozen cases, mostly code checks) on every pull request, and the full suite (hundreds of cases, judge-graded) nightly and before releases. Gate on two things: the pass rate stays above a threshold, and no case that passed before now fails. Aggregates hide it when a fix for one case breaks three others. Post the per-case diff on the pull request, the way code changes ship with test results. Keep judge costs sane by using a small, calibrated judge model and caching verdicts for unchanged outputs.
Know how far a number can move by chance. On a 50-case suite each case is worth two percentage points, so a one-case change is noise, and a judge-graded case can flip between runs on its own. Two habits help: run judge-graded cases two or three times and count a case as passing only when it passes consistently, and grow the suite until a change you care about is several cases wide. When the average and the per-case diff disagree, believe the diff, and read the cases that moved.
Why gate CI on “no regression in a previously passing case” and not only on the overall pass rate?
Before full release: canaries and shadow mode
Roll AI changes out like risky infrastructure changes, because they are. Canary the new prompt or model on a small share of traffic, compare quality proxies and cost against the current version, then ramp up, keeping the old configuration one switch away. For high-stakes surfaces, run shadow mode first: the new version processes real traffic alongside production, its outputs are judged offline, and users never see them.
Model migrations get the full ritual
Model changes are the biggest behavior changes you'll ship, and some come with a deadline you don't choose, like the retirements and reroutes on the calendar for late 2026. Treat every migration as a release:
Put a model migration in order.
- Canary the new model on a small share of traffic and compare proxies and cost
- Run the full suite on the candidate model
- Ramp up, keeping the old model one config change away until the numbers hold
- Record a baseline: run the full suite on the current model and save per-case results
- Read the per-case diff, starting with regressions on cases that passed
- Fix prompts, parsers or schemas for those regressions and rerun
In production: online evals and the flywheel
In production, judge-grade a sample of live traffic for groundedness and policy compliance, watch the quality proxies from aa-20, and capture feedback. Then close the loop: every confirmed production failure becomes a golden-dataset case, with its trace attached. Production failures become eval cases, eval cases prevent recurrence, and quality ratchets forward. Teams that skip this re-fix the same failure every quarter and call it firefighting.
Online grading sends real conversations to another model, so it inherits every privacy rule of the main path: redact before grading, keep judge traces under the same retention and access limits, and sample only what you need. A 1–2% sample graded consistently tells you more than a large sample graded once and forgotten.
Where in the loop does each activity belong?
Run 40 smoke cases on a pull request that edits the reply prompt
A reroute with a date on it
It's mid-November 2026. Your order-summary feature calls gemini-2.5-flash, which Google will reroute to gemini-3.8-flash on December 1.
What do you do this week?
Plain-English definitions from the AI Coding Dictionary.