RAG
Retrieval Augmented Generation — enhancing LLMs with external knowledge to reduce hallucinations.

Grounding AI in Facts
LLMs can only work with what they learned during training — which can be outdated or wrong. RAG solves this by retrieving relevant documents before generating an answer, giving the model access to current, verifiable information.
This is how enterprise AI systems avoid hallucinations: they don't just generate — they look up the answer first.
LLMs hallucinate because they rely on stale training data. RAG gives them a "library card" to look things up.
Question → Retrieve relevant docs → Feed docs + question to LLM → Answer with citations.
Up-to-date info, verifiable sources, domain-specific knowledge, reduced hallucinations.
Watch RAG in Action
Click "Ask a Question" to watch how RAG retrieves information before generating an answer:
"What is Claude's latest model?"
Searches knowledge store using semantic similarity...
Found: "Anthropic released Claude Opus 4 in June 2025..." (source: docs.anthropic.com)
"Claude's latest model is Claude Opus 4, released in June 2025." [Source: Anthropic Docs]
RAG Architecture
Where RAG Is Used
Search engine that retrieves web pages, then generates answers with citations. Pure RAG architecture.
Customer support bots that search internal knowledge bases before answering. Reduces wrong answers.
Retrieves relevant code from your codebase to provide contextually-aware suggestions.
Test Your Understanding
Q1.What problem does RAG solve?
Q2.What does the "R" in RAG stand for?
Q3.In a RAG system, what happens BEFORE the LLM generates its answer?
Q4.Which is a real-world example of RAG?