Retrieval-Augmented Generation (RAG)
What is Retrieval-Augmented Generation (RAG)?
In one sentence: RAG is a way to make an AI answer using real documents: first it searches for relevant information, then it writes an answer based on what it found.
Models only know what they learned in training, which can be outdated or missing your private info. RAG fixes this like an open-book test: the system looks up the right pages and puts them in the model's context before it answers.
What does Retrieval-Augmented Generation (RAG) look like?
A company chatbot that searches the employee handbook before answering "How many vacation days do I get?" uses RAG.
Why does Retrieval-Augmented Generation (RAG) matter?
RAG reduces hallucinations and lets AI use fresh or private knowledge without retraining.
Retrieval-Augmented Generation (RAG) vs. Fine-tuning
RAG gives a model fresh or private facts at answer time like an open-book exam; fine-tuning changes how the model behaves, formats, or speaks without acting as a live database.
| Dimension | Retrieval-Augmented Generation (RAG) | Fine-tuning |
|---|---|---|
| Best for | Changing facts, private docs, citations | Consistent tone, schema, or domain skill |
| Updates | Instant—just re-index new documents | Requires a new training & eval run |
| Hallucination control | High when grounded with citations | Low for unseen or fast-changing facts |
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/retrieval-augmented-generation-rag/">Retrieval-Augmented Generation (RAG), explained simply</a> (The AI Math Dictionary)