How do you set up an A/B test for an LLM system change, and what's different from standard A/B testing?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Describe how to set up a proper A/B test for an LLM system change. What makes LLM A/B testing structurally different from a standard UI A/B test, and what are the three most important design considerations?
Randomize at the user level, define a primary outcome plus safety guardrails upfront, size for higher variance and longer runs, and auto-stop the challenger on catastrophic failures.
Imagine testing two teachers on the same class to see who teaches better. With a button on a website you just count clicks. But a teacher is judged by whether students actually learn, which is fuzzy and slow to measure. You also cannot swap teachers mid-lesson, because a confusing morning poisons the whole afternoon, so each student keeps one teacher for the day. You decide in advance what success means, like test scores, and what you will never accept, like a student getting hurt. Because learning is noisy, you need many students and several weeks before you trust the result. And if one teacher starts doing something dangerous, you pull them immediately instead of waiting for the term to end.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
6 min: three structural differences (indirect metrics, carryover and randomization unit, power) plus four design pillars (primary vs guardrail metrics, sample sizing, novelty and peeking, kill switch) with a worked sample-size calculation.
| Dimension | Standard UI A/B | LLM A/B |
|---|---|---|
| Primary signal | Direct click or conversion | Indirect quality (judge, completion, thumbs) |
| Randomization unit | Often per request | User or session for multi-turn (carryover) |
| Variance | Low, fast power | High, larger MDE, longer runs |
| Top guardrails | Latency, errors | Safety, hallucination, refusal, cost, latency |
| Failure response | Roll back on metric drop | Auto kill switch on safety or abandonment |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Randomizing per query in a multi-turn product. Carryover from one bad turn contaminates the rest of the session, breaking the independence assumption and inflating the apparent effect.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.