Skip to content
Glossary

What is retrieval-augmented generation (RAG)?

Also known as retrieval augmented generation, retrieval-augmented LLM

Definition

Retrieval-augmented generation (RAG) is a method where an AI system first retrieves relevant documents or web pages, then uses them to write its answer. It lets models use fresh or specific information they were not trained on.

Key points

  • RAG means an AI system looks things up first, then writes its answer from what it found.
  • If a page is not found at the retrieval step, it cannot be used in the answer.
  • Clear passages that answer one question fully are easier to retrieve and quote.

What does it mean in practice?

A customer asks an AI assistant which local gyms offer early morning classes. With RAG, the system runs a search, pulls a handful of passages from gym websites and listings, and passes them to the model. The model then writes an answer based on those passages, often with links.

The idea was set out in a 2020 research paper by Lewis and colleagues. AI search engines use their own versions of the approach, and each has its own way of choosing what to retrieve.

RAG is a big reason SEO still matters in AI search. If your page is not found at the retrieval step, it cannot be used in the answer. Being crawlable, indexed and relevant is the first step.

It also explains why clear passages help. The model often works with chunks of text rather than whole pages. A section that answers one question fully, in plain words, is easier to retrieve and to quote than a long page that wanders.

Our guide on how AI engines choose sources covers the patterns. AI citation tracking shows which pages actually get pulled in for your topics.

These terms connect to RAG.

  • Grounding, the broader idea of basing answers on looked-up information.
  • Query fan-out, one way retrieval is widened.
  • Citation, the links that show what was retrieved.
  • Hallucination, the kind of error RAG aims to reduce.

Common questions

Is RAG the same as grounding?

They are closely linked. Grounding is the broad idea of basing an answer on outside information. RAG is a specific method for doing it, where the system retrieves documents and passes them to the model. Most grounded AI search answers use some form of RAG.

What does RAG mean for my website?

It means your pages need to be found before they can be used. Being crawlable, indexed and relevant comes first. After that, clear headings and short passages that answer one question fully make your content easier for the system to pick up and quote.
Reviewed
All terms A to Z
What is retrieval-augmented generation (RAG)? Meaning