Instructions & context

Retrieval-augmented generation

Also called RAG, retrieval augmented generation.

Retrieval-augmented generation, or RAG, finds relevant source material and gives it to an AI model before the model writes its answer.

Example

A volunteer asks how to cancel a booking. The system retrieves the current cancellation section, then drafts an answer with a link to that section.

  1. A question“How do I cancel a booking?”
  2. Search the sourcesHandbook, files, earlier chats.
  3. Relevant passagesThe cancellation section, not the whole handbook.
  4. Write the answerThe model uses those passages and links to them.
Find first, then write. The answer is only as good as the passages found. Wrong, stale, or missed sources still lead to a bad answer.

Why it matters

RAG lets answers use information beyond the model's training, such as your own documents, while the source stays separate from the model. The name comes from a 2020 research paper that paired a retriever with a text generator.

The answer is only as good as what was found. Wrong, stale, or missed material can still produce a bad answer.

Common confusion

RAG does not retrain the model and does not guarantee the answer is true. A citation is only useful if it actually supports the sentence beside it.

Sources

Updated October 1, 2026.

Cookie preferences