The retrieve-then-generate pipeline behind AI answers, and what it means for publishers
.webp2f3b45a6-9fc1-44a5-83e1-7d4c3dbf8478.webp)
Retrieval-augmented generation (RAG) is a technique in which an AI system first retrieves relevant documents from a search index or database and then generates an answer using those documents as context. Most AI search experiences, from chat assistants with web search to AI summaries in search results, use some form of RAG.
The term was popularised by a 2020 research paper from Facebook AI Research (now Meta AI) and university collaborators, which combined a retriever with a text generator to improve performance on knowledge-heavy tasks.
Large language models (LLMs) learn from training data up to a cutoff date. On their own they:
RAG addresses these problems by feeding the model fresh, relevant text at the moment it answers.
The system interprets the user's question and may rewrite it into one or more search queries, sometimes breaking a complex question into sub-questions.
The system searches an index using:
Documents are split into passages or "chunks". A re-ranking model scores which chunks best answer the question.
The top passages are placed into the model's prompt along with instructions, such as "answer using only the sources provided and cite them".
The LLM writes an answer grounded in the retrieved passages.
Many systems link claims back to source passages so users can verify them.
| Approach | What it changes | Best for |
|---|---|---|
| RAG | What the model reads at answer time | Fresh facts, private documents, citations |
| Fine-tuning | The model's internal weights | Style, format, specialised behaviour |
The two are often combined: fine-tuning shapes behaviour while RAG supplies facts.
Newer "agentic" systems run multiple searches, check results and refine queries, which improves reliability but increases cost and latency.
AI search systems retrieve passages, not just pages. That rewards content that is easy to extract and quote accurately.
No. It reduces them by giving the model relevant evidence, but errors can still occur if retrieval fails or the model misreads sources.
No. A search engine returns ranked links. RAG uses retrieval as one step and then generates a synthesised answer.
Citations depend on what the retriever finds and ranks as most relevant and trustworthy for the specific question, as well as each system's own policies.
Yes. Companies commonly use RAG to let staff query internal documents, manuals and knowledge bases.
RAG is the bridge between search and generative AI. For users it means more current, verifiable answers; for publishers it means clear, well-structured, trustworthy passages matter more than ever.