What is retrieval-augmented generation (RAG)?
Show the answer and explanation
Correct answer: C, Retrieving relevant passages from an external knowledge source at query time and adding them to the LLM's prompt.
Explanation RAG
Retrieval-augmented generation (Lewis et al., 2020) combines a retriever with a generator. At query time the system searches an external knowledge source (documents, a wiki, a database) for passages relevant to the question, puts them into the prompt, and the LLM writes an answer grounded in that context.
Why the other descriptions are wrong:
- Retraining the weights on documents is fine-tuning; RAG leaves the model weights unchanged.
- Sampling many answers and picking the most frequent one is self-consistency, a decoding strategy with no external retrieval.
- RAG still uses the LLM to generate the answer; a pure search index would be classic information retrieval.
Benefits: it can use private or recent data without retraining, it reduces (but does not eliminate) hallucination, and it lets answers cite their sources.
Interview tip: define it as "retrieve, then generate with the retrieved text in the prompt", and name grounding, freshness and citations as the main reasons to use it.