What is retrieval-augmented generation (RAG)?

1 min read Last updated: 14 Oct 2026

Retrieval-augmented generation (RAG) is a method in which a language model looks up relevant information before it answers. Instead of relying only on its training knowledge, it first searches a data source – such as the web or company documents – and builds the results into its answer.

The name describes the two steps: fetching information (retrieval) and producing the answer (generation).

How does RAG work?

Put simply, RAG runs in three steps:

  • The question is turned into one or more search queries.
  • A search system finds matching documents and selects the most relevant passages.
  • The large language model writes an answer from them and, ideally, names the sources.

This keeps answers up to date, and the model makes things up less often. AI search tools such as Perplexity, the web search in ChatGPT and Google’s AI Overviews work on this or a similar principle.

Why does RAG matter?

RAG is the reason why traditional visibility and AI visibility are linked: what an AI search cannot find, it cannot cite. Your content therefore needs to be crawlable, indexed and easy to find – on Google and in the search systems of AI providers.

Then there is the format: individual passages are selected, not whole pages. Clear paragraphs that answer a question on their own are more likely to be used. With ongoing GEO management, you structure content so that it ends up as a source in AI answers – whether for a medical practice, an online shop or a SaaS product.