Guides

What Is RAG? How Retrieval-Augmented Generation Picks Its Sources

RAG lets an AI model look things up before it answers. Learn how retrieval works, why it decides which pages get cited, and how to make yours easy to retrieve.

Key Takeaways

5
  • RAG (retrieval-augmented generation) means the model searches a set of documents first, then writes its answer using what it found.
  • Without retrieval, a model can only use what it learned in training. With retrieval, it can use a page that was published this morning, and it can cite it.
  • AI search products such as ChatGPT search, Google AI Overviews and Perplexity work this way: they search, read a handful of pages and answer from them.
  • Being retrieved is the step before being cited. A page has to be crawlable, indexed and contain a passage that answers the question on its own.
  • You cannot see the retriever, but you can see its output: which sites AI answers cite for your questions, and whether yours is one of them.

RAG, short for retrieval-augmented generation, is a way of building AI answers in which the model first looks up relevant documents and then writes its reply based on them. Instead of relying only on what it memorised during training, the model gets a small, fresh reading list for every question. That reading list is why some pages end up cited in AI answers and others never do.

If you work on a brand’s visibility in ChatGPT, Gemini or Perplexity, RAG is the part of the system you can actually influence. You cannot change what a model learned two years ago. You can change whether your page is the one it finds today.

What does RAG stand for, and where did it come from?

RAG stands for retrieval-augmented generation. The term comes from a 2020 research paper by Patrick Lewis and colleagues, Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. The idea was simple: pair a language model with a searchable index, let it fetch passages that look relevant, and generate the answer with those passages in view.

The paper showed that this made answers more specific and more factual than a model working from memory alone. It also made them easier to update. To teach a model something new, you no longer had to retrain it; you could add a document to the index.

How does retrieval-augmented generation work?

Every RAG system, from a company’s internal help bot to AI search, follows the same three steps.

  1. Retrieve. The question is turned into one or more searches. The system pulls a set of candidate documents or passages from an index. In AI search, that index is usually a web search index.
  2. Augment. The most relevant passages are placed into the model’s prompt next to the user’s question, often with their URLs.
  3. Generate. The model writes an answer using those passages, and in most AI search products it links back to the pages it relied on.

A typical question might look like this behind the scenes:

“Which project management tool is best for a ten-person agency?”

The system may search for agency project management tools, pricing and reviews, read six to ten pages, and answer from them. Google calls a version of this in AI Mode query fan-out: one question becomes several searches.

RAG versus training data: which one decides what AI says about you?

Both, but in different ways. It helps to keep them apart.

Training dataRetrieval (RAG)
When it is learnedMonths or years before you askAt the moment you ask
Can it be cited with a linkNoYes
How fast it changesOnly when a new model is releasedAs soon as a page is indexed
What you can influenceYour long-term presence on the webThe pages that answer today’s questions

When a model answers without searching, you get its memory: general impressions of a brand, often a little out of date, with no source to check. When it searches first, you get an answer built from specific pages, and those pages are the ones you can work on.

In Brantial’s AI Sector Index, for example, the October 2026 answers were collected from a single model with web search switched off, precisely to measure what the model knows on its own. Answers in ChatGPT search or Perplexity, where retrieval is on, can name different brands for the same question.

Do ChatGPT, Gemini and Perplexity use RAG?

Yes, whenever they search the web before answering.

The details differ, and none of these companies publishes its ranking logic. The shape is the same: search, read, answer, cite.

What makes a page easy for RAG to retrieve and cite?

Retrieval works on passages, not whole websites. A long page can be found because of one paragraph that answers the question well. That leads to a few practical rules.

  • Be reachable. If a crawler cannot fetch the page, it cannot be retrieved. Check robots.txt for the search bots you care about and make sure the main text is in the HTML rather than loaded only by JavaScript. Our guide to search bots lists the user-agents that matter.
  • Answer early and plainly. Put the direct answer to the question in the first sentences under a heading that asks it. A passage that makes sense on its own is easier to lift into an answer.
  • State the facts that a comparison needs. Prices, limits, sizes, supported countries, dates. Models prefer a page that settles a detail over one that hints at it.
  • Keep one topic per section. Clear headings help the system split a page into passages that each match a specific question.
  • Keep it current. RAG is the reason a page published this week can be cited this week. It is also the reason an outdated page keeps being cited with outdated facts.
  • Be present where AI looks. Retrieval often lands on third-party pages: reviews, comparisons, directories, forums. If those pages discuss your competitors and not you, the answer will too.

None of this is a trick. It is what makes a page useful to a person scanning for an answer, and retrieval systems reward the same thing.

How can you tell whether your pages are being retrieved?

You cannot watch the retriever work, but you can see what it produces.

  1. Run the questions your customers ask in the AI search products that matter to you, and note which sites are cited.
  2. Check your server logs for visits from AI search bots and user-triggered fetchers. A page that is never fetched is never retrieved.
  3. Compare cited pages with yours. If the same review site or competitor page is cited again and again, read it. It usually answers a sub-question your page skips.
  4. Track it over time. Retrieval changes as the index changes. One check tells you little; a weekly series shows a trend.

Frequently asked questions

What does RAG mean in AI?

RAG means retrieval-augmented generation. The AI model searches a collection of documents, such as a web index or a company knowledge base, and uses the passages it finds to write its answer.

Is RAG the same as fine-tuning?

No. Fine-tuning changes the model itself by training it further on new examples. RAG leaves the model unchanged and gives it relevant documents at the moment of the question. Updating a RAG system can be as simple as adding a page to the index.

Does RAG stop AI from making things up?

It reduces the problem but does not remove it. A model with good sources in front of it is more likely to be accurate, and it can cite them. It can still misread a source, combine two sources wrongly, or rely on a page that is itself wrong.

Why does AI cite some pages and not others?

Because only a handful of retrieved passages make it into the answer. Pages that are reachable, indexed, current and that answer the specific question in a clear passage have a better chance. Pages that are blocked, thin or vague rarely make the cut.

Can I block AI from using my content in answers?

Partly. You can disallow a provider’s search crawler in robots.txt, which keeps your pages out of that provider’s retrieval. Blocking a training crawler is a separate decision. Check each provider’s documentation, because the bots and their controls differ.

↑ Back to top