Glossary · AI systems

Retrieval-augmented generation (RAG)

Fetch relevant sources first, then generate an answer grounded in them.

Also called: RAG, retrieval-grounded generation

What is Retrieval-augmented generation (RAG)?

Direct answer

Fetch relevant sources first, then generate an answer grounded in them.

Retrieval-augmented generation (RAG) is the pattern behind most cited AI answers: instead of answering purely from memory, the system retrieves relevant documents at query time and conditions its answer on them. The citations you see are the retrieved passages the model actually used.

Query→Retrieve sources→Generate (grounded)→Answer + citations

For you, RAG is good news: it means fresh, well-structured, retrievable content can be cited even if it was never in the training data. Win retrieval (be reachable and parseable) and answerability (be liftable), and you can be cited today, the mechanics are covered in how AI decides what to cite.

Why — and when — does it matter?

RAG creates an opportunity for current, external content to influence an answer without being part of model training. The page must first be retrievable, then useful as evidence.

How it works

1

Convert the question into a retrieval query or embedding.

2

Search an index, web source or knowledge base.

3

Select and rerank relevant passages.

4

Place those passages in the model context.

5

Generate an answer and attach source references.

Worked example

Situation → interpretation → action

A support assistant retrieves the current refund policy before answering, preventing an outdated policy stored in model memory from controlling the response.

How to track and report it

PrimaryRetrieval recall and grounded-answer accuracy
SecondaryCitation coverage and unsupported-claim rate
FormulaRetrieval recall = relevant items retrieved ÷ relevant items available

Reporting rule: State the engine, prompt set, market, time window and denominator. A number without scope cannot be reproduced or compared.

Practical playbook

  1. Convert the question into a retrieval query or embedding.
  2. Search an index, web source or knowledge base.
  3. Select and rerank relevant passages.
  4. Place those passages in the model context.
  5. Generate an answer and attach source references.

Common mistakes

  • Assuming retrieved means cited
  • Supplying stale documents
  • Ignoring chunk boundaries and lost context

Questions people ask

What is Retrieval-augmented generation (RAG)?

Fetch relevant sources first, then generate an answer grounded in them. RAG creates an opportunity for current, external content to influence an answer without being part of model training. The page must first be retrievable, then useful as evidence.

How does Retrieval-augmented generation (RAG) work?

Convert the question into a retrieval query or embedding. Search an index, web source or knowledge base. Select and rerank relevant passages. Place those passages in the model context. Generate an answer and attach source references.

How do you measure Retrieval-augmented generation (RAG)?

Retrieval recall and grounded-answer accuracy. Citation coverage and unsupported-claim rate. Retrieval recall = relevant items retrieved ÷ relevant items available

What is a common mistake with Retrieval-augmented generation (RAG)?

Assuming retrieved means cited. The scope and methodology should be stated before interpreting the result.

← All terms