Retrieval-augmented generation (RAG)
Retrieval-augmented generation (RAG) is a technique where an AI system first retrieves relevant documents, such as web pages, and then uses them to write its answer.
A large language model on its own only knows what it learned in training. RAG adds a search step: the system finds fresh, relevant sources and gives them to the model as context, so the answer can be current and cite where it came from.
In more detail
AI search tools like Perplexity, ChatGPT search and Google’s AI features all use retrieval in some form. The retrieval step often looks a lot like classic search, favouring pages that are relevant, authoritative and easy to parse. Pages are usually split into chunks, so clear sections with self-contained answers are easier to retrieve and quote accurately.
Why it matters
RAG is why SEO still matters for AI visibility. If your page is not found in the retrieval step, it cannot be cited. Writing in well-labelled, answer-first sections improves the odds that the right chunk of your page is picked.
A user asks an AI tool for the current VAT rate in Ireland. The tool searches the web, retrieves the official revenue site and two accounting blogs, and writes a short answer citing them. Without retrieval, it might have repeated an outdated rate from training data.