What is the primary pitfall of building your eval set exclusively from production traffic logs?
A production-only eval set drifts with the traffic mix and starves rare high-value failure modes, so you lose a stable baseline and undercount the cases that actually hurt.
Imagine grading a chef only on the dishes customers happen to order this week. If the crowd switches from pizza to salads, this week's higher score might just mean salads are easier, not that the chef improved. You also never test the tricky banquet dishes nobody orders day to day, even though those are exactly where a weak chef gets exposed. A good test menu is fixed and deliberate: it keeps the same dishes week over week so scores stay comparable, and it intentionally includes the hard, rare orders. Production logs alone give you a menu that keeps shifting under your feet and skips the scariest dishes, so your grades drift and your blind spots stay invisible.
Detailed answer & concept explanation~8 min readEverything 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. 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.
5 min: why a fixed distribution makes scores comparable, the two production-only defects (drift, tail starvation), stratified sampling against a target distribution, oversampling plus reweighting, and the frozen golden plus rolling sample blend.
Real products, models, and research that use this idea.
- LangSmith datasets let teams pin a frozen golden split for regression gating separate from a rolling production-sampled split for drift detection.
- RAGAS supports building stratified test sets that deliberately include adversarial and edge-case queries rather than only sampled production logs.
- OpenAI Evals registries are version-pinned precisely so the input distribution stays fixed while only the model under test changes.
- Braintrust and Langfuse surface per-slice eval breakdowns so a flat aggregate cannot hide a regressed rare slice.
- Promptfoo lets you define seed and perturb adversarial cases that augment sampled traffic in a single eval suite.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you decide per-slice quotas for a stratified golden set instead of just copying the traffic frequencies?
QIf you oversample rare slices, how do you still report a trustworthy overall score?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Drawing the eval set only from production traffic. The set drifts as the traffic mix changes, and rare high-value failure modes stay underrepresented, so score gains become uninterpretable.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.