How Would You Measure Retrieval Quality?
The interviewer asksYour team changed the embedding model in your RAG system. How would you know whether retrieval got better or worse?
AI Product EngineerModel PM (secondary)CoreTechnical roundRepresentative5–7 min
On this page
The 30-second version
- Build a labelled set: real questions, each with the passages that answer it.
- Measure recall at k: is a right passage in the top k results?
- Also check ranking: is it near the top (reciprocal rank)?
- Compare old and new on the same questions, and read the questions that flipped.
- Check end-to-end answer quality and latency too.
What it's really testing
- Retrieval metrics
- Comparing changes fairly
- Linking retrieval to answers
How to structure your answer
- Build a labelled set.
- Choose metrics.
- Compare fairly.
- Check the whole system.
The interview, played out
- InterviewerYour team changed the embedding model in your RAGRetrieval-augmented generation. Fetching relevant documents and putting them in the model's context before it answers. Read the full explanation system. How would you know whether retrieval got better or worse?
- CandidateI need questions where we know the right answer passages. Do we have any?
- Revealed when askedNo labelled set yet.
- CandidateThen build one: 200 real user questions, with the passages that answer each, labelled by someone who knows the content.
- CandidateThen measure recall at five: for what share of questions is a right passage in the top five? And where it ranks, since higher is better for the answer.
- Strong moveBuilds the labelled set before choosing metrics.
- CandidateCompare old and new embeddings on exactly the same questions, and read the ones that flipped either way.
- InterviewerAnything else?
- Missed signalShould check latency, cost and end-to-end answer quality, not only retrieval.
- CandidateYes: the new model's latency and cost, and whether final answers actually improve.
The strong answer, distilled
- Labelled set: ~200 real questions with their answering passages.
- Metrics: recall at k; ranking position (reciprocal rank).
- Fair comparison: same questions; read the flips.
- Whole system: end-to-end answer correctness, latency and cost.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Data | None | Some questions | Labelled set from real questions |
| Metrics | Gut feel | Accuracy | Recall at k and ranking |
| Comparison | Before/after on different data | Same data | Same data plus flips and end-to-end checks |
Round scorecard: Model PM: technical round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Problem framing | Jumps to a method before saying what decision the eval supports. | States the goal, but not who acts on the result or what threshold matters. | Names the decision, the owner and the cost of each kind of error before choosing a method. | Strong. Framed it as "does the right passage come back?" |
| Measurement rigour | Reports one accuracy number, or trusts the metric without checking it. | Uses the right metrics but misses how the labels or splits could mislead. | Separates error types, uses held-out labels, and says how they'd catch fooling themselves. | Strong. Labelled set, recall at k, compared on the same questions. |
| Technical depth | Uses terms loosely; can't say how the method works. | Explains the method correctly when asked. | Explains the mechanism unprompted and knows where it breaks. | Strong. Knew recall and ranking metrics. |
| Judgment and trade-offs | Treats every option as equally good, or picks one without reasons. | Names trade-offs but doesn't commit. | Commits to a choice, states the trade-off accepted, and what would change their mind. | Passable. Didn't weigh latency and cost of the new model until asked. |
| Communication | Hard to follow; no structure. | Structured, but long or missing a summary. | Signposts the plan, checks in, and lands a clear recommendation. | Strong. Clear. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| AI Product Engineer | The labelled set and evaluation harness |
| Model PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation | Choosing embedding models by measured retrieval quality |
Common mistakes
- Judging by a few example queries
- Only measuring final answers
- Ignoring latency and cost
More follow-ups to practise
- "Labelling is expensive." Hint: start small; use a model to draft labels, people to check.
- "Recall is up but answers aren't better." Hint: look at generation.
Go deeper
- Module: RAG and retrieval
- Framework: Explain a Concept Framework
- Framework: Opening Any Interview Answer
- Lesson: How retrieval works
- Lesson: Evaluating RAG: retrieval and answer separately
- Also tests: Agent and RAG evals
- Also tests: Eval plans and release gates
Sources
Representative question: written to match technical rounds for AI product roles, not a specific reported interview.