LearnThatStack Ace your next interview
RAG (Retrieval-Augmented Generation) · question
Question 1 of 56

What is Retrieval-Augmented Generation, and what problem does it solve?

beginner
← All RAG (Retrieval-Augmented Generation) questions
Re-explain
Visual ↓

Retrieval-Augmented Generation (RAG) fetches relevant text from an outside knowledge source at query time, then puts that text in the prompt. The model answers from the supplied evidence, not only from memory.

A trained model's knowledge is frozen at its cutoff, the date its training data stops. It has never seen your company's wiki, last week's ticket, or a private contract. Asking it anyway produces confident guesses.

RAG solves this without retraining. You update the documents, and the next answer changes. Because each answer traces back to a retrieved passage, you can show the source.

The tradeoff is that answer quality now depends on retrieval quality. If the search misses the right passage, the model is back to guessing.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

The diagram below the answer is the concept . Jump to it ↓

Tailored explanation · switch back to · ·
What should the new diagram focus on?
Guided practice for RAG (Retrieval-Augmented Generation) One question at a time. Answer out loud, get graded, see what you missed.
See it - interactive diagram
How RAG answers from documents you control
Your team
Doc store
RAG app
LLM
search 'refund window?'
no matching passage
prompt: question only
'You have 14 days.'
add refunds.md
search 'refund window?'
refunds.md: 30 days
passage + question
'30 days', from refunds.md
1step

The question goes to a search over your own documents first, not to the model.

1 / 9

The model stays the same. What the search finds decides the answer, so editing your documents changes the next reply without retraining.

© LearnThatStack - diagrams may not be republished without permission.

Other questions have diagrams like this too. Sign in to ask for one where it's missing - it's free.

Create a free account
How well did you know this?
AI:

Saved in this browser - sign in to keep your review list.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Interview lens How interviewers actually use this question

Likely follow-ups

What you can say

  1. RAG means that at query time you search an outside knowledge source for relevant text and put it in the prompt, so the model answers from that evidence, not just memory.
  2. The problem is that a trained model's knowledge is frozen at its cutoff, and it has never seen your private data, like your company wiki or last week's tickets.
  3. Ask it about those anyway and it gives you a confident guess.
  4. With RAG you don't retrain anything. You update the documents, and the next answer reflects the change.
  5. And because each answer comes from a retrieved passage, you can show the user the source.
  6. The catch is that answer quality now depends on retrieval. If the search misses the right passage, the model is back to guessing.

Weak answers to avoid

  • Defines RAG but skips the problem The question asks what problem it solves. Name the frozen cutoff and the private data the model never saw, then say RAG fixes that without retraining.
  • Says RAG retrains or updates the model RAG leaves the weights alone. New knowledge goes into the prompt at query time, which is why editing a document changes the next answer.
  • Claims RAG eliminates hallucinations It moves the risk to retrieval. If search misses the right passage the model guesses again, and it can still misread good context. Name that limit.
  • Treats RAG as a synonym for a vector database Vector search is one way to retrieve. Keyword search, hybrid search or a SQL lookup also count. The core idea is retrieved evidence in the prompt.
Interview lens

Likely follow-ups, what you can say, and the weak answers to avoid.

Sign in free to open it Free account - the lens opens as soon as you're back.

Want a quick review of the fundamentals? See the RAG (Retrieval-Augmented Generation) cheatsheet.

← Back to all RAG (Retrieval-Augmented Generation) questions
Pro · $10/mo

50 of 56 RAG (Retrieval-Augmented Generation) answers are in Pro.

Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.

  • Full answers + code
  • AI explanations, simpler or deeper
  • 1,000 AI credits / month
  • Cancel anytime