Production eval engineering: gates, golden sets, shadow and A/B tests

Reading: 30 min, plus 7 in closed details. Child of Topic: evaluation-and-llm-judges. Sources are linked inline; data as of October 2026.

The idea in one sentence. A change to a shipping LLM product (a prompt edit, a model swap, a retrieval or tool change) reaches users only after it beats the incumbent configuration, the champion, at every stage of a promotion path whose stages are each cheaper than the failure they stop, and every failure found at any stage becomes a new tagged item in the golden set the first stage reads.

Cheap stages run first; each catches what the stage before cannot (the figure). An offline gate sees regressions on your own cases in minutes but only on inputs you thought of; shadow traffic sees real inputs but no user reactions; only an A/B test sees whether people accept, retry, abandon or escalate; only monitoring sees decay after launch. The loop underneath is what keeps the first stage honest: failures found later are read, named and promoted into the golden set (sections 1 and 2).

You need

New terms

  • Champion, challenger: the configuration now serving, and the candidate change.
  • Golden set: the frozen, versioned, tagged list of inputs with expected behaviour that every change is scored on.
  • Slice: the items sharing one tag (intent, difficulty, source incident).
  • Gate: a rule that turns scores into pass, fail or review.
  • Shadow: the challenger runs on mirrored live requests; only the champion's answer is served. Canary: a small share of real traffic gets the challenger.
  • Guardrail metric: a metric that must not get worse, though the change is not meant to improve it.
What this page owns, and what it links to
The pipeline: building eval sets from real traffic, golden sets, gates in CI, budgets, online evaluation, shadow and A/B tests, monitoring, eval drift and the tools compared by design. Harness mechanics are on Eval harnesses; judge design and bias on LLM-as-judge; standard errors, power and sample sizes on Eval statistics; gold-label auditing on Human evaluation and annotation; tracing on LLM observability; retrieval-specific monitoring on RAG in production; trajectories on Agent and trajectory evaluation.

Cost rises, and users are exposed, as a change moves right

The five stages in one table (reference)
StageQuestion it answersWhat trips itCost and timeCatches what the stage before cannot
1. Offline gate on frozen golden sets, in CIDid this change break anything we already know matters?A paired drop against the champion beyond a threshold in any slice; a hard floor on safety slices; a failing deterministic assertionMinutes per change; judge calls cost moneyRegressions on your product, which public benchmarks never see
2. Budget gateCan we afford it, and is it fast enough?Tokens per request, p95 latency or projected spend above budgetSeconds (computed from stage 1's runs)A quality win that the business cannot pay for
3. Shadow deploymentDoes it hold on real traffic?Per-intent score distributions of challenger against champion on the same mirrored requests; errors; latencyDoubles inference for the mirrored share; nothing reaches usersInputs nobody imagined when building the golden set: real traffic is uglier than any curated set
4. Canary, then A/B testDo users and the business actually come out ahead?Guardrail metrics (errors, refusals, complaints, task completion) crossing a rollback trigger; the primary metric not improvingDays to weeks; real users exposedWhat only behaviour shows: whether people accept, retry, abandon or escalate
5. Monitoring after full rolloutIs it still good?Drift in sampled judge scores, implicit signals or input mix; silent provider-side changesContinuous; a sampled share of live tracesDecay after launch: traffic, product and the model behind an API all move

Keep every configuration pinned and logged (prompt hash, model version, judge model and prompt version, dataset version) so that any score can be reproduced and a change in score traced to the one thing that changed. On the root page's five layers of evaluation (Reading, section 1), these are the two most expensive layers: regression gates and online measurement.

1. Error analysis: where eval items come from

An eval set is not written from imagination. It is read out of real traces: you look at what the system actually did, name the ways it fails, and only then write a check for each named failure. Hamel Husain and Shreya Shankar's FAQ gives the working numbers: review "at least 100 traces", annotate "at least 30 traces yourself", and stop at theoretical saturation, "meaning new reviews stop revealing failure modes or changing existing ones" (evals FAQ, read 2026-10-24). They report having "spent 60-80% of our development time on error analysis and evaluation". Fig. 1 walks the loop on this page's running example.

Fig. 1's traces are the challenger's 159 graded turns from section 3, and a trace fails when it scored below the champion on the same turn. MT-Bench's category stands in for the failure mode: real axial coding names modes from the notes, not from a tag the data already carries. The counts, the reading orders and the three examples are computed from LMSYS's released grades.

  1. Sample traces. Traces stream in from production, a shadow run or a beta; here, 159 of them in one random reading order. Mix sampling methods from random to targeted (closed block below): targeted sampling finds only what you already suspect.
  2. Open coding. Read each trace and write what went wrong in your own words, with no rubric yet; annotate at least 30 yourself before reading any model's suggestions. Here 45 of the 159 scored below the champion, and each gets a note.
  3. Axial coding. Group the notes into a failure taxonomy: named modes you can count, which the FAQ calls "the most important step". Here the 45 fall into 7 categories; humanities has none.
  4. Count. Tally each mode: writing 12, reasoning 7, roleplay 6, extraction 6, STEM 6, coding 5, math 3. The counts order the work: a frequent mode gets an evaluator and a fix first; a rare but severe one may get a hard floor.
  5. Saturate. Keep reading until new traces stop revealing modes or changing existing ones. In this order the seventh category first appears at trace 57; over 1,000 seeded random orders, after a median of 56 traces, by trace 91 in 90% of them, and within 100 traces in 949. A small taxonomy can need most of the 100 traces the FAQ asks for.
  6. One evaluator per mode. A code check when an objective rule identifies the failure; otherwise an LLM judge, validated on human-labelled examples of that mode. Binary pass or fail.
  7. Promote. Confirmed failures become tagged items in the next golden-set version, each mode its own slice for the gate (section 4). The three worst writing drops (question 86, 8 to 4; question 89, 10 to 7; question 81, 10 to 8; all second turns) are all rewrites under an explicit constraint, so they share a name, "constrained rewrite". Failures found later by shadow, A/B tests or monitoring re-enter at step 1.

Name the failure before you measure it. Notes first (open coding), categories second (axial coding), evaluators third: a rubric written before reading "can get in the way", because "Reviewers can become so focused on checking each item that they overlook problems outside the rubric".

Binary labels, one failure mode per evaluator. The FAQ prefers pass or fail to 1 to 5 scales: "Binary evaluations force clearer thinking and more consistent labeling", while on Likert scales "annotators often default to middle values". Each named mode gets either a code check, when an objective rule can identify it, or a judge validated on "100 to 200 examples for each failure mode" (judge design and its agreement measures: LLM-as-judge).

How to pick which traces to read (five sampling methods)
MethodWhat it doesMain limitation
RandomSelects traces with equal probabilityA small batch can miss rare cases
ClusteringGroups traces by similar content and selects from each groupDepends on the features and clustering choices
Data analysisReviews extreme values such as latency or tool countAn extreme value may have nothing to do with quality
ClassificationAn evaluator or another model flags likely failuresFavours problems the classifier already knows how to find
FeedbackTraces with negative user feedbackMisses problems that users do not report

The table runs from most exploratory to most targeted; start exploratory, lean on signals as you learn, and "Keep some random traces in every batch" (same FAQ). Where traces come from and how they are sampled and redacted at collection time is LLM observability's subject.

Promotion: how a failure becomes a golden item

Every confirmed failure becomes a new tagged item and, where a judge grades it, a rubric criterion. Teams describe the same path: DoorDash, "Newly identified issues are systematically added to Promptfoo test suites" (Dasher support automation, Sep 2024); Vercel for v0, "we add new, failing prompts to the eval set" (Eval-driven development, 17 Oct 2024); Anthropic, failures from the bug tracker and support queue become new tasks, and capability evals the system has learned to pass "graduate" to the regression suite (Demystifying evals for AI agents, 9 Jan 2026).

2. Golden sets

A golden set is the instrument the gate reads, so it is built and maintained like code: sources in, tagged items, two suites with different jobs, a version number.

The tags make per-slice gating possible; the split keeps the pass rate readable (the figure). A regression item guards something that already works and should pass almost always (Anthropic: regression suites "should have a nearly 100% pass rate"); a capability item measures something the system cannot yet do and is expected to fail often. One pass rate over both moves for reasons nobody can read. Notion's team, in a Braintrust case study (vendor page, undated), notes that a new model "might pass a regression eval at 100%", which is why they also keep frontier evals: a set everyone passes has stopped measuring.

  • Sources: a representative slice of real traffic, deduplicated and scrubbed of personally identifiable information (PII); regression cases (every production incident becomes a test); adversarial and edge cases; and safety canaries, items that must always be refused or always be answered.
  • Each item carries an input, the expected behaviour (a reference answer, a rubric, or programmatic checks) and metadata tags: intent, difficulty, source incident. Section 3's animation could split its 160 turns only because MT-Bench tags every question with a category.
  • Size: the practical range is 100 to 500 items per product surface; smaller sets can gate only large effects, larger ones rot because nobody maintains them. Anthropic: "20-50 simple tasks drawn from real failures is a great start"; Hamel Husain and Shreya Shankar: regression sets "grow to 100 or more examples"; GitHub Copilot runs "more than 4,000 offline tests". Write each gate's minimum detectable effect next to its threshold, so nobody believes a 20-item slice can see a half-point drop (how many items a threshold needs, power and the minimum detectable effect: Eval statistics, section 7).
Published golden-set sizes, team by team

Teams sit on both sides of the 100 to 500 range because they mean different things by an item:

Team, dateWhat they gate on
Anthropic, Demystifying evals for AI agents, 9 Jan 2026"20-50 simple tasks drawn from real failures is a great start"; regression suites "should have a nearly 100% pass rate"
Uber, Enhanced Agentic-RAG, 29 May 2025A "golden set of 100+ test queries" curated by experts; evaluation time cut "from weeks to minutes"
Rechat (Hamel Husain, Your AI Product Needs Evals, 29 Mar 2024)"hundreds" of assertion-style unit tests, updated from new failures, run in CI on every change
GitHub Copilot (How we evaluate AI models, 17 Jan 2025)"more than 4,000 offline tests, most of them as part of our automated CI pipeline": about 100 containerised repositories with deliberately broken tests, and more than 1,000 chat questions graded by an LLM judge
GitLab Duo (How we validate and test AI models at scale, 9 May 2024)"thousands of prompts tied to dozens of use cases" as a "proxy for production" without customer data; a focused subset during development, the broad set before release, and a daily run against the previous day's baseline

The FAQ's other working numbers: "Start with 100 diverse traces and annotate at least the first 30 yourself"; in CI, "Favor assertions or other deterministic checks over LLM-as-judge" (evals FAQ, September 2026 revision). Anthropic's own documentation leans the other way on volume: "More questions with slightly lower signal automated grading is better than fewer questions with high-quality human hand-graded evals" (Develop tests).

Lifecycle: a golden set decays

  • Decay. It drifts away from reality three ways: the product changes, traffic changes, and the set leaks into prompts and fine-tunes. Refresh it on a schedule from recent traffic and error analysis; the FAQ adds that if "everything keeps passing", an eval should be run less often or retired.
  • Criteria drift. Shankar et al. found that "users need criteria to grade outputs, but grading outputs helps users define criteria" (Who Validates the Validators?, Apr 2024): the expected behaviour changes as people read outputs, so rubrics are versioned with the items.
  • Versioning. Any edit to the set is a reviewed change, and the champion is re-scored on every new version: a v2 score is a reading on a different instrument and never shares a chart line with v1.
  • A held-out split that is never published or sent to a vendor that might train on your traffic.
  • Gold labels are fallible. Before a gate failure is believed, audit the failing items: the eval system has three fallible parts (model, judge, gold). Keep "ambiguous, exclude from gating" as a valid label state and gate on the verified subset (auditing method and error rates: Human evaluation and annotation; the root page's attribution stepper shows the split on six physics benchmarks).

One tagged item, sorted into suites with different jobs

3. One model swap, two gates

The running example, on real released grades. The champion is claude-v1; the challenger is the cheaper claude-instant-v1, the cost-down swap every product team runs. The golden set is MT-Bench: 80 two-turn questions in 8 categories of 10, so 160 graded turns in 8 tagged slices, each graded 1 to 10 by GPT-4. Every grade is LMSYS's own released judgment (gpt-4_single.jsonl, mid-2023), not a simulation. Predict first: the two means differ by a few hundredths of a point; will any slice fail? Then let Fig. 2 run with one aggregate threshold, and again with thresholds per slice (the two buttons swap steps 5 and 7).

  1. The golden set. 160 graded turns: 80 questions, two turns each, each tagged with one of 8 categories, 20 turns a slice. The tags are what make per-slice gating possible; a set without them can only be averaged.
  2. Score the champion. GPT-4 grades each of claude-v1's 160 turns from 1 to 10: 160 judge calls, mean 7.90. In a real pipeline these grades are cached; only the challenger is re-scored on each change.
  3. Score the challenger. Another 160 calls; claude-instant-v1's mean is 7.91 over 159 grades. One call (crossed out) never produced a grade, so that turn is dropped from both sides, leaving 159 pairs.
  4. Pair them. Same item, two models: subtract, and each bar becomes the change on that turn, red below the plinth, green above. 45 turns got worse, 83 stayed level, 31 got better. Pairing removes each item's own difficulty from the comparison, the cheapest gain in a gate's sensitivity.
  5. The aggregate gate. All 159 changes pool into one pillar: −0.03 points (95% interval −0.48 to +0.41), short of the 0.25-point threshold plate: pass. The writing row is mostly red, and nothing in this rule can see it.
  6. The budget gate. Computed from the same runs, so it costs nothing extra: the challenger's list price is 6.8 times lower for prompts and 5.9 times lower for completions, and its answers are 7% shorter: pass. Latency was not recorded in this data, so that half of the gate cannot be shown.
  7. Decision. Both gates passed (320 judge calls, $8.97), so the swap goes on to shadow traffic. If users write and edit text in this product, they will be the ones who find the writing regression.

Thresholds are illustrative and the same in both runs: the aggregate gate fails a mean paired drop of 0.25 points or more; the per-slice gate fails a slice whose mean paired drop is 0.5 points or more and whose 95% interval lies wholly below zero, and sends a drop of 0.5 or more whose interval still reaches zero to review instead of passing it. Paired t intervals over graded turns, a question's two turns treated as independent; across all 561 MT-Bench model pairs the clustered standard error is a median 1.10 times the paired one (range 0.90 to 1.26), but for this pair the ratio is 1.00, so the intervals stand (measured on Eval statistics). Every threshold and any pair of the 34 graded models: Gate designer.

The three writing drops, with GPT-4's verdicts

    The average hid a one-point writing regression. Over the 159 turns both models have a grade for, the swap moves the score by −0.03 points; split by the tags the set already carries, writing drops 0.95 points (95% interval −1.51 to −0.39), and math improves by about as much as writing falls, which is why the mean did not move. Per-slice thresholds cost nothing extra; they only need the tags.

    A flaky judge, in the released data
    One of the 320 judge calls in this run produced no grade: on question 128 (coding, turn 2) GPT-4 wrote 9,516 characters, repeating "The assistant's function does not correctly..." 63 times, and never emitted a [[rating]], so the file records −1. Across all 34 models, 4 of 5,440 judgments failed this way, all on second turns, all about 9,500 to 12,000 characters long. A gate must decide what an unparsable verdict means (here: drop the pair from both sides, and count it), never average it in as a score.
    The same judge failure inside a published leaderboard number
    The released file gives claude-instant-v1 a mean of 7.906 over its 159 valid grades, which is what FastChat's show_result.py computes today (it drops grades of −1). The LMSYS leaderboard table prints 7.85 for Claude-Instant-1 (and 7.90 for Claude-1, which matches). Averaging the failed grade in as a score of −1 over all 160 turns gives exactly 7.850. So the published figure most likely counts a judge failure as the model's worst-ever answer and understates the model by about 0.06 points; whether the table was built with an older version of the script is not stated anywhere we found. Recomputed in src/recompute.py.

    4. Regression gates in CI

    The gate in section 3 combines four kinds of rule, run on every pull request:

    • A paired drop against the champion, per slice. Same items, both configurations, compared per item. Gating 8 or 20 slices at once means some fire by chance on every run: use a stricter level per slice, or gate on the aggregate and the slices that matter and treat the rest as diagnostics (Eval statistics has the arithmetic).
    • Hard floors on safety slices, where no trade is allowed: Vercel keeps refusal and safety evals at "a 100% pass rate" while other evals may move.
    • Deterministic assertions: the format parses, the tool call is valid, no forbidden string, the right citation. Cheap and exact, and the first of Hamel Husain's three levels (assertion tests on every code change, human and model evaluation on a cadence, A/B tests after significant product changes).
    • Budget limits computed from the same runs (section 6).

    Fig. 3 runs them in order, cheapest first, on the swap of section 3.

    1. Cheapest first. Four gates in the order a pull request meets them: deterministic assertions (no model calls), a safety floor that must stay at 100%, the paired per-slice judge gate (320 GPT-4 calls, $8.97 for this swap), the budget gate (the same runs, no new calls); then shadow. Block sizes are not measurements.
    2. A broken change stops early. A change that breaks the output format (illustrative) fails the first gate and goes back to its author; nothing after it runs, so no judge calls are spent on it.
    3. The swap reaches the judge gate. It passes the assertions and the safety floor (illustrative: MT-Bench has neither), then 320 judge calls score both models, and writing fails with −0.95.
    4. Three outcomes, not two. A gate result has three outcomes: pass, fail, and "cannot tell", which escalates to more samples or a human. Pass goes on to the budget gate, fail back to the author, and extraction (−0.70, interval reaching +0.47) to review. "Re-run until green" turns a gate into a random number generator with a bias toward shipping.
    5. Flaky runs. The same configuration run three times (illustrative) should give the same verdicts; an item that flips between runs is quarantined, then fixed or removed. Temperature 0 does not prevent this, and 1 of this swap's 320 judge calls returned no grade at all (below).
    6. Pin and log every run. Each gate run is logged with its pinned configuration, so a failure can be replayed (the practice below).

    Flaky evals

    A gate that fails on an unchanged configuration trains everyone to ignore it. Three sources are well documented:

    • Temperature 0 is not deterministic on a shared server. Thinking Machines sampled one prompt 1,000 times at temperature 0 and got "80 unique completions", the first divergence at token 103, because server load changes the batch size and the kernels are not batch-invariant (Defeating Nondeterminism in LLM Inference, 10 Sep 2025). Through a provider API you cannot fix this, only measure it: score each item K times and gate on the mean. OpenAI's seed is "best effort" (API reference); Anthropic: "Even with temperature set to 0, the results will not be fully deterministic", and "Models released after Claude Opus 4.6 do not support setting temperature" (Messages API).
    • The judge is a model too. 4 of 5,440 GPT-4 judge calls in the MT-Bench file never emitted a grade. Parse failures need an explicit rule, and a judge model or prompt change is a new instrument that needs re-baselining (the root page's Calibration section and LLM-as-judge).
    • Agents fail some trials and pass others. Report pass^k (every one of k trials succeeds) beside pass@k: Anthropic's example is a 75% per-trial success rate becoming (0.75)^3, about 42%, over three trials (Agent and trajectory evaluation owns this).

    Practice: pin every version, cache champion outputs, re-score K times where decoding is nondeterministic, quarantine items that flip on an unchanged configuration and fix or remove them, and log every gate run with its configuration so a failure can be replayed.

    Measured cost of making inference deterministic, and the deprecations
    With batch-invariant kernels all 1,000 of Thinking Machines' completions were identical, at a cost of 26 s rising to 55 s for the run (42 s with an improved attention kernel). OpenAI's API reference adds "Determinism is not guaranteed" to the seed parameter. Anthropic's temperature parameter is now deprecated, so a gate that relied on temperature 0 for repeatability has to move to K samples.

    5. The tools, by design

    Every app-level eval tool stores the same three things (a dataset, the task's outputs, scores), but they differ in what counts as a failure, and the default is often stricter or looser than you think. Versions and products move fast: this is one dated table (docs read 2026-10-04; running and installing them is Eval harnesses; their tracing side is LLM observability).

    The table below compares seven of them by design; the image shows what one of them, promptfoo, puts in front of the person reviewing a gate.

    Retirement: OpenAI's Evals platform "will become read-only for existing users on October 31, 2026, and the platform is scheduled to shut down" on 30 November 2026. Export gate history now.

    promptfoo's web viewer: pass-rate bars for five models, a histogram of test scores, and a matrix with one column per model showing its pass rate, token counts, latency and each output marked PASS or FAIL
    What a gate's evidence looks like: one column per configuration, the pass rate on top (75.00% passing, 6 of 8 cases), cost and latency per column (the budget gate's inputs), and every output with its verdict underneath, so a FAIL cell opens straight into error analysis. Real promptfoo web viewer, five open models on 8 test cases. Credit: Promptfoo, MIT licence, source (cropped).
    ToolWhat an eval isCompared againstWhat fails the buildLive traffic
    promptfoo
    open source (MIT)
    A config: prompts x providers x test cases; a test passes when the weighted score of its assertions reaches its thresholdSide by side in one matrix (image below)eval exits with code 100 "when there is at least 1 test case failure or when the pass rate is below the threshold set by PROMPTFOO_PASS_RATE_THRESHOLD"; default 100%, no failures allowedNot in the pages read
    DeepEval
    Python, pytest-based
    pytest tests calling assert_test() with metric thresholdsEach metric's threshold"when a metric falls below its threshold the assertion fails, so the build goes red"; flaky=True turns a failure into a warning for cases that "flip between passing and failing across runs"Not in the pages read
    Braintrust
    commercial
    Eval(data, task, scores) in your code, stored as an experimentA baseline experiment, by default the most recent on the same git branch; a GitHub Action posts per-row score deltas to the pull request, regressions in redbt eval exits non-zero only if an eval throws, so a score gate is your own reporter returning falseScoring rules at a sampling rate
    LangSmith
    commercial
    pytest or SDK experiments; a pass feedback key per test caseA chosen experiment; the view counts runs that "regressed" or "improved"pytest assertionsOnline evaluators at a sampling rate
    Langfuse
    open source (MIT outside ee/)
    Evaluation rules over traced observations: filters, a sampling rate, evaluator assignmentsNot in the pages readNot in the pages readIts design centre: rules score live traces; "A typical evaluation costs $0.01-0.10 per assessment"
    Inspect
    UK AI Security Institute
    A Python task: dataset, solvers, scorer; a log per runYour own code over two logsNo score gate built in: fail_on_error stops a run on sample errors (or above an error share such as 0.1); the docs say to "always check their status"Not in the pages read
    OpenAI Evals API
    being retired
    Graders with a pass_threshold; a run reports passed, failed and errored countsRuns of one evalYour code over the countsNot in the pages read

    6. Cost and latency budgets

    The second gate reads tokens per request, p95 latency and projected spend from the runs the first gate already made, so it is nearly free. A model swap that wins on quality at 3 times the cost fails promotion unless someone explicitly waives it. Latency belongs in it from the start: Honeycomb's query assistant saw responses take "from two to 15+ seconds" (All the Hard Stuff Nobody Talks About, 26 May 2023); GitHub describes Copilot model choices as a trade between acceptance rate and latency (17 Jan 2025); Discord measures tokens per second during a limited release "to predict the costs of a complete launch" (Developing Rapidly with Generative AI, 12 Apr 2024).

    Model choice is a Pareto problem: plot quality against cost per request (and latency) for every candidate; only points on the frontier are candidates. Predict: as your traffic becomes mostly prompt tokens, does the cheap Claude model join the frontier? Drag the share.

    The frontier depends on your traffic's token mix. The four strongest models in the MT-Bench file at their mid-2023 list prices: at 75% prompt tokens the frontier is gpt-3.5-turbo and gpt-4; claude-instant-v1 joins it above a 90.5% prompt share (5.51 − 3.88 x share ≤ 2), where its blended price drops below gpt-3.5-turbo's (blended price = share x prompt price + (1 − share) x completion price; recomputed in src/recompute.py). A 2023 snapshot to show the method, not advice: re-run the frontier on every price or model-version change.

    Three practical additions. Cascades and routing: a cheap model with escalation on low confidence or judge-flagged outputs often beats any single point (routers: Gateways and routing). Quality per dollar as the gate metric on cost-sensitive surfaces. And the frontier is re-run, never cached.

    The evals' own bill

    The gate costs money too, and judge calls dominate it. Section 3's run took 320 GPT-4 calls averaging 775 (617 prompt, 159 completion) tokens each (counted with GPT-4's tokenizer on the released prompts and judgments): $8.97 for the two models, or $0.028 per call at the 2023 price of $0.03 per 1,000 prompt tokens and $0.06 per 1,000 completion tokens (OpenAI pricing, May 2023 capture). Small per run, but a gate runs on every change, an online judge on a share of all traffic, and the champion must be re-scored whenever the judge changes.

    • Vercel: "LLM evals still cost 1.5x to 2x more than code-based grading", so deterministic checks go first (17 Oct 2024).
    • LinkedIn "had to set timetables for when it was ok to test the product or not, as it'd consume too many tokens" (Musings on Building a Generative AI Product, 25 Apr 2024).
    • Checklist judges move the economics: grading all of WildBench 1,000 times costs $27.7 with Gemma-2-2B against $3,400 with GPT-4o, at a near-identical model ranking but weaker per-item agreement, so they suit aggregate and drift gates, not single-item verdicts (RocketEval, paper page). Panels of small judges exist because scoring production traffic with a frontier judge inverts the economics; the root page's Judge atlas tab compares judges.

    Drag the prompt share: the frontier changes

    7. Online evaluation

    Offline evals catch the regressions you anticipated; online measurement catches what the golden set could not imagine. The instruments: sampled judge scoring of live traces (asynchronous, outside the request path, usually reference-free because live traffic has no reference answers); implicit signals (retry and regenerate rate, how much users edit an output, abandonment, escalation to a human); explicit feedback (thumbs, ratings); and the business or task-completion metric itself. The first design decision is how much traffic to judge.

    The judge bill scales with the sampling rate; the rare slice is what runs short. Defaults: 1 million requests a day and $0.03 per judged trace, inside Langfuse's "A typical evaluation costs $0.01-0.10 per assessment" (LLM-as-a-judge); at 1% that is 10,000 judged traces and $300 a day (cost = requests x rate x price). The shaded bands are the vendor advice: Braintrust suggests "lower rates (1-10%)" for high-volume applications and "50-100%" for low-volume or critical ones (online scoring); LangSmith's example scores "10% of traces" (online evaluators). An intent that is 2% of traffic (illustrative) gets only 200 judged traces a day at 1%: sample by slice, not only uniformly, when a small slice matters.

    • Their delays differ by days. LinkedIn's annotators "give more granular feedback but have a ~1 day turnaround", while member metrics "can take 3+ days for a single change"; their linguists rated up to 500 conversations a day (25 Apr 2024).
    • Offline rankings often fail to predict online ones. Copilot Arena's in-editor preference ranking had "low correlation (rs ≤ 0.1) with most static benchmarks" (0.62 with Chatbot Arena's coding ranking). And the online metric is itself a proxy: for Copilot, acceptance rate "correlates best with aggregate productivity" among usage measures, at only ρ = 0.24 (Ziegler et al. 2022).
    • Divergence is an alarm on the offline set. If a challenger wins offline and loses online, the golden set or the judge is miscalibrated for current traffic: find the divergent segment and feed it back into the golden set (section 1's loop).
    • Online judge scores inherit every judge failure, plus sampling bias (which traffic gets scored) and label lag; correct them with the judge's true- and false-positive rates measured on a human-labelled slice, and "track confidence intervals" (Hamel Husain and Shreya Shankar's FAQ). How to correct a judge-derived rate: LLM-as-judge.
    When every number looked fine: GPT-4o, April 2025
    OpenAI shipped a GPT-4o update on 24 to 25 April 2025 that was markedly sycophantic, and rolled it back; "The full rollback took around 24 hours". In their account, "offline evaluations, especially those testing behavior, generally looked good" and "the A/B tests seemed to indicate that the small number of users who tried the model liked it"; "some expert testers had indicated that the model behavior 'felt' slightly off", and "We also didn't have specific deployment evaluations tracking sycophancy." The update had leaned on thumbs-up and thumbs-down signals, and they "focused too much on short-term feedback". Their fixes are pipeline fixes: behavioural issues become launch-blocking, an opt-in alpha phase, and "blocking launches based on proxy measurements or qualitative signals, even when metrics like A/B testing look good" (Sycophancy in GPT-4o, 29 Apr 2025; Expanding on what we missed with sycophancy, May 2025). An online metric users can reward can be gamed, and a golden set without a slice for a failure mode cannot see it.

    Sampling rate against judged traces and the judge bill

    8. Shadow, canary, A/B tests and interleaving

    Four ways to put a challenger in front of real traffic, from no user exposure to full randomisation. They differ in who sees the challenger's answer, and therefore in what they can measure (Fig. 4):

    1. Today. Every request goes to the champion, and every answer comes back from it.
    2. Shadow. The router mirrors each request (or a sampled share) to the challenger; its answer is logged, never served. Both see the same request, so the comparison is paired by construction, but no user ever reacts to the challenger.
    3. Canary. A small share of real traffic is served by the challenger: here one request in ten, KServe's example canaryTrafficPercent: 10. Guardrail metrics are watched against a rollback trigger.
    4. A/B test. Users are randomised between the arms (half each here, illustrative); each sees one arm, and a primary metric is compared between different users: unpaired, and slow to reach significance.
    5. Interleaving. One user's list is merged from both rankers' results, and a click credits the ranker whose item was chosen: paired inside one user's list, which is why it needs so much less traffic. It fits only outputs that are lists.

    Only designs that show the challenger to users can measure user reactions; only paired designs get high sensitivity cheaply. The details of each, with the infrastructure that implements it:

    Shadow

    The challenger runs on mirrored production requests; its responses are logged, never served. Scored on the same requests as the champion, the comparison is paired by construction, and score distributions are diffed per intent. Microsoft's experimentation platform: shadow experiments "compute the treatment and control response for the same user, but only show them the control response", which makes metrics "more sensitive than regular A/B tests"; the limit is that "metrics that need user response cannot be evaluated in shadow experiments" (How to Evaluate LLMs: A Complete Metric Framework, 27 Sep 2023).

    • What shadow catches: the gap between curated and real inputs; errors, timeouts and rate limits (the same framework tracks the 90th and 95th percentile of HTTP 429 errors and time to first token); latency under real load. Cost: inference doubles on the mirrored share, plus judge calls; mirror a sample.
    • Agents: shadow whole trajectories, not single turns, and make every tool with side effects a dry run or a sandbox in the shadow path: a mirrored agent that really sends the email is not a shadow.
    • Infrastructure supports it: AWS SageMaker shadow tests copy requests to a shadow variant at a chosen "traffic sampling percentage", return "Only the responses of the production variant", and compare latency and errors for 1 hour to 30 days (shadow tests); Seldon Core 2 mirrors traffic to a model whose responses "will not be returned to the caller" (experiments). Quality scoring of the shadow responses is yours to add. In a service mesh, Istio's mirror with mirrorPercentage sends the copies "as 'fire and forget,' which means that the responses are discarded" (Istio docs, mirroring), so the shadow service must log its own outputs.
    • When a request cannot safely run twice and its content cannot be read: serve, bill and rate-limit from the old version only, call the model once and replay its output to both versions, compare every intermediate step (the accepted settings, each piece of the prompt), and log only a text-free record of where the first difference is and the two lengths; records that one bug leaves identical group into a fingerprint to fix one at a time. Anthropic shadowed the Python-to-Rust port of its Messages API this way (Migrating our Messages API to Rust).

    Canary and A/B

    A canary sends a small share of traffic (or only staff: GitHub runs an internal canary with its own employees before Copilot changes reach customers) to the challenger, with guardrail metrics (error rate, refusal rate, complaints, task completion, cost per session) and automatic rollback triggers; then a progressive rollout. Google's SRE workbook defines canarying as "a partial and time-limited deployment of a change in a service and its evaluation", compares the canary against a concurrent control rather than against yesterday because "time is one of the biggest sources of change", and keeps the metrics to "perhaps no more than a dozen" (Canarying releases). An A/B test randomises users between champion and challenger and compares a primary metric; Anthropic notes A/B results take "days or weeks to reach significance", which is why everything cheaper runs first.

    The canary itself is one field on Kubernetes model servers: KServe's canaryTrafficPercent: 10 on the predictor, set to 0 to roll back (KServe canary example). Argo Rollouts (v1.10.0) automates the guardrails: analysis steps "block the rollout until the run is completed", with a successCondition such as result[0] >= 0.95 on a Prometheus query (Argo Rollouts analysis). Key the split by user or tenant so one conversation stays on one version.

    Interleaving

    From search ranking: each user sees one merged list built from both rankers, and credit goes to whichever ranker contributed the items the user chose. Netflix reported that interleaving "requires >100× fewer users than our most sensitive A/B metric to achieve 95% power", and uses it to prune candidates before an A/B test on the survivors (Interleaving at Netflix, 29 Nov 2017). Airbnb reported a "50x speedup over an A/B test given the same amount of traffic", about 6% of a regular test's traffic for a third of its duration, agreeing with the A/B result "82% of the time" (Beyond A/B Test, 6 Oct 2022). For LLM features it fits only where the output is a list (search, retrieval, code suggestions to pick from); for a single free-text answer the analogue is a side-by-side preference shown to the user, which OpenAI lists among the A/B metrics it reads ("preferences in side by side comparisons", May 2025) and which inherits every bias of pairwise voting (Human preference and arenas).

    Experimentation hygiene that carries over to LLM features (SRM, guardrails, CUPED, peeking, side-by-side)
    • Why interleaving is so sensitive: it "is a paired test, paired on both queries and users". On Yahoo data, an absolute click metric needed between 17.8 and 379 times as much data as interleaving for five of six ranker pairs (and less for the sixth), "over an order of magnitude" overall (Chapelle et al., Large-scale validation and analysis of interleaved search evaluation, TOIS 2012). The same pairing is why shadow comparisons and paired golden-set gates beat unpaired ones.
    • Side-by-side inside a product: Copilot Arena showed two code completions stacked in the editor, with Tab or Shift+Tab as the vote, order randomised "to remove top-bottom bias"; over "4.5 million suggestions from 10 models". A pair is as slow as its slower model, and a latency-aware sampler cut median latency from 1.61 to 1.07 seconds (Copilot Arena, Feb 2025).
    • Sample ratio mismatch (SRM): when the split of users between arms differs from the design, the test is usually broken: "approximately 6% of experiments at Microsoft exhibit an SRM", detected with a chi-square test (Fabijan et al., KDD 2019). LLM features add new causes: timeouts and rate limits that drop one arm's sessions.
    • Guardrail metrics "Measure aspects of the product that we don't want to degrade but won't necessarily improve" (Microsoft ExP, 2021).
    • Variance reduction: CUPED, adjusting each user's metric by the same metric before the experiment, reduced variance "by about 50%" at Bing, the same power "with only half of the users, or half the duration" (Deng et al., WSDM 2013).
    • Peeking: checking a running test daily and stopping at the first significant result inflates false positives; "Type I error can easily increase fivefold" even with 10,000 samples, unless the test uses always-valid p-values built for continuous monitoring (Johari et al.). The canonical reference for all of this is Kohavi, Tang and Xu, Trustworthy Online Controlled Experiments (2020); bandits as an alternative to a fixed split: Bandits and exploration.
    • When the metric becomes the reward: Cursor retrains its Tab completion model on live accept and reject signals, taking "1.5 to 2 hours to roll out a checkpoint and collect the data" across "over 400 million requests per day"; the new policy made "21% fewer suggestions" with a "28% higher accept rate" (Improving Cursor Tab with online RL, 12 Sep 2025). The metric then needs the same scepticism as any reward (Reward hacking).

    9. Monitoring and drift

    Passing every gate is a statement about launch day. Afterwards three things move, and each needs its own watch:

    • Traffic drift: new users, intents, languages. Watch the input mix and per-intent judge scores, not only the global mean.
    • Product drift: the features around the model change what "good" means; the golden set and rubrics follow (criteria drift, section 2).
    • Provider and infrastructure drift: the model behind an API, or the serving stack around it, changes without your prompt changing. Pin model snapshots where the provider offers them, and keep a canary set running against production daily: GitLab validates "daily" against "the baseline from the day before", and GitHub runs its tests "against our production models every day".

    The first is the one a statistical test can see. The common test for text trains a classifier to tell last month's inputs from this week's:

    If a classifier can tell the two windows apart, the inputs drifted. Evidently flags drift when the classifier's ROC AUC exceeds 0.55 on more than 1,000 observations (drift explainer), and recommends the same "model-based drift detection as a good default" for embeddings (embedding drift, 2023, updated 2025). The classifier's most confident examples are the ones to read: they show what changed, and they go into section 1's loop. Retrieval-specific drift (stale indexes, re-embedding backfills) is RAG in production's.

    When the serving stack drifted: Anthropic, August to September 2025
    Three infrastructure bugs degraded some Claude responses. One misrouted requests to servers configured for a different context window: it "initially affected 0.8% of requests", then 16% of Sonnet 4 requests at the worst hour on 31 August, and about "30% of Claude Code users" had at least one message misrouted. "The evaluations we ran simply didn't capture the degradation users were reporting, in part because Claude often recovers well from isolated mistakes", and "We relied too heavily on noisy evaluations." The fix is a monitoring fix: run quality evaluations "continuously on true production systems" (A postmortem of three recent issues, 17 Sep 2025). Offline gates test a configuration; only production monitoring tests the system that actually serves it.

    An SLO turns monitoring into an alert with a budget. Honeycomb ran its query assistant against a "Target of 75% successful requests over a seven day period", later raised to 80%, against "95% or higher" for most of their services, with a yes, no or not-sure feedback widget feeding it (Improving LLMs in Production With Observability, 16 Jun 2023).

    Eval drift: when the instrument changes

    The eval drifts too, and a score series is only comparable while three things stay fixed: the set version, the judge (model and prompt) and the scoring rule. Change the judge, and the champion is re-scored before any comparison; change the set, and the history is re-baselined ("As your eval set changes, its scores may no longer be directly comparable with older scores. That is ok!", Hamel Husain and Shreya Shankar's FAQ). Section 3's leaderboard number moved by 0.06 points from a scoring-rule difference alone. Close the loop by sampling live traces, running reference-free judges asynchronously and feeding new failures back into the CI set: section 1's loop, run continuously.

    Last month against this week: alarm above ROC AUC 0.55

    10. Eval-driven development

    The same machinery used during development, not only at release: write the eval for a behaviour before changing the prompt, model or pipeline that should produce it, and let every change run against it. Vercel named the practice for v0, whose prompts changed "almost daily" (Eval-driven development, 17 Oct 2024); Eugene Yan describes it as the counterpart of test-driven development, with "every prompt tweak, every system update" evaluated (An LLM-as-Judge Won't Save The Product, Apr 2025). Who coined the phrase is unconfirmed.

    • Start small and from failures: Anthropic's 20 to 50 tasks drawn from real failures; Hamel Husain's assertions first, judges second, A/B tests last.
    • Label before you automate: a judge used in development needs a human-labelled calibration set; Yan suggests aiming for a "50:50 split of passes and fails" so both kinds of error can be measured.
    • The last 20% is the work: LinkedIn reached 80% of the experience in the first month, then "spent an additional four months attempting to surpass 95%"; their structured-output errors fell from about 10% to "~0.01%" along the way.
    • Mind compounding: Honeycomb's arithmetic for chained steps: five steps that are each 90% right give "59% accurate" end to end (0.95 = 0.59), so gate the steps as well as the whole.
    Mistakes that are easy to make anyway
    • Comparing unpaired scores: a fresh run against last month's dashboard number mixes item difficulty into the difference. Score both on the same items and subtract per item.
    • Charting v1 and v2 of a golden set on one line, or a score from a new judge beside one from the old.
    • Trusting the A/B test as the final word: users can reward the wrong thing (GPT-4o, April 2025), and a short test reads short-term behaviour.
    • Stopping at launch: serving bugs, provider updates and traffic drift arrive after the last gate (Anthropic, August 2025).
    • Forgetting the evals' own bill: a frontier judge on every change and on a share of live traffic can cost more than the feature; match the judge to the decision it supports.
    Built from the old Notion page (fetched read only on 2026-10-04, last edited 2026-09-22), LMSYS's released MT-Bench judgments, and the primary sources linked inline; rebuilt to the teaching contract on 2026-10-24. Source and data scripts: src/ in the knowledge base repository.