Slides · GenAI system design

RAG interview drills and mock

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:

  1. Answer a RAG question in 60 to 90 seconds with one trade-off and a first diagnostic step.
  2. Run a 45-minute design mock and adapt when a constraint changes.
  3. 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

  1. Claim. One sentence that answers the question as asked.
  2. Reason. Why that is true, with a mechanism, not a slogan.
  3. One trade-off. What the choice costs you.
  4. 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.

AspectSend all 50Rerank, send 5
Context tokens50×400=20,00050 \times 400 = 20{,}0005×400=2,0005 \times 400 = 2{,}000
Input cost for the context20,000×$3106=$0.060\dfrac{20{,}000 \times \$3}{10^{6}} = \$0.0602,000×$3106=$0.006\dfrac{2{,}000 \times \$3}{10^{6}} = \$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.

Source1 Retrieve & Re-Rank

Diagram

Debugging answers: a fixed order

Diagram: Debugging answers move down four steps: restate the symptom, hypothesise by pipeline stage, name the first measurement, then give the fix...

1 Restate the symptom

2 Hypothesise by stage

3 Name the first measurement

4 Fix, with its cost

Diagram summary: Debugging answers move down four steps: restate the symptom, hypothesise by pipeline stage, name the first measurement, then give the fix and what it costs. Naming the measurement before the fix is what separates a diagnosis from a guess.
  • 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.

Source2 Claude Sonnet 5.5 migration guide

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 lostQuestionsShare of 40
Never indexed6640=15%\dfrac{6}{40} = 15\%
Indexed, not in the retrieved top 50141440=35%\dfrac{14}{40} = 35\%
Retrieved, dropped before the final prompt9940=22.5%\dfrac{9}{40} = 22.5\%
In the prompt, answer still wrong111140=27.5%\dfrac{11}{40} = 27.5\%
Total40100%

6+14+9+11=406 + 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

BlockMinutesWhat the interviewer should see
Requirements0 to 5Questions, assumptions, out-of-scope items
Scale estimate5 to 10Numbers with arithmetic, each tied to a decision
Architecture and data flow10 to 25Ingest and query paths, permissions, metadata
Deep dives25 to 38Retrieval quality, evaluation, security, cost, latency
Failure modes and rollout38 to 43Detection, degraded modes, staged release
Summary43 to 45Trade-offs and what changes at 10 times scale

5+5+15+13+5+2=455 + 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

Diagram: Five moves run down in order: restate the constraint, name the earlier number it changes, recompute it, name the component that changes and...

New constraint arrives

Restate it

Name the number it changes

Recompute that number

Name the component and its cost

Say what does not change

Diagram summary: Five moves run down in order: restate the constraint, name the earlier number it changes, recompute it, name the component that changes and its cost, then say what stays the same. The last step shows you understand which numbers depend on which inputs.

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.

Aspect1M pages10M pages
Chunks1M×4=4M1\text{M} \times 4 = 4\text{M}10M×4=40M10\text{M} \times 4 = 40\text{M}
Raw vectors4M×4,096 B=16.4 GB4\text{M} \times 4{,}096\ \text{B} = 16.4\ \text{GB}40M×4,096 B=163.8 GB40\text{M} \times 4{,}096\ \text{B} = 163.8\ \text{GB}
With 1.5 to 2 times overhead24.6 to 32.8 GB245.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.

DimensionSolid means
RequirementsAsks, states assumptions and out-of-scope
NumbersArithmetic shown and tied to decisions
ArchitectureA reason for each box, permission step included
EvaluationRetrieval and generation scored separately, with a golden set (Developing: one accuracy number)
Failure modesSeveral raised unprompted, each with detection
Trade-offsAlternatives compared
CommunicationStructured, 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.

Source3 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.

DimensionEvidence in the recordingLevel
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
NumbersCounts 2M chunks, multiplies by vector size, links it to one node versus shards.Solid
Failure modesMentions 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

Diagram: Each mock is scored dimension by dimension from evidence, the weakest dimension gets one targeted drill, and the next mock shows whether it...

Run a mock

Score each dimension

Pick the weakest

Run one targeted drill

Diagram summary: Each mock is scored dimension by dimension from evidence, the weakest dimension gets one targeted drill, and the next mock shows whether it moved. The arrow from the drill back to the mock closes the 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

MistakeWhy it hurtsFix
Reciting components with no reasonsScores Developing at bestGive each box one reason and one cost
Quoting numbers with no arithmeticThe interviewer cannot trust themSay “assume”, then multiply aloud
Scoring yourself on feelingNothing to fix nextWrite a quote or a missing item per dimension
Running mock after mockThe same weakness repeatsOne targeted drill between mocks
Answers that never endTime runs out before failure modesStop 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 960=15%\dfrac{9}{60} = 15\%, 1260=20%\dfrac{12}{60} = 20\%, 2160=35%\dfrac{21}{60} = 35\% and 1860=30%\dfrac{18}{60} = 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

  1. Retrieve & Re-Rank (opens in a new tab)

    Sentence Transformers2026Documentation

    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.

  2. Claude Sonnet 5.5 migration guide (opens in a new tab)

    Anthropic2026Documentation

    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).

  3. 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

    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.