Retrieval-Augmented Generation (RAG) interview questions

29 questions from the Retrieval-Augmented Generation (RAG) course, each with the correct answer and an explanation. Try to answer before you open the answer.

Why and How RAG Works

1. Where do the facts live in a RAG system?

  1. In the tokenizer
  2. Only in the model weights
  3. In your documents, retrieved at question time
  4. In the GPU
Show answer

Answer: In your documents, retrieved at question time

RAG keeps knowledge outside the model so it can be updated and cited.

Lesson: Why RAG Exists

2. Which step happens offline?

  1. Chunking and embedding the documents
  2. Answering the user
  3. Reranking for this question
  4. Verifying citations
Show answer

Answer: Chunking and embedding the documents

Indexing prepares the knowledge base before any question arrives.

Lesson: The RAG Pipeline End to End

3. Which need points most clearly to RAG?

  1. Making the model smaller
  2. A fixed brand tone only
  3. A tiny static FAQ of 5 lines
  4. Answers from thousands of changing documents, with citations
Show answer

Answer: Answers from thousands of changing documents, with citations

Large, changing, citable knowledge is RAG's sweet spot.

Lesson: RAG vs Fine-Tuning vs Long Context

4. What is the most common cause of bad RAG answers?

  1. The font was too small
  2. The relevant passage was not retrieved
  3. The GPU was cold
  4. The answer was too short
Show answer

Answer: The relevant passage was not retrieved

If retrieval misses the evidence, the model cannot answer faithfully.

Lesson: What RAG Does Not Fix

Preparing Documents: Loading, Chunking, Metadata

5. Why look at samples of extracted text?

  1. To reduce the font size
  2. Extraction errors silently ruin retrieval
  3. To train the model
  4. To speed up the GPU
Show answer

Answer: Extraction errors silently ruin retrieval

Scrambled tables or missing text cannot be retrieved correctly.

Lesson: Loading and Cleaning Documents

6. What is a problem with chunks that are too large?

  1. They remove metadata
  2. They cannot be stored
  3. They always improve accuracy
  4. Their embeddings blur several topics and prompts get costly
Show answer

Answer: Their embeddings blur several topics and prompts get costly

Large chunks reduce retrieval precision and waste prompt tokens.

Lesson: Chunking Strategies

7. Where should access control be enforced in RAG?

  1. In the retrieval query, before text reaches the prompt
  2. Only by telling the model to be careful
  3. After the answer is shown
  4. Nowhere
Show answer

Answer: In the retrieval query, before text reaches the prompt

Text the user may not see must never be retrieved into the prompt.

Lesson: Metadata, Permissions and Hierarchies

Retrieval: Keyword, Vector and Hybrid

8. Why must chunks and questions use the same embedding model?

  1. It is a legal rule
  2. It makes the text shorter
  3. Vectors from different models are not comparable
  4. It removes metadata
Show answer

Answer: Vectors from different models are not comparable

Each model defines its own vector space.

Lesson: Embeddings and Semantic Search

9. When does keyword search fail most clearly?

  1. When the index is small
  2. When searching for an exact error code
  3. When the question uses different words from the document
  4. When the text is English
Show answer

Answer: When the question uses different words from the document

Exact-word matching cannot connect different wording of the same idea.

Lesson: Keyword Search with TF-IDF

10. What does BM25 length normalisation do?

  1. Prevents long documents from winning just by containing more words
  2. Shortens the query
  3. Encrypts text
  4. Chooses the embedding model
Show answer

Answer: Prevents long documents from winning just by containing more words

A match in a concise document is stronger evidence than the same match in a huge one.

Lesson: BM25: The Standard Keyword Ranker

11. Why is RRF popular for merging results?

  1. It deletes duplicates only
  2. It needs no ranking at all
  3. It trains a new model
  4. It uses ranks, so incompatible score scales do not matter
Show answer

Answer: It uses ranks, so incompatible score scales do not matter

Ranks are comparable across systems even when scores are not.

Lesson: Hybrid Search and Reciprocal Rank Fusion

12. What do ANN indexes trade for speed?

  1. All accuracy
  2. A little recall (they may miss a true nearest neighbour)
  3. The ability to store metadata
  4. The language support
Show answer

Answer: A little recall (they may miss a true nearest neighbour)

Approximate means results are almost, not always exactly, the true top matches.

Lesson: Vector Indexes and Approximate Search

Improving Retrieval Quality

13. Why condense a follow-up question before retrieval?

  1. To make the query longer for no reason
  2. "and contractors?" alone has no searchable context
  3. To avoid embeddings
  4. To delete history
Show answer

Answer: "and contractors?" alone has no searchable context

A standalone question carries the meaning the retriever needs.

Lesson: Query Rewriting and Expansion

14. What is the usual role of a cross-encoder reranker?

  1. Replace the LLM
  2. Create the embeddings of the whole collection
  3. Clean PDFs
  4. Re-order a small candidate set more accurately than first-stage search
Show answer

Answer: Re-order a small candidate set more accurately than first-stage search

Rerankers are accurate but costly, so they are applied to a shortlist.

Lesson: Reranking and Diversity (MMR)

15. Why apply a minimum relevance threshold?

  1. So weak matches are not sent, and "not found" can be returned
  2. To increase k automatically
  3. To disable citations
  4. To shorten the index
Show answer

Answer: So weak matches are not sent, and "not found" can be returned

Irrelevant context invites confident wrong answers.

Lesson: Choosing Top-k and Managing Context Cost

Generating Grounded Answers

16. Why give each chunk a number or ID in the prompt?

  1. To shrink tokens
  2. To hide the text
  3. So the model can cite which chunk supports each claim
  4. To skip retrieval
Show answer

Answer: So the model can cite which chunk supports each claim

IDs make citations possible and checkable.

Lesson: Building the RAG Prompt

17. Which check catches a fabricated source ID?

  1. Using shorter chunks
  2. Raising the temperature
  3. Verifying each cited ID exists in the retrieved chunks
  4. Removing the question
Show answer

Answer: Verifying each cited ID exists in the retrieved chunks

A simple set-membership test finds IDs that do not exist.

Lesson: Citations You Can Verify

18. What should the system do when evidence is too weak?

  1. Say it could not find the answer in the documents
  2. Invent a plausible answer
  3. Increase the temperature
  4. Delete the index
Show answer

Answer: Say it could not find the answer in the documents

An honest "not found" protects users from confident errors.

Lesson: Groundedness Checks and Refusals

Evaluating a RAG System

19. Why is Recall@k so important for RAG?

  1. It is unrelated to answers
  2. It measures the font quality
  3. It replaces the LLM
  4. The generator cannot use evidence that was never retrieved
Show answer

Answer: The generator cannot use evidence that was never retrieved

Missing evidence caps the quality of any answer.

Lesson: Retrieval Metrics: Recall@k and MRR

20. Why include unanswerable questions in the test set?

  1. To make the set shorter
  2. To check that the system refuses instead of inventing answers
  3. To lower recall
  4. To avoid judges
Show answer

Answer: To check that the system refuses instead of inventing answers

Refusal behaviour is only visible if the set contains questions that should be refused.

Lesson: Evaluating Answers: Faithfulness and Relevance

21. What is the first question when an answer is wrong?

  1. Is the model too small?
  2. Is the answer actually in the documents?
  3. Is the font readable?
  4. Is the server red?
Show answer

Answer: Is the answer actually in the documents?

If the knowledge is missing, no retrieval or prompt tweak can fix it.

Lesson: Failure Analysis: Where Did It Break?

Running RAG in Production

22. How should you roll out a new embedding model?

  1. Change nothing
  2. Mix old and new vectors in one index
  3. Delete the old index first
  4. Build a new index alongside the old, compare, then switch
Show answer

Answer: Build a new index alongside the old, compare, then switch

Vectors from different models are incomparable, and a side-by-side check avoids regressions.

Lesson: Keeping the Index Fresh

23. Why is retrieved text treated as untrusted?

  1. It may contain hidden instructions written by someone else
  2. It is always encrypted
  3. It is too short
  4. Embeddings forbid it
Show answer

Answer: It may contain hidden instructions written by someone else

Anyone who can edit a source document can try to steer the model.

Lesson: Security, Privacy and Prompt Injection

24. Which step usually dominates RAG latency?

  1. Computing a hash
  2. Loading the page
  3. LLM generation
  4. Sorting five rows
Show answer

Answer: LLM generation

Generating tokens takes longer than the retrieval steps, especially with long prompts.

Lesson: Latency, Cost and Caching

25. When is agentic RAG most useful?

  1. To avoid evaluation
  2. For one-line FAQ lookups
  3. When a question needs several searches or tools to answer
  4. To remove the LLM
Show answer

Answer: When a question needs several searches or tools to answer

Multi-step questions benefit from iterative retrieval, at a cost in speed and complexity.

Lesson: Advanced Patterns: Agentic, Graph and Multimodal RAG

Putting It Together

26. Why are internal articles filtered out in the retrieval query?

  1. So external users can never receive internal content
  2. To speed up the font
  3. To enlarge chunks
  4. Because embeddings dislike them
Show answer

Answer: So external users can never receive internal content

Permissions must be enforced before text reaches the model.

Lesson: Case Study: A Support Knowledge-Base Assistant

27. Users search with "work from home" but the policy says "remote work". Which retrieval method helps most?

  1. Lowering the temperature
  2. Exact keyword match only
  3. Increasing chunk overlap
  4. Embedding (semantic) search, ideally combined with BM25
Show answer

Answer: Embedding (semantic) search, ideally combined with BM25

Embeddings bridge different wording; BM25 still covers exact terms.

Lesson: Revision: Cheat Sheet and Self-Check

28. Which number best tells you whether retrieval is finding the evidence?

  1. Average word length
  2. Recall@k on a golden set
  3. GPU temperature
  4. Number of files
Show answer

Answer: Recall@k on a golden set

Recall@k measures how often relevant chunks appear in the retrieved set.

Lesson: Revision: Cheat Sheet and Self-Check

29. What is the safest way to enforce per-user document access?

  1. Ask the model not to reveal secrets
  2. Filter in the retrieval query so forbidden text is never fetched
  3. Hide it in the UI
  4. Rely on chunk size
Show answer

Answer: Filter in the retrieval query so forbidden text is never fetched

If forbidden text reaches the prompt, it can leak.

Lesson: Revision: Cheat Sheet and Self-Check

← Back to the course