What RAG Is

Retrieval-Augmented Generation

RAG is an architecture that gives language models access to external knowledge at inference time. Instead of relying solely on what was encoded during training, RAG retrieves relevant documents and injects them into the prompt before the model generates an answer.

The name explained

Retrieval — find relevant documents from a knowledge base.
Augmented — enrich the model's input with that retrieved content.
Generation — the model produces an answer grounded in the retrieved context.

The Three Problems RAG Solves

1

Knowledge cutoff — Training data is frozen in time. RAG's knowledge base is updated independently, so it reflects current information.

2

Private knowledge — Enterprise data never appears in public training data. RAG makes it accessible at query time without exposing it to model training.

3

Hallucinations — Models fabricate plausible-sounding answers when knowledge is vague. Grounding answers in retrieved content reduces this significantly.

What RAG Is Not

RAG

Leaves the model's weights unchanged. Changes what information is available in the prompt. Knowledge base is updated separately from the model.

Fine-Tuning

Updates the model's weights through additional training. Changes what the model knows at a fundamental level. Requires data, compute, and ML expertise.

RAG is also not copy-pasting search results. The model reads retrieved content and synthesizes a coherent answer — combining information from multiple chunks, translating technical content, and refusing to answer when the retrieved content doesn't support it.

Need Help?

Ask the AI assistant about what RAG is, how it differs from fine-tuning, or when to use it.