On this page8 sections
Why it matters for founders and small teams
RAG is the step where an AI engine goes looking for sources, and it’s the only point in the process where a page published this week can beat a brand the model has known for years. For a founder without a content team, that’s the opening: you can’t change what a model memorized, but you can make your pages the ones its retrieval step finds and quotes.
How does retrieval-augmented generation work?#
Retrieval-augmented generation works in two steps: a retriever searches an index for passages relevant to the question, then a large language model writes the answer with those passages placed in its prompt, citing the ones it used.
The technique was named in a 2020 paper by researchers at Facebook AI Research, University College London and New York University (Lewis et al.), which paired a text generator with “a dense vector index of Wikipedia, accessed with a pre-trained neural retriever.” The paper called the two halves parametric memory — what the model learned — and non-parametric memory, the index it can search. Every AI answer engine now runs a scaled-up version of that design, with the web as the index.
- 1
The question is rewritten into searches
Engines rarely search the exact prompt. They write narrower sub-queries — query fan-out — and run them in parallel.
Your lever: Title pages and sections the way a buyer’s follow-up question would be searched.
- 2
The retriever pulls candidates from an index
Keyword matching and semantic search run over Google’s, Bing’s, Brave’s or the engine’s own index. Perplexity runs both at once and merges the results.
Your lever: Be crawlable by the engine’s search bot and indexed where it looks.
- 3
- 4
The model writes from the survivors
The surviving passages go into the model’s context, and it writes an answer grounded in them, attaching citations to the claims they support.
Google describes the same pattern for AI Overviews: RAG is used “to improve the quality, accuracy, and freshness of AI responses by relying on our core Search ranking systems to retrieve relevant, up-to-date web pages” (Google Search Central).
RAG vs fine-tuning: what's the difference?#
RAG gives a model new information at answer time by retrieving documents, while fine-tuning changes the model’s weights with extra training — so RAG handles fresh, citable facts, and fine-tuning shapes style and behavior.
| Retrieval-augmented generation | Fine-tuning | Training data alone | |
|---|---|---|---|
| When knowledge is added | At the moment of the question | In an extra training run | Before the model’s release |
| Freshness | As current as the index | Frozen at the fine-tune | Frozen at the knowledge cutoff |
| Can it cite sources? | Yes — the retrieved pages | No | No |
| What a site owner can influence | Access, indexing and passages | Nothing | Slowly, through training data |
The two aren’t rivals inside an AI product. A model is fine-tuned once to behave like a helpful assistant, and RAG then supplies the facts question by question. For marketers the distinction that matters is control: you’ll never fine-tune ChatGPT, and you can’t edit what it memorized. RAG is the part of the system that’s open to you — every engine that cites sources is retrieving them, and retrieval can be earned page by page.
Worked example
The RAG Funnel
A way to see how few passages survive each step of retrieval-augmented generation — and why the passage, not the page, is what you’re writing. Stage sizes are illustrative, anchored to published figures where they exist, for a fictional project tool called Plannora.
- 1
Sub-queries the engine writes
A buyer asks ChatGPT for the best project tool for a five-person team. Nectiv measured about 7.6 fan-out searches per ChatGPT prompt after August 2026; round down to 7.
7 searches
- 2
Candidate pages retrieved
Assume ten results per sub-query, then remove pages that appear in more than one search.
~50 pages
- 3
Passages in the pool
At roughly one passage per 150-word section, a 2,000-word page yields about 13. 50 pages × 13.
~650 passages
- 4
Reranked short list
Anthropic’s published RAG setup retrieves 150 chunks and reranks them down to 20 for the model. Assume the same cut to 20.
20 passages
- 5
Cited in the answer
Attrifast’s 2026 study measured a median of 3.1 domains cited per ChatGPT answer. Call it 3.
3 sources
- =
Odds for any one passage
3 ÷ 650 — the share of the pool that makes it into the answer.
under 0.5%
The result: Plannora’s pricing page could be retrieved for three of the seven sub-queries and still lose if a competitor’s section answers “price per user for five people” in its first sentence. The funnel shows where effort pays: being indexed and matching the sub-queries gets you into the pool of 650, and a passage that answers first is what survives the last two cuts.
Free to use and adapt. If you cite it, link to rankbox.xyz/glossary/retrieval-augmented-generation.
Why does retrieval-augmented generation matter for SEO?#
Retrieval-augmented generation matters for SEO because the retrieval step runs on search indexes: a page that isn’t crawlable, indexed and matched to the engine’s sub-queries can’t be retrieved, and a page that isn’t retrieved can’t be cited.
That makes classic SEO the entry ticket, not the whole game. Retrieval works on sub-queries and passages, so a page can be cited for a follow-up question it answers well while ranking nowhere for the prompt the user typed.
~8%
of ChatGPT citations rank in Google's or Bing's top 10 for the original prompt
37.9%
of pages cited in Google AI Overviews rank top 10 for the typed query
28.6%
of Perplexity's citations rank in Google's top 10 — the highest overlap of any assistant
Each engine retrieves from a different place — Google’s index for AI Overviews and Gemini, Bing plus OpenAI’s own index for ChatGPT, Brave for Claude, and Perplexity’s own 200-billion-URL index — so being findable means being indexed in all of them. The AI SEO guides cover each engine’s source and crawler.
How do you optimize content for retrieval-augmented generation?#
Optimize for retrieval-augmented generation by removing anything that blocks retrieval, then writing passages a retriever can match and a model can quote: descriptive headings, the answer in the first sentence, and specific names, numbers and dates.
- Let the search bots in, and check your CDN, whose AI-bot toggles can override robots.txt. See AI crawlers.
- Put the text in the HTML. Only Google’s pipeline renders JavaScript; OpenAI’s, Anthropic’s and Perplexity’s fetchers read raw HTML.
- Match the sub-question in titles, H2s and URL slugs. Ahrefs found the titles of pages ChatGPT cited were semantically closer to the prompt than uncited titles (0.602 vs 0.484), and closer still to its fan-out queries.
- Answer first, then expand. Growth Memo found 44.2% of ChatGPT citations came from the first 30% of a page. See answer-first content.
- Make sections stand alone. A retrieved chunk arrives without the paragraphs around it, so name the subject instead of writing “it” or “as above.”
- Stay current. Perplexity filters stale pages before ranking, and Ahrefs found assistants cite newer pages than classic search does. See content freshness.
Common mistakes with retrieval-augmented generation#
The most common RAG mistakes are assuming a top ranking for the head term is enough, hiding the answer behind JavaScript or a long intro, and writing sections that only make sense in context — each one stops a page at retrieval or extraction.
Myth
RAG engines just show Google's top results.
Reality
Engines retrieve for their own sub-queries from their own indexes. Only about 8% of ChatGPT’s citations rank top 10 for the original prompt.
Myth
An llms.txt file feeds my content to RAG systems.
Reality
No major engine has confirmed reading other sites’ llms.txt files. Retrieval runs on search indexes and crawlers.
Myth
Being retrieved means being cited.
Reality
Retrieval only puts a page in the pool. A reranker cuts the pool to a short list, and the answer cites a few sources — a median of about three domains per ChatGPT answer in Attrifast’s 2026 study.
Myth
Longer, more comprehensive pages always win.
Reality
Retrieval scores passages. A long page with the answer buried in paragraph nine loses to a short section that answers first — Google says there’s “no ideal page length.”
Related terms#
- How LLMs answerGroundingThe process of tying an AI model’s answer to specific, verifiable sources — usually web pages retrieved at the moment of the question — so the claims in the response can be checked and cited, rather than generated from the model’s memory alone.Read the entry
- How LLMs answerQuery fan-outAn AI search technique in which the engine rewrites one user question into several narrower sub-queries, runs them in parallel and builds its answer from the combined results — which is why a page can be cited for a prompt it doesn’t rank for.Read the entry
- How LLMs answerRerankingA second retrieval stage in which a more precise model re-scores the top results of a first, faster search against the query and reorders them — the step that decides which few passages an AI answer engine actually reads and cites.Read the entry
- How LLMs answerContent chunkingThe splitting of a page into smaller passages — often a heading and the text beneath it — that an AI retrieval system indexes, scores and quotes individually, which makes the section, not the whole page, the unit that competes for a citation.Read the entry
- How LLMs answerSemantic searchA retrieval method that matches a query to content by meaning and intent — typically by comparing vector embeddings — instead of by the exact words both contain, so a page can be found for phrasings it never uses.Read the entry
- LLMHow LLMs answerLarge language modelA neural network trained on vast amounts of text to predict the next word, which lets it write fluent answers — the technology behind ChatGPT, Claude and Gemini, whose knowledge is fixed at training time unless it retrieves fresh sources.Read the entry
Go deeper
Sources
- 1.Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksLewis et al., NeurIPS 2020 · arxiv.org ↗
- 2.Optimizing your website for generative AI featuresGoogle Search Central · developers.google.com ↗
- 3.Architecting and evaluating an AI-first search APIPerplexity Research · research.perplexity.ai ↗
- 4.Introducing Contextual RetrievalAnthropic · anthropic.com ↗
- 5.AI search overlap with Google and BingAhrefs · ahrefs.com ↗
- 6.How many AI Overview citations rank in the top 10?Ahrefs · ahrefs.com ↗
- 7.ChatGPT tripled its fan-out queriesNectiv · nectivdigital.com ↗
- 8.AI search citations by vertical, 2026Attrifast · attrifast.com ↗
