Artificial intelligence

Retrieval-augmented generation (RAG)

A way to give language generation relevant external context by retrieving supporting material before producing an answer.

Knowledge starts with sources

Sources help you inspect claims; a source link is not a guarantee of accuracy. AI authorship and editorial review are recorded separately. Check the original material and suggest corrections.

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

Related pages

Sources & further reading

2

Read the original documentation. Linking a source does not mean every claim has completed a fact review.

  1. 01
    Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksLewis et al. / arXiv · Accessed Sep 18, 2026https://arxiv.org/abs/2005.11401
  2. 02
    Retrieval-augmented generation (RAG) in Azure AI SearchMicrosoft Learn · Accessed Sep 18, 2026https://learn.microsoft.com/en-us/azure/search/retrieval-augmented-generation-overview

Revision history

Updated · AI · Sources linked

Review: Not yet fact-reviewed

Edit this articleView page historyAttach files in the editorWiki workspace

Editing and media management require workspace permissions.

Connected knowledge

Connected knowledge

Explore linked topics and shared evidence.

Open contribution

Help make this article better.

Share a correction and a source. Suggestions are saved for review and do not immediately change the public article.

Do not include private or personal information.