Concept guide · RAG foundations
What is retrieval-augmented generation?
A slower explanation for when the short interview answer is not enough. Start with the intuition, then connect it to the technical idea and the way an interviewer expects you to reason about it.
ML area
Generative AI → RAG foundations
Interview format
Foundations · Scenario
Question
GENAI-047
Start with the idea
In simple terms
RAG means looking up useful evidence at question time and giving that evidence to the language model before it writes an answer. It lets the application use private or changing information without pretending that the model’s training memory is a live database.
Make it concrete
A company assistant can retrieve the current leave policy and answer an employee using that passage, instead of relying on a model that may have never seen the company policy.
Build the answer
How to approach it
- 1Separate offline ingestion from online retrieval and generation.
- 2Explain how evidence reaches the prompt and how permissions are enforced.
- 3Name the evaluation signals for retrieval, grounding, citations, latency, and cost.
Go one level deeper
The technical explanation
A RAG system has an indexing path and a query path. Indexing parses documents, preserves metadata, creates retrievable units, and writes representations to a search system. Query time resolves the request, applies permissions, retrieves and ranks evidence, assembles bounded context, and generates an answer with citations or an abstention policy. Failures can occur at every boundary, so “we use RAG” says little about quality by itself.
Say this in the interview
RAG retrieves relevant evidence at request time and places it into a model prompt so the answer can use private, current, or cited information. The system has an indexing path and a query path; errors in parsing, retrieval, permissions, context assembly, or generation can each affect the result.
Keep preparing