Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
51 small wins to finish your pathNext question →

Q1EasyConcept

What is RAG, and why do we need it?

30-second answerSay your answer out loud first, then reveal.
The RAG flow: the user question is embedded and searched in a vector index, the top-k chunks and the question go into the prompt, and the LLM returns a grounded answer with citations.

Why not just use the LLM?

  1. Knowledge cutoff: the model doesn't know last week's policy change.
  2. Private data: it never saw your company wiki, contracts or tickets.
  3. Hallucination: when unsure, LLMs produce fluent but wrong answers. Supplying the source text and instructing the model to answer from it reduces this considerably.
  4. Traceability: you can show which document an answer came from, which matters in enterprise, legal and medical settings.
  5. Cheap updates: update the index, not the model.

Origin: the term comes from Lewis et al. (2020, Facebook AI), which combined a retriever and a generator trained jointly. Today "RAG" usually means the simpler pattern of an off-the-shelf retriever plus a prompted LLM.

Example. An HR bot answering "How many casual leaves do I get?" retrieves the relevant section of the leave policy PDF and answers "12 days per year (Leave Policy §3.2)."

Common mistakes

  • Saying RAG "trains the model on your data." It doesn't change model weights at all.
  • Thinking RAG eliminates hallucination. It reduces it. The model can still ignore or misread the context.

Follow-ups to expect

  • When would you fine-tune instead? (See Q12.)
  • What are the main failure points? (See Q14.)

Little by little, you're building something great.