What is RAG and why is it important?
LLM & AILevel: FoundationCore Concepts
What is RAG and why is it important?
Hints
- Break the query into candidate retrieval, context selection and generation.
- How would you locate the stage that lost a fact without using only one end-to-end metric?
Answer
RAG (Retrieval-Augmented Generation) grounds LLM responses in retrieved external knowledge:
User Query → Retrieve relevant docs → Augment prompt with context → LLM generates answer
Why not just use the LLM's parametric knowledge?
- LLMs have a knowledge cutoff — they don't know recent events
- LLMs hallucinate facts when uncertain — retrieved facts are verifiable
- LLMs were never trained on private enterprise data
- Updating knowledge requires retraining (expensive) without RAG
RAG separates knowledge (vector store) from reasoning (LLM), letting you update either independently.
Source and licence: JustInCache & contributors — Awesome AI Interviews · Apache-2.0