Slides · GenAI system design
RAG interview drills and mock
1 / 22
RAG interview drills and mock
How to answer short RAG questions, run a timed design mock, and score yourself on evidence instead of feeling.
Concept
Knowing RAG is not the same as saying it well
- Under time pressure people skip requirements, forget trade-offs and list components without reasons.
- A drill trains one skill in a minute or two. A mock trains sequencing, pacing and recovery over a whole design.
- Practice only helps if you can tell what went wrong, so this lesson ends in a rubric.
Three things you will be able to do:
- Answer a RAG question in 60 to 90 seconds with one trade-off and a first diagnostic step.
- Run a 45-minute design mock and adapt when a constraint changes.
- Score a mock from evidence and pick the next drill.
Provenance. The questions here are generated practice built on common industry patterns. No slide claims that any company asks them.
Concept
Mental model: a flight simulator
- A pilot does not learn emergencies by waiting for one. The simulator flies a normal route, then injects a fault.
- Your normal flight is the nine-link design chain: requirements, scale, components, data flow, failure modes, evaluation, cost and latency, security, rollout.
- Your fault drills are debugging questions and changed constraints.
- Train both, because an interviewer will use both.
Process
The shape of a 60 to 90 second answer
- Claim. One sentence that answers the question as asked.
- Reason. Why that is true, with a mechanism, not a slogan.
- One trade-off. What the choice costs you.
- First check. The measurement or test you would run to confirm it.
Stop there. A short answer with a trade-off and a check survives follow-ups better than a long tour of components.
Worked example
Worked answer: “Why rerank instead of just sending more chunks?”
Assumptions (illustrative): first-stage retrieval returns 50 candidates, each chunk is 400 tokens, and input costs a hypothetical $3 per million tokens.
| Aspect | Send all 50 | Rerank, send 5 |
|---|---|---|
| Context tokens | 50×400=20,000 | 5×400=2,000 |
| Input cost for the context | 10620,000×$3=$0.060 | 1062,000×$3=$0.006 |
Spoken answer. “A fast first stage is good at finding candidates, not at ordering them. A reranker that reads query and chunk together orders them better, but it is too slow to run over the whole corpus. So I retrieve 50, rerank, and send 5: ten times fewer context tokens, and less noise for the model. The cost is extra latency for scoring 50 pairs, and recall is lost if the right chunk falls outside the top 5 after reranking. I would check recall@5 after reranking on the golden set.”
The Sentence Transformers docs describe the same two-stage pattern: an efficient retriever, then a re-ranker that sees the query and document together.
Source[1] Retrieve & Re-Rank
Diagram
Debugging answers: a fixed order
- Stages to hypothesise over: indexed, retrieved, ranked, placed in the prompt, used by the model.
- Do not begin with the costliest change, such as swapping in a larger model.
Concept
Do not reach for sampling knobs first
- A wrong answer that sounds sure is often an evidence problem first, so look at what reached the prompt before touching settings.
- On some models the knob is not even available. For Claude Sonnet 5.5, the migration guide says sampling parameters (
temperature,top_p,top_k) return an error and should be removed (guide read 2026-10-24). - So a strong first step is measurement at the retrieval stage, not a settings change.
Scope: this is about one model family at one date. Other models may allow these settings.
Worked example
Worked: the first measurement is a funnel
Symptom. The team has logged 40 failing questions. For each, you check how far the gold passage got (illustrative counts).
| Stage where it was lost | Questions | Share of 40 |
|---|---|---|
| Never indexed | 6 | 406=15% |
| Indexed, not in the retrieved top 50 | 14 | 4014=35% |
| Retrieved, dropped before the final prompt | 9 | 409=22.5% |
| In the prompt, answer still wrong | 11 | 4011=27.5% |
| Total | 40 | 100% |
6+14+9+11=40. The largest bucket is retrieval recall, so the next hypothesis is the chunker, the embedding model or missing keyword search. One cheap measurement turned a vague complaint into a ranked list of stages.
Compare
The 45-minute design mock
| Block | Minutes | What the interviewer should see |
|---|---|---|
| Requirements | 0 to 5 | Questions, assumptions, out-of-scope items |
| Scale estimate | 5 to 10 | Numbers with arithmetic, each tied to a decision |
| Architecture and data flow | 10 to 25 | Ingest and query paths, permissions, metadata |
| Deep dives | 25 to 38 | Retrieval quality, evaluation, security, cost, latency |
| Failure modes and rollout | 38 to 43 | Detection, degraded modes, staged release |
| Summary | 43 to 45 | Trade-offs and what changes at 10 times scale |
5+5+15+13+5+2=45. The split exists so that no block is silently skipped.
Concept
Pacing is part of the answer
- A polished architecture with no evaluation or failure modes leaves whole blocks of the rubric empty.
- Use the block boundaries as checkpoints: minute 10, 25, 38. If you are behind, say so and compress the current block.
- If the interviewer jumps ahead, follow them, answer well, then say which skipped block you will return to.
- Close with trade-offs restated. It costs two minutes and shows you can see the whole system.
Diagram
When the interviewer changes a constraint
Worked example
Worked: “now the archive is ten times bigger”
Assumptions (illustrative): a search assistant over a product-manual archive of 1 million pages, about 4 chunks per page, 1,024-dimension embeddings stored as 4-byte floats (4,096 bytes per vector), index overhead assumed at 1.5 to 2 times the raw size.
| Aspect | 1M pages | 10M pages |
|---|---|---|
| Chunks | 1M×4=4M | 10M×4=40M |
| Raw vectors | 4M×4,096 B=16.4 GB | 40M×4,096 B=163.8 GB |
| With 1.5 to 2 times overhead | 24.6 to 32.8 GB | 245.8 to 327.7 GB |
Say it aloud. The number that changed is the vector memory. Past what one node holds, I would shard, quantize or use a disk-based index, and the cost is more operations and some recall. I would also say which earlier numbers I am leaving alone, such as the query rate I estimated. Re-embedding on a model change now costs ten times more.
Compare
The scoring rubric: what Solid looks like
Levels run Weak, Developing, Solid, Strong. Score each dimension separately, from evidence.
| Dimension | Solid means |
|---|---|
| Requirements | Asks, states assumptions and out-of-scope |
| Numbers | Arithmetic shown and tied to decisions |
| Architecture | A reason for each box, permission step included |
| Evaluation | Retrieval and generation scored separately, with a golden set (Developing: one accuracy number) |
| Failure modes | Several raised unprompted, each with detection |
| Trade-offs | Alternatives compared |
| Communication | Structured, thinks aloud |
On evaluation: the RAGAs paper’s abstract treats finding relevant passages, using them faithfully and the quality of the final output as separate things to evaluate, which is consistent with the course rubric giving one accuracy number only Developing.
Source[3] RAGAs: Automated Evaluation of Retrieval Augmented Generation
Worked example
Worked: scoring from a transcript
Excerpts from a recorded mock (generated practice). Quote the evidence, then pick the level.
| Dimension | Evidence in the recording | Level |
|---|---|---|
| Requirements | “Before I draw anything: who are the users, and roughly how many?” Then states two assumptions. No out-of-scope list. | Developing to Solid, take Developing |
| Numbers | Counts 2M chunks, multiplies by vector size, links it to one node versus shards. | Solid |
| Failure modes | Mentions none until the interviewer asks at minute 38. | Weak or Developing, take Weak |
Rule used: when torn between two levels, take the lower and name what would earn the higher. For Requirements that is “also name out-of-scope items”. The weakest dimension is Failure modes, so the next drill is the debugging scenarios, not another full mock.
Diagram
Practice is a loop
Match the weak dimension to a drill: weak numbers, redo scale estimates; weak failure modes, redo debugging scenarios.
Compare
Common mistakes and the fix
| Mistake | Why it hurts | Fix |
|---|---|---|
| Reciting components with no reasons | Scores Developing at best | Give each box one reason and one cost |
| Quoting numbers with no arithmetic | The interviewer cannot trust them | Say “assume”, then multiply aloud |
| Scoring yourself on feeling | Nothing to fix next | Write a quote or a missing item per dimension |
| Running mock after mock | The same weakness repeats | One targeted drill between mocks |
| Answers that never end | Time runs out before failure modes | Stop after claim, reason, trade-off, check |
Check yourself
Check: read the funnel
A different team logs 60 failing questions: 9 never indexed, 12 indexed but not retrieved, 21 retrieved but dropped before the prompt, 18 in the prompt but answered wrongly. Which stage has the largest share, and what is your first hypothesis?
Answer
Shares are 609=15%, 6012=20%, 6021=35% and 6018=30%, which add to 100%. The largest is the drop between retrieval and the prompt, so the first hypothesis is about reranking or context assembly: a cut that is too tight, or a reranker demoting the right passage.
Check yourself
Check: the interviewer jumps ahead
At minute 12 you are mid-way through the data flow and the interviewer asks, “How do you stop one team seeing another team’s documents?” What do you do?
Answer
Follow them: answer the permission question with the filter inside retrieval and the tests that check it. Then say you will return to the data flow, finish it, and still cover evaluation and failure modes before the end. Following the interviewer is allowed; silently dropping a block is the mistake.
Check yourself
Check: a qualitative constraint
The interviewer adds: “Every answer must cite the page number of its source.” Which earlier decisions change?
Answer
Ingestion must keep page metadata with each chunk, chunking must not merge text across pages without recording both, and the prompt and output format must carry the citation. Index size barely changes. Naming what changes and what does not is the point.
Check yourself
Check: Evaluation score
A candidate says: “I would build a golden set of 100 questions and report one accuracy number.” They never mention scoring retrieval separately from generation. Using the rubric, which level is the Evaluation dimension, and what would earn the next one?
Answer
The golden set is a good sign, but one accuracy number is the Developing description, and Solid needs retrieval and generation scored separately. Taking the lower level when torn gives Developing. Scoring retrieval (for example recall@k) and generation (for example faithfulness) separately would earn Solid; adding unanswerable cases, slices and online signals would earn Strong.
Summary
Summary
- Drills train parts; a mock trains sequencing, pacing and recovery.
- Answer shape: claim, reason, one trade-off, first check. Debug in order: restate, stage hypotheses, first measurement, fix with its cost.
- The 45-minute split is 5, 5, 15, 13, 5 and 2 minutes. On a changed constraint: restate, recompute the affected number, name the component and its cost, say what stays the same.
- Score each rubric dimension with a quote, take the lower level when torn, and drill the weakest dimension before the next mock.
- All numbers in these slides are illustrative; in a real interview say “assume” and show the arithmetic.
References
References & Sources
Retrieve & Re-Rank (opens in a new tab)
Sentence Transformers2026Documentation
https://sbert.net/examples/applications/retrieve_rerank/README.html
Used for The retrieve-then-re-rank pattern: an efficient first-stage retriever, then a cross-encoder re-ranker that takes the query and document together to improve the order.
Claude Sonnet 5.5 migration guide (opens in a new tab)
Anthropic2026Documentation
https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide
Used for On Claude Sonnet 5.5, setting temperature, top_p or top_k returns an error and the guide says to remove them (read 2026-10-24).
RAGAs: Automated Evaluation of Retrieval Augmented Generation (opens in a new tab)
Shahul Es, Jithin James, Luis Espinosa-Anke, Steven Schockaert2024EACL 2024 (System Demonstrations)Paper
arXiv 2309.15217 (opens in a new tab)https://arxiv.org/abs/2309.15217
Used for The abstract treats the retriever's ability to find relevant, focused passages, the LLM's faithful use of them, and the quality of the generated output as separate dimensions to evaluate.
Keys: ← → move, Home End first and last, F full screen.