25% off your first month with code WELCOME25 · 29 days left and only 50 spots Claim my discount

Glossary

What is RAG (Retrieval-Augmented Generation)?

Retrieval-Augmented Generation (RAG) is the technique answer engines use to fetch relevant documents at query time and feed them to the model so its answer is grounded and citable. Your page becomes a RAG source when it's crawlable, relevant, and clearly structured around the question.

Why RAG matters for content

RAG is the mechanism behind grounded answers, and understanding it explains why some pages get cited and others do not. The model never reads your whole site. It receives a handful of retrieved passages, so what matters is whether the right passage of your page is found and can stand on its own.

How RAG works, step by step

First, the question is turned into a search query or several. Second, a retrieval system finds candidate documents, using keyword matching, vector similarity over embeddings, or both. Third, documents are split into passages and the best ones are selected. Fourth, those passages are inserted into the model's prompt. Fifth, the model writes the answer, and citations point back to the source passages.

The practical consequences are simple. Your page must be reachable by crawlers, its passages should make sense without the surrounding page, and headings and wording should match how people actually phrase the question.

A hypothetical example

Imagine an FAQ page where each answer starts with 'As mentioned above, yes, within 30 days.' Retrieved as a passage on its own, that sentence is meaningless. Rewriting it as 'Yes, you can return items within 30 days of delivery if they are unused' makes the passage self-contained, so a model can use it accurately and cite it.

Common mistakes

  • Writing passages that depend on 'this', 'above' or 'as we said' to make sense.
  • Placing key facts only in images, PDFs or content that appears after a login or heavy scripting.
  • Burying the answer deep in a long page with vague headings.
  • Letting facts drift out of date, since retrieval can surface an old page as easily as a new one.

Common questions

Is RAG the same as fine-tuning?

No. Fine-tuning changes a model's weights through additional training. RAG leaves the model unchanged and supplies documents at question time, so fresh content can be used without retraining.

Can I tell whether my page is used as a RAG source?

Only indirectly. Check the sources cited in answers to your tracked questions, and look for AI crawler requests in your server logs.

See if AI assistants recommend your brand

Run a free scan to see which AI engines mention your brand and who they cite instead of you.

Scan my site free

Keep reading

Related terms

See what AI says about your business

Paste your website address. We show which AI assistants mention you and who they recommend instead.

Free scan · 3 AI engines · free account, no card