Retrieval-augmented generation, usually shortened to RAG, is a way of building AI answers in two steps. First the system retrieves documents that look relevant to the question, from a search index or a database. Then the language model generates its answer using those documents as source material, often with links back to them.
Without retrieval, a model can only answer from what it learned in training, which has a cutoff date and no record of where each fact came from. With retrieval, it can answer about this week’s prices, a business that opened last month, or a page you updated yesterday, and it can show its sources.
How RAG works, step by step
- The question comes in. “Which dentists in Columbus offer same-day crowns?”
- The system turns it into searches. Sometimes one, sometimes several. Google calls its version of this query fan-out.
- It retrieves candidates. Pages, passages or records that match, from a web index or a private document store.
- It picks the useful parts. Usually passages, not whole pages.
- The model writes the answer from those passages and attaches citations.
Each assistant does this differently and most do not publish the details, so treat this as the general pattern rather than a description of any one product.
Why it matters for SEO
RAG is the reason LLM citations exist, and it changes what “being visible” means:
| Step | What has to be true for your page |
|---|---|
| Retrieval | The page is crawlable by the assistant’s crawler and indexed by the search system it uses |
| Selection | A passage on the page answers the question clearly and on its own |
| Generation | The facts are specific and consistent, so the model can state them confidently |
| Citation | The page is the clearest source for that fact, not a copy of someone else’s |
If your page is not in the index the assistant searches, it cannot be retrieved, however good it is. That is why crawl access matters. Check that your robots.txt is not blocking the AI crawlers you want, and remember that Google’s AI features use Google’s own index, so normal indexing comes first.
A worked example
Brightside Dental has a “Same-day crowns” page. Version one opens with three paragraphs about the practice’s philosophy, and the fact that they use in-office milling and finish most crowns in one visit sits halfway down. Version two opens: “Brightside Dental makes same-day ceramic crowns in our Columbus office. Most patients are in and out in one appointment of about two hours.” The second version gives a retrieval system a passage it can lift as it is. On sites we work on, rewriting key pages this way is one of the first things we do for AI search.
What to do
- Answer the main question in the first two sentences of each page and each section.
- Keep facts consistent across your site, Google Business Profile and directories, so retrieved sources agree.
- Use clear headings so passages have obvious boundaries.
- Allow the crawlers of the assistants you care about; the free AI Crawler Checker shows what your robots.txt allows.
- Measure the outcome. RankThat’s AI Visibility tracks whether ChatGPT, Gemini, Perplexity, Claude and Google AI Overviews mention or cite you for chosen questions.
Common mistakes
- Assuming a model “knows” your business from training. If it is answering with retrieval, what matters is what it can find today.
- Blocking all AI crawlers by default and then wondering why assistants cite competitors.
- Hiding key facts in images, PDFs or JavaScript-only widgets that retrieval systems may not read.