More Technical

What is retrieval-augmented generation?

What is it?

Retrieval-augmented generation (RAG) is a technique that combines a language model with a search or retrieval system. When you ask a question, the system first retrieves relevant documents or data, then uses the language model to generate a response based on that retrieved content.

In plain English

Instead of the AI answering purely from memory, RAG gives it a way to look things up first. It searches a collection of documents, finds the most relevant ones, and uses them as context when generating its response. This makes the answer more accurate and grounded in real information.

A real-world example

A company builds an internal AI assistant that can answer questions about their policies and procedures. When an employee asks a question, the system searches the company's document library, retrieves the relevant policy, and uses it to generate a clear, accurate answer.

Why it matters

RAG is one of the main ways organisations make AI tools more reliable and relevant for specific use cases. It reduces hallucinations and allows the AI to work with information that was not in its original training data.

What can go wrong?

RAG depends on the quality of the retrieval system and the documents it searches. If the wrong documents are retrieved, or the documents contain errors, the response will be affected. It also adds complexity to the system.

Have a go

Ask an AI tool that has web search enabled: 'What is the current UK base interest rate?' Then ask the same question to a tool without web search. Compare the responses.

RAG implementations vary significantly between products and use cases.

Progress is saved in your browser. Sign in to save it permanently.

Related terms