Skip to content
GlossaryKey term

Retrieval-Augmented Generation (RAG)

A technique that retrieves relevant documents and supplies them to a model so answers are grounded in sources.

Reviewed May 7, 2026

What it is

RAG combines search with generation. A query is used to retrieve passages from an index, and those passages are included in the prompt. The model is instructed to answer from the supplied material and cite it.

Why it matters

It allows answers over private or current documents without retraining the model. It also makes citations possible, which supports verification.

Where it fails

RAG is only as good as retrieval. If the right passage is missing, chunked badly, outdated or outranked by an irrelevant one, the answer will suffer. Evaluate retrieval separately from generation, and keep documents versioned and owned.

Keep learning

Concepts are easier to remember when you apply them. The foundations path connects this term to practical exercises.

AI foundations path →

Related terms