RAG & Retrieval·Question 53 of 100Advanced

Design a retrieval evaluation harness the team will actually use. What runs, when, and what blocks a merge?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

The failure mode is not a lack of metrics, it is that evaluation gets built, produces a number nobody trusts, and quietly dies. So I design for trust and speed first.

Full worked answer

The failure mode is not a lack of metrics, it is that evaluation gets built, produces a number nobody trusts, and quietly dies. So I design for trust and speed first.

Tiers, by cost and cadence:

  1. Retrieval-only, on every PR, under ~2 minutes. Fixed corpus snapshot, ~200 labelled queries, report recall@k and nDCG. No LLM in the loop, so it is deterministic, cheap and fast enough that people do not route around it. This tier catches the majority of real regressions, because most retrieval bugs are retrieval bugs.
  2. End-to-end with an LLM judge, nightly. Faithfulness, answer correctness, citation validity. Slower, noisier, costs money.
  3. Online, always: thumbs, escalation rate, query reformulation rate, abstain rate.

What gates a merge: tier 1 only, and on a diff rather than an absolute threshold. Absolute thresholds get muted within a month. I gate on 'recall@10 must not drop more than ~2 points versus main', and I care more about per-slice regressions than the aggregate. Slice by query type, corpus, language and tenant. An aggregate that holds steady while acronym queries collapse is the exact regression you want to catch, and the mean hides it.

Non-negotiables that make it trustworthy:

  • Pin the corpus snapshot. If the corpus moves under the eval, every number is noise and people stop believing it. Version the golden set with the snapshot.
  • Measure judge agreement with humans before trusting the LLM judge, on a sample. If the judge disagrees with your own labels, fix the judge before you ship the metric.
  • Report confidence intervals. With 200 queries, a 1-point recall change is noise. Teams that ignore this ship 'improvements' that are coin flips.
  • Make failures browsable. A metric that drops without a diff of which queries broke and what they retrieved generates zero action. This diff view is what actually gets the harness used.
  • Feed production failures back in. Every real bug becomes a golden-set case, or you regress it again.

Start at 50 queries and grow. A small honest harness that runs beats a large one that does not.

What a good answer covers

  • The failure mode is not a lack of metrics, it is that evaluation gets built, produces a number nobody…
  • So I design for trust and speed first
  • Retrieval-only, on every PR, under ~2 minutes
  • End-to-end with an LLM judge, nightly
  • Online, always: thumbs, escalation rate, query reformulation rate, abstain rate

Key terms: Tiers, by cost and cadence · Online · What gates a merge · per-slice · Non-negotiables that make it trustworthy · Pin the corpus snapshot · Measure judge agreement with humans · Report confidence intervals · Make failures browsable · Feed production failures back in

Interviewer follow-ups to expect

  1. Your LLM judge and your human labels agree only 70% of the time. What do you do?

  2. How do you keep the golden set from overfitting as engineers tune against it?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep