Back to Blog

What Is Retrieval Augmented Generation and Why It Matters for Search

PB

Patrick Bushe

July 5, 2024 · 5 min read

Retrieval-augmented generation, or RAG, is a way of making an AI model answer using information it looks up at the moment you ask, rather than relying only on what it learned in training. It's the technique behind most AI search answers that cite sources.

How it works

  1. You ask a question.
  2. Retrieval: the system searches an index, such as the web or a company's documents, for passages likely to contain the answer.
  3. Augmentation: it adds the best passages to the prompt it gives the AI model.
  4. Generation: the model writes an answer based on those passages, often with links to them.

The term comes from a 2020 research paper by Patrick Lewis and colleagues at Facebook AI Research.

Why it matters

  • Fresher answers: models are trained on data up to a cut-off date; retrieval brings in current information.
  • Sources: answers can point to where information came from, so you can check.
  • Fewer made-up facts: grounding answers in real documents reduces, but doesn't eliminate, invented details.
  • Private knowledge: companies use RAG so chatbots can answer from their own manuals and policies.

Where you see it

Google's AI Overviews and AI Mode, ChatGPT search, Perplexity and Microsoft Copilot all retrieve web pages and summarize them. Each uses its own index and ranking, which is why the same question can get different answers and sources.

Where it goes wrong

  • Bad retrieval: if the search step picks poor or outdated pages, the answer inherits their mistakes.
  • Misreading: the model may summarize a source incorrectly, or mix details from different sources.
  • Satire and jokes: retrieved content can be taken literally.
  • Citations that don't support the claim: a link next to a sentence doesn't guarantee the source says it.

See fact-checking AI answers.

What it means for site owners

  • Pages need to be crawlable and indexed to be retrieved.
  • Clear passages that answer a question on their own are easier to retrieve and quote.
  • Accurate, current, well-sourced content is more likely to be used.

See writing for AI citation and knowledge graphs.

Choosing when to see AI answers

If you'd rather start with links, Search Cleaner hides Google's AI Overviews and the AI Mode tab, and Google's Web filter shows plain results.

More Tools by Patrick Bushe

Free Chrome extensions to boost your productivity and privacy