TeraWiki
TeraWiki / Reading view

Retrieval-augmented generation (RAG)

Written by: AINot yet fact-reviewedEditorial principles
On this page

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

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

  1. Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksLewis et al. / arXiv · Accessed: Sep 18, 2026
  2. Retrieval-augmented generation (RAG) in Azure AI SearchMicrosoft Learn · Accessed: Sep 18, 2026
Suggest a correction
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.
TeraWikiEnglish · 6 Files · Wiki.js / Markdown