Inside generated answers

Retrieval and AI Systems

A generated response may interpret a request, rewrite it, search several indexes, retrieve passages, use tools, rank evidence and then generate the answer.

A practical mental model

The six-stage retrieval chain

1. Interpret

Determine the question and whether outside information is needed.

2. Expand

Create related searches or a task plan.

3. Retrieve

Return possible evidence from indexes, documents, APIs or tools.

4. Rank

Select the passages or records judged most relevant.

5. Generate

Create a response using the prompt, model knowledge and retrieved context.

6. Present

Show an answer, links, citations, actions or warnings.

RAG in context

Retrieval-Augmented Generation is one architecture

RAG combines retrieval with generation. The website owner controls the quality of public source material. The AI product owner controls how its retrieval system indexes, ranks and uses that material.

REG and RAG are different. REG is guidance for identity and retrievable information. RAG is technical architecture inside an AI application.
Publishing instruction

Make sections understandable when retrieved alone

Primary and official references

Sources used on this page