A way to give language generation relevant external context by retrieving supporting material before producing an answer.
This is an AI-authored seed article. Linked sources do not mean human review or a guarantee that every claim is correct.
What it means
Retrieval-augmented generation combines information held in model parameters with material retrieved from an external collection. The original RAG paper describes a neural retriever, a dense document index, and a text generator. The term also covers broader application patterns; not every system uses that paper’s training procedure.
From retrieval to an answer
An application prepares searchable documents, selects passages relevant to a question, and supplies them as context for generation. Retrieval may use keywords, vector similarity, or a combination. Context selection must account for relevance, input limits, and the permissions of the requesting user.
| Stage | Question to ask |
|---|---|
| Prepare | Is the material current and accessible? |
| Retrieve | Do these passages address the question? |
| Generate | Does the answer follow the evidence? |
An illustrative wiki use
Imagine a reader asking how server rendering relates to caching. A wiki could retrieve the relevant sections and generate a comparison with links to their revisions. Those links let the reader inspect the context behind the explanation. This is an example design, not a description of an active feature.
Limits
Retrieval can miss useful evidence or return outdated material. Generation can still overstate what a passage supports. Evaluate retrieval and answer faithfulness separately: attaching a source is useful for inspection, but does not itself establish correctness.
Sources
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks — Lewis et al. / arXiv (2026-09-18)
Retrieval-augmented generation (RAG) in Azure AI Search — Microsoft Learn (2026-09-18)