How it works · 10 of 27 Core
What are shadow mode and online A/B testing for AI models?
Test on real traffic before it counts
Shadow mode & online A/B: A new model first runs in shadow on a copy of live requests, its answers logged and never shown, to catch errors, slowness and cost; then an A/B test gives it a small random share of customers, because only real customers' behaviour shows whether it is better.
Loading the animation…
Say it like this Shadow mode runs a new model on real requests without showing its answers, to catch errors, slowness and cost safely; an A/B test then gives it a small random share of real customers and measures what they actually do.
Under the hood — for builders
- Worked example: how a cloud shadow test works
- SageMaker "routes a copy of the inference requests to it in real time within the same endpoint. Only the responses of the production variant are returned to the calling application."
- What it is for
- A model "validated offline", when a team wants "to evaluate operational performance metrics such as latency and error rate before making this decision."
- What shadow cannot see
- What a customer does with an answer they never received. Only an A/B test sees that.
- Terms: shadow
- Shadow mode (dark launch): the new model gets a copy of live requests; its answers are logged, never shown.
- Terms: A/B and ramp
- A/B test: customers split at random, a small share sees the new version, behaviour compared. Ramp: widening the share, 5% → 25% → 100%, if the result holds.
- Our arithmetic: small gaps need many customers
- Telling 80% from 85% takes about 900 customers a side; from 82%, about 6,000; from 81%, about 25,000. At 1,000 a day in B: 1, 6, 25 days.
- Why test at all: most ideas lose
- Bing: of ideas tested, "less than a third move the metrics they were designed to improve"; "On a typical day, there are over 250 experiments running on Bing".
- Many tests at once
- Bing: "almost every user is in about 15 different experiments." An A/B test is "a randomized experiment that usually involves two variants" (Wikipedia).
- How to run it
- Offline eval passes (B1, B4) · shadow for days: diffs, latency, errors, cost · A/B at 1–5%, one main metric set first · ramp on a clear result.
- Measure it
- Shadow: answers that differ, p95 latency, errors, cost per request. A/B: resolution without a person, re-asks, complaints, cost per resolution (D5), with a confidence interval.
- Watch out
- Shadowing tools that change things (no real email or refund) · peeking hourly and stopping on a lucky day · splitting by request, so one customer sees both.
- Sources
- Amazon SageMaker docs, Shadow tests · Bing, "Large Scale Experimentation at Bing" (2013) · Wikipedia, A/B testing · read 21 Nov 2026 · our arithmetic, 21 Nov 2026.
What happens in the shadow mode & online A/B animation, step by step?
Online A/B test: Shadow
- Shadow mode: the new model rides along as a learner. Its steering wheel turns, but its column is cut: only the current model drives.
- Real requests arrive. Both models answer every one, but only the driver's answer reaches the customer.
- The learner's answers go in the log instead: 8 of 100 differ, 2 are slow, and no customer felt any of it.
- But no customer ever received the learner's answers, so the log cannot say whether they would like them. Your turn: switch to A/B, above the picture.
Online A/B test: A/B
- A/B: the learner gets its own car with a connected wheel. A random 5 in every 100 customers ride with it; the other 95 stay with the current model.
- The scoreboard counts what riders do: requests resolved without a person. After day 1 the gap is noise; telling 80% from 82% takes about 6,000 riders a side: six days.
- The gap holds, so B goes to 25%, then everyone. Most ideas lose: at Bing, fewer than a third moved the metric they were built for. Next: what if your provider retires the current model?
What everyday example explains shadow mode & online A/B?
A learner driver with an unconnected second wheel. The driver is the current model, the learner the new one, the cut column is shadow mode, the logbook its diffs, and the learner's own car with 5 riders in 100 is the A/B test.
Why should a team care about shadow mode & online A/B?
A model that passed offline evals still has to reach customers; the team decides how much risk to take on real traffic, what metric decides, and how long to wait, before anyone sees a "winning" number.