What is retrieval-augmented generation (RAG)?
Retrieval-augmented generation (RAG) is the method AI search tools use to answer a question from fresh sources instead of from memory alone: the system first searches for relevant pages or passages, then hands them to a language model, which writes an answer based on what it was given. When Perplexity or a Google AI Overview answers a question and lists the pages it used, that is RAG at work.
A simple way to picture RAG is an open-book exam. A language model on its own answers from what it learned in training, like a student answering from memory. With RAG, the model is handed the relevant pages first and answers from them, which is why it can cite sources and talk about things that happened after its training ended. NVIDIA's explainer describes the citations RAG makes possible as being like footnotes in a research paper, so users can check the claims [2].
For marketers, RAG is the reason AI visibility is partly a search problem. If a page is not retrieved, the model never sees it, and it cannot be cited.
How does RAG work?
RAG works in four stages: indexing content, retrieving the most relevant pieces for a question, adding those pieces to the model's prompt, and generating the answer [3].
- Indexing. Documents are collected and stored in a searchable form. Many RAG systems split documents into chunks and convert each chunk into a vector embedding, a numerical representation of its meaning [3].
- Retrieval. When a question comes in, a retriever finds the documents or passages that best match it [3]. This step is passage retrieval.
- Augmentation. The retrieved text is inserted into the prompt alongside the user's question [3].
- Generation. The language model writes an answer using both the question and the retrieved text [3].
In AI search products, the index is a web search index and the retriever is a search engine. Google says its AI features rely on its core Search ranking systems to retrieve relevant, up-to-date pages [4], and that AI Overviews and AI Mode may run several related searches, a method called query fan-out, before writing a response [5].
How do AI search engines use RAG?
AI search engines use RAG by running a web search, reading the top results, and writing an answer that links to some of them. Google, OpenAI, Anthropic and Perplexity all describe a search or retrieval layer feeding their AI answers [4][6][7][8].
| AI search product | Where retrieved content comes from |
|---|---|
| Google AI Overviews and AI Mode | Google's core Search ranking systems; a page must be indexed and eligible for a snippet to be a supporting link [4][5] |
| ChatGPT search | Websites surfaced by OAI-SearchBot, plus pages fetched for users by ChatGPT-User [6] |
| Claude | Pages indexed by Claude-SearchBot, plus pages fetched for users by Claude-User [7] |
| Perplexity | Pages indexed by PerplexityBot, plus pages fetched for users by Perplexity-User [8] |
Every one of these companies separates the crawler that feeds retrieval from the crawler, if any, that collects training data. That split is the practical link between RAG and robots.txt: blocking a training crawler such as GPTBot does not remove a site from retrieval, while blocking a search crawler such as PerplexityBot does [6][8]. Few RAG explainers make this connection, and it is the decision site owners actually face.
What is the difference between RAG and grounding?
RAG and grounding describe the same idea from two angles: RAG is the technique, and grounding is the goal of tying an answer to retrieved sources. Google's own documentation treats them as one thing, describing RAG as a technique "also known as grounding" that improves the quality, accuracy and freshness of AI responses by retrieving relevant web pages through Search's ranking systems [4].
In everyday SEO usage, "grounding" is more often used for Google and Gemini, and "RAG" more often for the general architecture and for custom AI tools built on company documents.
What is the difference between RAG and training data?
RAG gives a model information at the moment it answers, while training data shapes what the model knows before anyone asks it anything. The RAG paper calls these two kinds of memory non-parametric (the external index the model can look things up in) and parametric (what is stored in the model's own weights) [1].
The difference matters for marketers in three ways:
- Freshness. Retrieved content can be from this morning. Training data is fixed when training ends.
- Citation. A RAG answer can link to the pages it used [2]. An answer from training data usually cannot point to a source.
- Control. Whether content enters training is governed by training crawlers. Whether content can be retrieved is governed by search crawlers, indexing and ranking [4][6][7].
RAG is also different from fine-tuning, which changes the model itself with extra training. NVIDIA notes RAG can be faster and less expensive than retraining a model on new data [2].
When was RAG invented?
Retrieval-augmented generation was introduced in a paper first posted on May 22, 2020, by Patrick Lewis and colleagues, and accepted at the NeurIPS 2020 conference [1]. Within about three years, RAG had become a standard part of how AI systems answer questions about current information [3].
April 2020: dense retrieval makes it practical
A month before the RAG paper, Karpukhin and colleagues (including Lewis) showed that dense vector retrieval could beat strong keyword-based retrieval for finding answer passages [11]. RAG used this kind of neural retriever.
May 2020: the RAG paper
The paper combined a pretrained text generator with a dense vector index of Wikipedia, accessed through a neural retriever, and reported state-of-the-art results on open-domain question answering [1]. The research came from Facebook AI Research (now Meta AI), University College London and New York University [2]. Lewis later said the team "definitely would have put more thought into the name" had they known how widespread the work would become [2].
2023: RAG goes mainstream
RAG became widely built into AI systems from 2023 onward [3]. NVIDIA's explainer on RAG was first published in November 2023 [2].
2026: Google names it in Search documentation
Google's guide to generative AI features in Search, updated July 10, 2026, describes RAG by name as the grounding technique behind its AI responses, retrieving pages through core ranking systems [4].
Does RAG stop AI hallucinations?
No. RAG reduces hallucinations but does not stop them, because the model can still misstate, misread or overreach beyond the text it retrieved [2][3]. Wikipedia's summary of the research puts it plainly: the model can still hallucinate around the source material in its response [3].
Retrieved sources can also be misread, or a correct statement can be pulled out of context in a misleading way [3]. For brands, this is why a cited answer can still get a price, a feature or a date wrong. A brand hallucination inside a RAG answer often traces back to an outdated or ambiguous page that was retrieved, so fixing the source page is usually the first step.
How do you get your content retrieved by RAG systems?
To get content retrieved by RAG systems, a page has to be reachable by the retrieval crawler, indexed, and competitive in the search results the system draws from. Google says there are no additional technical requirements for its AI features beyond being indexed and eligible to show with a snippet, and no special files or markup are needed [5].
What follows from that:
- Allow the search crawlers. OAI-SearchBot, Claude-SearchBot and PerplexityBot need access for ChatGPT, Claude and Perplexity to retrieve a page [6][7][8]. A crawler allowlist makes these decisions explicit.
- Rank in the underlying search. Search Insider's research found AI Overview citations moved with the organic results rather than independently [10], and that an apparent citation advantage for one page feature disappeared when pages of similar age and ranking position were compared [9]. Retrieval favors what already ranks.
- Write passages that stand alone. Retrieval works at passage level, so a section that answers its question in its first sentence is easier to retrieve and quote.
- Do not fragment pages for the machine. Google says there is no need to break content into tiny pieces for AI to understand it [4].
Why does RAG matter for SEO?
RAG matters for SEO because it makes search rankings the gateway to AI answers: the model can only cite what the retrieval step returns. For Google's AI features, that retrieval step is Google's core ranking systems [4]. For other AI search tools, it is their own search index, fed by their own search crawlers [6][7][8].
That makes AI visibility an extension of SEO rather than a replacement for it. Crawlability, indexing, ranking and clear writing decide whether a page is retrieved. What changes is the last step: instead of a click on a blue link, the reward is a citation inside a generated answer.