Model evaluation, rollout and rollback
hard 7 minA model release changes a chain of decisions.
Video lesson · Chapter 1 of 4
The bilingual release switch
Theory
Read or listen first. About 2 min.
What it is
A model release changes a chain of decisions. A new prompt can change which documents are read, a grader change can move the quality score, and a different index can change every retrieved example. Package the model revision, prompt, retrieval settings, corpus snapshot and grader with the release. A score becomes interpretable when you can reproduce both the candidate and its baseline on the same tasks.
Why it exists
Offline comparison estimates performance on a chosen sample. Shadow traffic tests a candidate on current inputs while the incumbent answers users. A randomized online experiment can estimate the effect on users who actually receive each version. A canary restricts exposure and can catch operational regressions early. Each stage answers a different question. Predeclare quality, latency and cost limits, the unit of assignment and the conditions for stopping.
Should the bilingual support model ship?
Inside this chapter
Chapter sources- Paired uncertainty
- Grade both versions on the same independently sampled cases. Resample paired differences to estimate uncertainty under the sampling assumptions. If a user contributes repeated messages, resample at the user or conversation level to keep related events together.
Grading both versions on the same cases removes most of the noise that comes from which cases happened to be sampled, because each case is its own control. What remains is the disagreement: how many cases flip in each direction. Bootstrap by resampling whole cases (or whole conversations, when one user contributes several messages) and recomputing the net change; resampling individual messages from the same conversation treats correlated events as independent and makes the interval look tighter than it is.
Example. Of 200 cases, the candidate fixes 20 and breaks 12. The improvement is 8/200, or four percentage points. The discordant cases determine the uncertainty.
Another example. A code-assistant team evaluates two models on 300 repository tasks. Both solve 210, but the candidate solves 25 the incumbent missed and misses 25 it solved. The net change is zero, yet the two models are far from interchangeable, which the paired view makes visible.
Only the discordant cases move the estimate
Outcome on the same case Count Contribution Both right or both wrong (tie) 168 0 each Candidate fixes it (win) 20 +1 each Candidate breaks it (loss) 12 -1 each Net change 200 cases (20 - 12) / 200 = 0.04 Figures from the worked example. Ties stay in the denominator. - Human labels and guardrail slices
- Blind reviewers to the candidate identity, calibrate them against a small adjudicated set and inspect disagreement. Averages weight common cases heavily. A predeclared sensitive-language or accessibility slice can block release even when the aggregate improves.
Aggregate scores weight common traffic most, so a regression in a small but important population barely moves them. Declare guardrail slices (a language, an accessibility need, a high-stakes intent) and their tolerances before the evaluation runs. Use reviewers who cannot see which version produced a reply, calibrate them on a few adjudicated examples, and look at where they disagree before trusting the slice verdict.
Example. Six regressions occur in twenty Spanish-language tasks. Ask bilingual reviewers to distinguish phrasing preferences from materially wrong advice.
Another example. A medical-scheduling assistant improves overall but its screen-reader slice, 15 tasks, shows 4 new failures where buttons are described without labels. The accessibility guardrail blocks release despite the aggregate gain.
A slice gate can block an aggregate win
Slice limits are fixed before results arrive, so nobody can redraw them afterwards. - Shadow traffic and canaries
- Mirror authorized inputs to an isolated candidate with writes disabled. Measure throughput and output disagreements. Randomly expose a bounded population only when user outcomes are required, tracking delayed feedback and repeated users.
Shadow mode runs the candidate on live inputs while users only ever see the incumbent. It tells you about latency, error rates, cost and how often the two disagree, but nothing about how users react, because no user saw the candidate. A canary exposes a small random share of users to the candidate to measure real outcomes, with automatic rollback conditions agreed in advance. In both, the candidate must not perform side effects twice.
Example. Both variants propose a refund during shadowing. The shadow candidate must never submit a second refund.
Another example. A search-ranking model runs in shadow for a week and shows 30% lower p95 latency. A 2% canary then reveals click-through falls on product queries, something shadowing could never show.
Shadow mirrors, canary exposes
The candidate's refund proposal is compared, never submitted. A canary would instead send real users the candidate's reply. - Atomic release manifests
- A serving alias should resolve to a compatible bundle. Record traces with the resolved immutable version. Rollback includes adapter, template and retrieval compatibility; reverting just the weights may leave changed preprocessing active.
A serving alias such as
support-prodshould point at one immutable manifest that pins every component that shapes behaviour. Promotion and rollback both become a single pointer change, and traces record the manifest ID rather than the alias. Rolling back only the weights while leaving a new template or index in place produces a combination nobody evaluated.Example. Roll back candidate B to manifest A17 and replay the Spanish exceptions against the old prompt and index.
Another example. An extraction service rolls back its model after a bad release, but errors persist. The new tokenizer config in the same release was still live; a manifest-level rollback would have restored both together.
What the alias resolves to
Component Manifest A17 Manifest B03 Model weights rev 41 rev 44 Adapter support-es v2 support-es v3 Prompt template t-19 t-22 Retrieval index snapshot 0612 snapshot 0703 Grader g-5 g-5 Illustrative identifiers. Rolling back means pointing the alias at A17 as a whole, not reverting one row. - An interval for paired outcomes
- For each paired case record +1 for a new success, −1 for a regression and 0 for a tie. For independent cases the standard error of their mean is the sample standard deviation divided by the square root of the case count. Sparse slices and repeated users warrant different inference.
Each case contributes +1, -1 or 0, so the sample standard deviation is driven by the 32 non-zero cases. With 200 independent cases the standard error is about 0.028, and the normal approximation gives an interval that straddles zero. A slice of 20 cases gives a much wider interval, which is why slice gates usually rely on counts of material regressions reviewed by people rather than on significance tests.
Example. With 20 wins, 12 losses and 168 ties the mean is 0.04 and the standard error is about 0.028. A rough 95% normal interval runs from −0.015 to 0.095. The data still allow a small average regression.
Another example. Doubling the evaluation to 400 cases with the same win and loss rates would shrink the standard error by a factor of about 1.4, to roughly 0.020, giving an interval of about 0.001 to 0.079.
Mean and standard error of paired differences
A rough 95% interval is 0.04 plus or minus 1.96 x 0.028, about -0.015 to 0.095. Zero, and a small regression, are still plausible.
How it works
Step through the idea, or press Play.
Paired fixtures. 20 wins, 12 losses
Understand it
Worked example
Should the bilingual support model ship?
- 1
20 wins, 12 losses
The evaluation team records both outcomes for each task, retaining ties and reviewer disagreements. Eight net wins are encouraging, but they do not establish improvement for each population.
- 2
Spanish slice blocks promotion
Separate reports reveal six newly wrong responses in twenty Spanish tasks. Recheck those labels before using a global score as justification for traffic.
- 3
Candidate has no write authority
Replay representative traffic without showing candidate replies to users. Compare timeouts, first-token latency and cost under the production length distribution.
- 4
Keep the previous bundle active
A failed quality gate leaves the live alias on A17. A later corrected candidate may enter a small canary with explicit reversal conditions.
Paired change
Follow the handoffs
Release states for candidate B
What each stage can and cannot tell you
| Stage | Answers | Cannot answer |
|---|---|---|
| Offline paired eval | quality on a chosen sample | behaviour on today's traffic |
| Shadow | latency, cost, disagreement on live inputs | effect on users |
| Canary | user outcomes at small exposure | rare-slice quality with few users |
| Randomised experiment | average effect on exposed users | anything not measured |
Summary
The whole topic in one minute.
Shadowing measures operational behavior without establishing the candidate's effect on live user outcomes. A predeclared failed quality guardrail needs resolution.
Offline comparison estimates performance on a chosen sample. Shadow traffic tests a candidate on current inputs while the incumbent answers users. A randomized online experiment can estimate the effect on users who actually receive each version. A canary restricts exposure and can catch operational regressions early. Each stage answers a different question. Predeclare quality, latency and cost limits, the unit of assignment and the conditions for stopping.