What is retrieval-augmented generation (RAG)?

Retrieval-augmented generation, or RAG, searches a collection of material for relevant information and gives the retrieved material to an AI model as context. The model then generates an answer based on that context and the request.

On this page

What the three words mean in practice

When an employee asks about a policy, the system first retrieves likely passages from the staff handbook. It adds those passages to the question and generates a response. If citations are available, they help the employee find the exact text.

How it can still fail

The retriever can return the wrong policy or an outdated copy. The model can also misunderstand a correct passage. Check whether the cited material is the right version and whether it actually supports the answer.

A small test for a document assistant

Put two fictional policy versions in a test collection. Give them different dates and notice periods. Ask which one applies on a specific date and request both the filename and exact clause behind the answer.

What does AI RAG mean?

RAG stands for retrieval-augmented generation. In a typical AI RAG workflow, the app looks up relevant material when you ask a question and gives it to the model as context. That can make new material available without changing the model’s trained parameters. Fine-tuning changes the model through additional training. To see whether RAG helped, check whether the answer uses the right source and whether the quoted text supports its claim.

Sources