# What Is Retrieval augmented Generation? Definition and Example

> Retrieval augmented generation (RAG) combines a language model with documents retrieved at answer time. How RAG works and why it matters for GEO.

Source: https://mentionx.ai/glossary/retrieval-augmented-generation  
Author: Dipuck Jones, founder of MentionX  
Updated: 31 October 2026  
Level: Beginner

**Retrieval augmented generation (RAG) is a method where an AI system retrieves relevant documents at the moment of a question and gives them to a language model, which uses them to write its answer.** The term comes from a 2020 paper by Lewis et al. ([arXiv](https://arxiv.org/abs/2005.11401)). It's the reason AI answers can cite current web pages, and the reason GEO is possible at all.

> **Key takeaways**
>
> - Retrieval augmented generation (RAG) fetches relevant documents and gives them to a language model to write an answer.
> - It was formalised by Lewis et al. in 2020.
> - RAG is why fresh, well structured pages can change AI answers within weeks.
> - In MentionX data, the share of answers with no citations ranged from 4.1% to 99.0% by engine, a rough sign of how much each relied on visible retrieval.

*Checked on 31 October 2026. "Our view" marks MentionX opinion. Ledgerline is a fictional company used for illustration.*

## How does RAG work?

1. **Question:** a user asks something.
2. **Retrieve:** the system searches an index (the web, a search engine's index or a document store) for relevant passages.
3. **Augment:** the best passages are added to the model's input.
4. **Generate:** the model writes an answer using both what it learned in training and the retrieved text, often with citations.

## RAG vs a model alone

| | Model alone | RAG |
|---|---|---|
| Knowledge | Fixed at training time | Can include today's pages |
| Sources shown | No | Usually, for retrieved passages |
| How you influence it | Slowly, via what's published over time | Faster: be retrievable and quotable |

## Example

*Illustrative.* Asked "what does Brand X's starter plan cost?", a model alone might repeat an outdated price it learned. A RAG system retrieves Brand X's current pricing page and a review site, and states the current price with a link, provided those pages are crawlable and the price is in readable text.

## What does RAG mean for content?

Retrieval works on passages, not whole sites. Pages with clear headings, self contained paragraphs and specific facts are easier to retrieve and quote. Google describes a related technique, query fan out, where its AI features issue several related searches to find supporting pages ([Google](https://developers.google.com/search/docs/appearance/ai-features)).

## Why it matters for GEO

Most practical GEO work targets the retrieval step: crawler access, indexability, clear structure and being present on the sources engines retrieve. You can act on these this month, whereas training data changes slowly.

## From MentionX data: visible retrieval by engine

**Method.** Read only aggregate queries over MentionX scans from 22 August to 29 October 2026 (UTC): 2,217 engine runs (2,154 completed) across 18 anonymised projects and six engines.

| Engine | Brand mentioned | Answers with no citations |
| --- | --- | --- |
| Gemini | 47.3% | 50.7% |
| OpenAI | 42.9% | 30.2% |
| Perplexity | 31.5% | 4.1% |
| AI Mode | 31.3% | 12.6% |
| Copilot | 26.0% | 47.0% |
| DeepSeek | 24.0% | 99.0% |

We can't see inside an engine's retrieval, but citations are the visible trace of it. The engines in our sample differ widely.

When answers showed sources, unbranded answers named 1.11 brands on average; without sources, 1.44.

*Our view:* engines that show sources in most answers are where RAG friendly content work pays back fastest.

**Limits.** A convenience sample of mostly B2B software projects, run through engine APIs, which can behave differently from the consumer apps. Perplexity, Copilot and DeepSeek figures come from a single day (26 October 2026), so treat them as a snapshot, not a trend.

## Worked example: Ledgerline's retrieval test

*Ledgerline is a fictional accounts payable tool. Figures are illustrative.*

Ledgerline updates its pricing page on 1 October to add a new plan. It then asks four engines "how much does Ledgerline cost?" every few days.

Perplexity cites the new page within a week. AI Mode does by mid month. OpenAI cites a review site that still shows old prices, so the team asks the review site to update. DeepSeek, which cites nothing, repeats last year's prices.

> **Pro move:** After any important page change, log the date and check retrieval heavy engines weekly. It gives you a realistic idea of how fast each engine picks up changes.

## Common mistakes

- Assuming RAG reads your whole page. It typically works with passages, so each section must stand alone.
- Putting key facts in images or behind scripts that crawlers may not render ([Google](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)).
- Forgetting third party pages: RAG retrieves from them too, and stale facts there get repeated.
- Measuring once. Retrieval results vary, so check over several runs before deciding a change worked.

## Common questions

**Is RAG the same as search?** RAG uses search or another retriever, then has a model write from the results.

**Does RAG prevent hallucinations?** It reduces reliance on memory but doesn't eliminate errors ([Lewis et al.](https://arxiv.org/abs/2005.11401)).

**Can I optimise directly for RAG?** Write clear, factual, self contained sections and make sure they're crawlable and indexed.

**Why do some engines rarely cite?** Product design. Some answer mostly from the model unless search is triggered; our DeepSeek API runs returned no citations in 99.0% of answers.

## Related

- [Grounding](https://mentionx.ai/glossary/grounding)
- [Query fan out](https://mentionx.ai/glossary/query-fan-out)
- [Content chunking](https://mentionx.ai/glossary/content-chunking)

## Frequently asked questions

### Where does the term RAG come from?

It was introduced in a 2020 research paper by Lewis et al., "Retrieval Augmented Generation for Knowledge-Intensive NLP Tasks".

### Do ChatGPT and Perplexity use RAG?

Products that search the web and cite pages work on the same principle: retrieve documents, then generate an answer using them.

### Can RAG still get things wrong?

Yes. It reduces reliance on memory, but answers can still misread or misquote a retrieved source.

---

Written and reviewed by Dipuck Jones for MentionX Academy. The HTML version of this page: https://mentionx.ai/glossary/retrieval-augmented-generation
