Retrieval-augmented generation (RAG)
What is retrieval-augmented generation?
Retrieval-augmented generation (RAG) is a technique where an AI system first retrieves relevant documents, such as web pages or internal files, and then gives them to a language model to write its answer. The model answers from the retrieved text rather than only from what it learned in training, which makes answers more current and lets it cite sources.
The term comes from a 2020 research paper by Patrick Lewis and colleagues at Facebook AI Research. In AI search, the “retrieval” step is usually a web search, sometimes several (query fan-out), followed by fetching and reading the top pages. The “generation” step is the written answer, with citations pointing back to the retrieved pages.
For SEO, RAG is the reason classic search visibility still matters in AI search. A page that isn’t found in the retrieval step can’t be used or cited, however good it is.
Why retrieval-augmented generation matters for SEO
Most AI answers that cite sources are built with some form of RAG. Your page goes through two filters: first it must be retrieved (indexed, crawlable, ranking for the query or a sub-query), then the model must find it useful enough to use and cite. SEO handles the first filter; clear, specific content handles the second.
RAG systems often read only part of a page, or a few passages from it. Pages where the key answer is stated clearly, rather than buried in a long introduction, are easier to use.
How to make pages work for RAG
- Make sure the page can be retrieved: indexed, not blocked to the relevant crawlers, and ranking for the queries it answers.
- Put a clear answer near the top, and use descriptive headings so each section makes sense on its own.
- Use text for important facts. Facts locked inside images or scripts the crawler can’t render may be missed.
- Write naturally for people. Google says there is no need to split content into tiny chunks for AI systems.
Retrieval-augmented generation FAQ
Is RAG the same as grounding?
They are closely related. RAG is the technique of retrieving documents and generating from them; grounding is the goal of tying an answer to verifiable sources. RAG is the most common way to ground an answer.
Does ChatGPT use RAG?
When ChatGPT searches the web, it retrieves pages and writes its answer from them with citations, which is a form of RAG. Without search, it answers from its training data alone.
Related SEO terms
A large language model (LLM) is an AI model trained on huge amounts of text to predict and generate language, such as GPT, Gemini or Claude.
Grounding is tying an AI model’s answer to real, retrievable sources, such as search results, so it is current and can be checked.
Query fan-out is when an AI search system splits one question into many related searches, runs them together and combines the results.
AI citations are the links an AI assistant shows as sources for its answer. Being cited means your page helped build the answer.
Semantic search is search that matches the meaning and intent behind a query, not just its exact words.