What is retrieval augmented generation?
Retrieval augmented generation is a two-step process. First, a system retrieves documents or passages that match the question. Second, a language model generates an answer grounded in what it retrieved, often with links back to the sources. The retrieval step is what lets an AI answer about things it was never trained on, such as your pricing page from last week.
Engineers use RAG to build support bots on top of help docs. Marketers meet it in AI search, where the documents being retrieved are public web pages, including yours. That's the version this entry in our SEO and AEO glossary explains.
How does RAG work in AI search?
In AI search, RAG works like a research assistant with a deadline: it runs searches, skims the best passages and writes a short answer from them. Your page competes at the retrieval step, not just the ranking step.
The question is expanded
The system often splits one prompt into several sub-queries, a pattern called query fan-out.
Passages are retrieved
It pulls candidate pages from a search index and picks the passages that best match each sub-query.
The model writes the answer
The language model combines those passages into one answer and usually cites some of the sources.
The reader decides whether to click
Many readers stop at the answer. The ones who click arrive with more context, so the page they land on has to convert.
Engines differ in how many sources they use. The Semrush AI Visibility Index, based on 126 million prompts, found ChatGPT cites about 15 sources per answer against about 3 for Gemini. Fewer slots means retrieval is more selective.
How is RAG different from related terms?
RAG is the mechanism, while terms like AEO and GEO describe the work of getting chosen by it. The table separates them.
Term | What it is | Who acts |
|---|---|---|
RAG | Retrieve passages, then generate an answer from them | The AI system |
AI Overview | Google's AI answer at the top of results | |
AEO | Writing pages so answer engines quote them | You |
GEO | Earning visibility inside generative answers | You |
Fine-tuning | Retraining a model on new data, no live retrieval | The model owner |
For the practitioner's side, read what AEO is and what an AI Overview is.
What does RAG mean for your website?
RAG rewards pages that answer questions in clear, self-contained passages, because the system quotes passages, not whole pages. A paragraph that only makes sense after three screens of context is hard to lift out.
Hypothetical example: a B2B security vendor's pricing question
For example, suppose a buyer asks an AI assistant whether a compliance tool offers a free trial and supports SSO. The assistant retrieves pages for both sub-questions.
Vendor A has a pricing page that says, near the top, that there's a 14-day trial and that SSO is included on the business plan. Vendor B hides the same facts in a PDF and a FAQ accordion rendered by JavaScript. Vendor A's sentence is easy to retrieve and quote, so it's more likely to appear in the answer. Vendor B's facts exist, but the system may never see them.
This is copy, design and code working together: the words state the answer, the layout keeps it visible, and the build server-renders it. If you want a second opinion on your site, our team does all three.
