What isRetrieval-augmented generation

nounHow AI search worksBeginner4 min read
Definition

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). It's the reason AI answers can cite current web pages, and the reason GEO is possible at all.

Dipuck Jones
Written by Founder of MentionX · 13+ years in B2B SaaS growth and SEO
Reviewed

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

01How 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.

02RAG vs a model alone

Model aloneRAG
KnowledgeFixed at training timeCan include today's pages
Sources shownNoUsually, for retrieved passages
How you influence itSlowly, via what's published over timeFaster: be retrievable and quotable

03Example

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.

04What 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).

05Why 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.

06From MentionX data: visible retrieval by engineOriginal data

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.

EngineBrand mentionedAnswers with no citations
Gemini47.3%50.7%
OpenAI42.9%30.2%
Perplexity31.5%4.1%
AI Mode31.3%12.6%
Copilot26.0%47.0%
DeepSeek24.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.

07Worked 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.

08Common 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).
  • 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.

Questions people ask

3 answers

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 JonesHow we research and testReport an error