Skip to content

What is RAG (retrieval-augmented generation)?

Glossary entry. Checked on 19 November 2026.

RAG, in plain words

RAG (retrieval-augmented generation) is a technique where relevant documents are fetched from a knowledge base when you ask a question and passed to the language model with it, so the answer is grounded in that material instead of the model's memory.

How it works

  1. You ask a question.
  2. A search step finds the most relevant passages in a set of documents.
  3. Those passages go into the model's context window together with your question.
  4. The model answers from them, and can cite them.

When it helps

RAG suits up-to-date information, company knowledge and anything that needs sources. Its answers are only as good as what the search step finds. With MCP, an assistant can do its own retrieval by calling a search tool.

Share this definition

Sources

Official documentation, checked on 19 November 2026. Products change: if a step differs, the source has the current version.