Learn AI Math

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.

DimensionRetrieval-Augmented Generation (RAG)Fine-tuning
Best forChanging facts, private docs, citationsConsistent tone, schema, or domain skill
UpdatesInstant—just re-index new documentsRequires a new training & eval run
Hallucination controlHigh when grounded with citationsLow for unseen or fast-changing facts

Last updated · Fact-checked by The AI Math

Linking to this page from a lesson or article?

Like this explanation? Get one every week.

The AI Math newsletter turns confusing AI news into plain English. No hype, no jargon walls.