RAG system design interviews
Design ingestion, retrieval, generation, evaluation and observability for a document assistant.
State requirements first, then choose architecture and measurable quality targets.
Interview questions
Choose a question to reveal its answer.
01MediumCoreHow would you design document ingestion for a RAG system?
Answer
How would you design document ingestion for a RAG system?
Extract content, retain provenance and permissions, split into retrieval units, create representations and version the index.
Ingest updated product documentation with source IDs and update timestamps.
02MediumCoreHow do you update a RAG index without rebuilding everything?
Answer
How do you update a RAG index without rebuilding everything?
Track stable document IDs, content hashes and versions; update changed chunks and remove stale ones consistently.
Re-embed changed documentation sections after a content release.
import hashlib
def content_hash(text):
return hashlib.sha256(text.encode()).hexdigest()
print(content_hash('policy version 2'))Use stable IDs plus content hashes to identify changed index inputs.
03HardCoreHow do you enforce document permissions in enterprise RAG?
Answer
How do you enforce document permissions in enterprise RAG?
Apply authorization before or during retrieval and preserve restrictions through context and generation; do not rely on a model to filter secrets.
Retrieve only documents a signed-in employee is allowed to read.
04MediumCoreHow do you diagnose whether a RAG error is caused by retrieval or generation?
Answer
How do you diagnose whether a RAG error is caused by retrieval or generation?
Measure evidence retrieval with labeled queries, then evaluate generation with correct or retrieved context to isolate failures.
Compare recall at a cutoff and answer faithfulness on the same cases.
05MediumHigh priorityHow do you decide how much retrieved context to include?
Answer
How do you decide how much retrieved context to include?
Balance evidence coverage, relevance, redundancy, token limits, cost and latency; validate the choice on representative cases.
Deduplicate near-identical chunks and retain relevant evidence.
06HardHigh priorityHow would you produce reliable citations in a RAG application?
Answer
How would you produce reliable citations in a RAG application?
Keep source IDs and span provenance through ingestion and retrieval, require claims to reference supplied evidence, and validate cited identifiers.
Link an answer claim to the exact document section used.
07MediumHigh priorityHow do you keep RAG answers up to date?
Answer
How do you keep RAG answers up to date?
Define freshness requirements, synchronize source changes, invalidate dependent caches and expose source timestamps when relevant.
Refresh a policy index when a new document version is published.
08MediumWhat should the system do when retrieval confidence is low?
Answer
What should the system do when retrieval confidence is low?
Use a calibrated evaluation signal and a bounded fallback such as query reformulation, authorized alternate sources or abstention.
Ask for clarification when the question cannot be grounded in available evidence.
09HardWhich offline metrics would you use to evaluate a document assistant?
Answer
Which offline metrics would you use to evaluate a document assistant?
Use retrieval metrics and answer-level groundedness, relevance and correctness with a representative labeled dataset and human review.
Measure recall@k and claim support for queries with known evidence.
10MediumWhat would you monitor after deploying a RAG service?
Answer
What would you monitor after deploying a RAG service?
Track retrieval and generation latency, errors, token cost, answer quality samples, source freshness and privacy-safe traces.
Investigate increased p95 latency after changing the reranker.
Priority and difficulty are editorial study recommendations.
Technical reference: Documentation / paper ↗
Try a few practice questions
Explore the questions before creating a free account.