
What is
RAG?
Retrieval-Augmented Generation: how AI search retrieves information from the web, and why your content determines whether you get cited.
RAG stands for Retrieval-Augmented Generation. It is a method where a language model first retrieves relevant information from a source, for example a web search or a document collection, and then uses this information when it writes the answer. That makes the answers more up to date and precise.
Without RAG, an LLM has to answer based only on what it learned during training. With RAG, it can look things up before it answers, much like an adviser who checks the facts before a meeting.
The process happens in a fraction of a second, but consists of three steps:
Fetching: The system searches for text that is relevant to the question. Often several sub-searches are made, see query fan-out.
Selection: The most relevant pieces of text are selected and attached to the question.
Generation: The language model writes the answer based on the question and the retrieved material, often with source references.
That is why ChatGPT with search, Perplexity and Google's AI features can show links to their sources.
When AI search uses RAG, it is the content retrieved that determines what the answer says. If your website is among the sources, you can be cited and linked. If it is not, you are rarely mentioned, no matter how good you are. This is the foundation of GEO.
To be retrieved, content should:
Be accessible to crawlers and indexed in search engines.
Answer concrete questions precisely, ideally in short, self-contained paragraphs.
Contain clear facts, figures and definitions that are easy to extract.
Have a clear sender and be up to date.
Many companies also use RAG internally, for example in a chatbot that answers based on their own product sheets, agreements or customer service documents. The advantage is that the answers are based on your own, controlled sources. That reduces the risk of AI hallucination, but does not remove it entirely. The quality of the documents is crucial. Read more about AI visibility.
If the documents are outdated, contradictory or poorly structured, the answers will be too. A RAG project therefore often starts with tidying up the sources, removing old versions and writing clear texts that answer the most common questions.
LLM: the language model that writes the answer in a RAG solution.
GEO: the work of being chosen as a source when AI search retrieves information.
AI hallucination: errors that RAG can help reduce.
Query fan-out: the technique that creates many sub-searches in the retrieval step.
See all the terms in the glossary.