Your RAG system scores 0.9 on the offline evaluation set, yet support tickets and user feedback show frequent wrong or unhelpful answers in production. Explain why a high offline score can coexist with poor live quality, and lay out how you would close the gap.
A 0.9 offline score on a clean, narrow, possibly stale or contaminated eval set says nothing about messy live traffic. Fix the measurement: mine real failures into the golden set and add online signals.
Imagine a chef who scores 9 out of 10 on a cooking test, but the test only ever asked for plain toast and boiled eggs. Real customers walk in asking for spicy curries, allergy-safe meals, and dishes the chef has never cooked. The 9 out of 10 was real — but it measured the wrong meals. The fix is not to keep practicing toast until you hit 10 out of 10. It is to rewrite the test using the actual orders customers are sending, especially the ones that came back to the kitchen untouched. Then you can finally tell whether the problem is buying the wrong ingredients or cooking them badly. A RAG eval set works the same way: if it does not look like real traffic, a high score is a comforting lie.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
This is one of the most revealing senior RAG interview prompts because it tests whether a candidate trusts numbers or interrogates them. A 0.9 offline and a stream of angry support tickets is not a paradox — it is a diagnostic clue, and the clue points at the evaluation, not the model. The instinct of a junior engineer is to treat the live failures as a model-quality problem and reach for a bigger model or more tuning. The senior move is to treat it first as a measurement-validity problem: the score is fine, but it measured the wrong thing.
The core concept is distribution shift — the gap between the population of queries your eval set contains and the population your users actually send. This walkthrough works through why that gap forms, the two specific ways eval sets lie (staleness and contamination), how to rebuild the measurement around real traffic, how to decompose the pipeline so the metric localizes blame, and why the tempting fix of tuning the offline score harder is exactly backwards.
Why a high score and bad live quality coexist
An evaluation score is a sample statistic: it estimates quality over the distribution of queries in the eval set. That estimate only generalizes to production if the eval distribution resembles the production distribution. When they diverge, the score is precise but irrelevant — a confident measurement of the wrong population.
This is exactly the situation the symptom describes. The 0.9 is almost certainly real for the queries in the set. The problem is that those queries are not the queries failing in production. The set was likely built from a clean, narrow slice: well-formed questions on popular topics, written deliberately, with no typos, no multi-turn coreference, no out of scope asks, and no adversarial intent.
Live traffic is the opposite. Users misspell, abbreviate, and write fragments. They ask follow-ups that depend on prior turns. They probe the long tail of rare topics and the edges of scope. Some try to break the system on purpose. None of that is represented in the tidy set, so the system's behavior on it was never measured. The 0.9 covers the easy region of query space; the support tickets come from the region nobody graded. There is no contradiction — just two different populations.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- RAGAS-style harnesses report faithfulness and context precision/recall separately, which is exactly the retrieval versus generation split needed to localize a live gap.
- Production teams route thumbs-down and escalated conversations into a labeling queue that feeds a continuously refreshed golden evaluation set.
What an interviewer would ask next. Try answering before peeking at the approach.
QOnce you split metrics and find retrieval recall is fine but faithfulness is low on live traffic, what do you investigate?
Point at the generation side: prompt grounding directives, context ordering and lost-in-the-middle, distractor chunks the retriever returned alongside the right one, and whether the model is abstaining when it should.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Trusting the offline number and tuning harder against the same unrepresentative set — chasing 0.95 on toast while customers keep ordering curry. You optimize the metric and the live failures stay exactly where they were.
60 second bullets to scan on the way to the call.
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.