SEO

RAG

Also called retrieval augmented generation

A method where relevant documents are fetched first and a language model then answers using only what was retrieved.

Quick facts: RAG

Category
SEO
Also called
retrieval augmented generation
Level
Advanced
Affects
Answer accuracy, AI search citations, chatbot reliability
Where to see it
ChatGPT with browsing, Perplexity, Google AI Mode, custom chatbots
In this article4
  1. How RAG works
  2. Why RAG matters
  3. Where RAG goes wrong
  4. How to build on it

How RAG works

RAG stands for retrieval augmented generation, and the name describes the order of operations. A question arrives. Before any answer is written, the system searches a defined set of material — a website, a document store, a help centre, an index of the open web — and pulls back the passages that look most relevant. Only then does a language model write, using those passages as its raw material.

The retrieval step usually works on meaning rather than exact words. Documents are cut into chunks, each chunk is turned into a numeric representation of what it is about, and the question is converted the same way, so a passage can be matched even when it shares no vocabulary with the query. The result is an answer that can quote a specific document and, in a well-built system, tell you which one.

Why RAG matters

It is the difference between a model answering from memory and answering from a source. A plain model has no store of facts to consult, so it produces the most plausible continuation and can invent freely. A retrieval system narrows the model’s job to summarising material that is actually in front of it, which cuts invention sharply and lets the answer be checked.

It matters commercially in two directions. Inside a business, retrieval is what makes an assistant answering from your own documents feasible without retraining anything. Outside it, retrieval is exactly what AI search does — which is why being retrievable, clearly written and correctly attributed on your own site is a visibility question and not only a technical one.

Where RAG goes wrong

Retrieval does not guarantee truth; it guarantees a source. If the documents are out of date, contradictory or badly written, the system will answer confidently from the wrong page, and the citation makes the wrong answer look more trustworthy than it is. Rubbish in, cited rubbish out.

The other failures are quieter. Chunking that splits a table or an argument in half retrieves fragments that mislead. Questions the material cannot answer often get answered anyway, because the model would rather summarise the nearest passage than say nothing. And a knowledge base nobody owns drifts out of date without any visible failure at all — the assistant carries on sounding perfectly fine.

How to build on it

Treat the documents as the product. Decide what is in the source set and what is deliberately excluded, remove superseded versions instead of leaving them beside the current one, and give each document an owner and a review date. Most disappointing assistants are content problems wearing a technology costume.

Then insist on visible sources and test the edges. Every answer should name the document it came from, so a person can check it, and your test set should include questions the material does not cover, to confirm the system says so rather than improvising. The same clarity that makes a document easy to retrieve internally is what makes a public page quotable by a large language model in search, and the applied version inside a business is AI chatbot work.

Do and do not

Do

  • Keep the source documents accurate and current
  • Show which source each answer came from
  • Test with questions your documents cannot answer

Do not

  • Assume retrieval removes the risk of invention
  • Feed it a knowledge base you have not cleaned
  • Hide the sources from the person reading

Questions people ask about this

Does RAG stop an AI from making things up?

It reduces the problem substantially but does not remove it. Giving the model real passages to summarise means it has something to be right about, yet it can still misread a document, blend two sources, or answer a question the material never covered. Visible citations matter for exactly that reason: they let a person check.

Do I need RAG for a chatbot on my website?

If the assistant is meant to answer questions about your own services, prices, policies or products, then yes in some form, because a general model does not know those things. What matters more than the technique is the quality of the documents you point it at. Clean, current, unambiguous material is most of the work.

How does RAG relate to AI search visibility?

AI search works the same way: the engine retrieves passages and then writes an answer from them. So the things that make a document retrievable inside a company — a clear, self-contained statement on one topic, unambiguous wording, no contradictions elsewhere — are the same things that make a public page likely to be quoted and credited.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.