What is retrieval-augmented generation (RAG)?

By the Variask team · Updated

Definition

Retrieval-augmented generation (RAG) is a way of building AI answers where the system first retrieves relevant documents or web pages, then has the language model write the answer using them.

Also called RAG

How RAG works

  1. 1Retrieve: find the passages most related to the question, using search, vector search or both.
  2. 2Augment: add those passages to the prompt the model sees.
  3. 3Generate: the model writes an answer based on them, often with citations.

AI search engines such as Perplexity, ChatGPT search, Copilot and Google AI Overviews all follow this pattern in some form.

Why it matters for visibility

In a RAG system, the answer can only use what was retrieved. If your page is not among the retrieved passages, you are not in the answer, however good your product is. Being retrievable, readable and quotable is the core of AI search optimization.

What it means for brands

  • Be findable in the searches the engine runs, not only in the question the user typed.
  • Make each passage clear and self contained so it survives being lifted out of the page.

Questions

Retrieval-augmented generation (RAG):
common questions

No. Fine tuning changes the model with extra training. RAG leaves the model as it is and gives it fresh material at answer time.

No. Many answers come only from training data. RAG is used when the engine searches or has access to a document set.

Related terms

Keep exploring

Full glossary