mimirwiki.com/wiki/retrieval-augmented-generation
rev 2fbd34f9Updated 2026-12-04EN · KO · JA · ZH · ES · DE · FR · PT · RU · IT · HI · AR
Concept/Technology and AI

Retrieval-Augmented Generation (RAG)

AI architecture that retrieves external documents to ground language model responses

Expert review pending
Written automatically from public sources8 sources
View the page in the format AI receives
Summary

Retrieval-Augmented Generation (RAG) combines an external information retrieval step with a generative language model so responses are grounded in up-to-date or domain-specific sources. Introduced in a May 2020 paper by Lewis et al. pairing dense vector retrieval (DPR) with a pretrained sequence-to-sequence model, RAG evolved to include training-free in-context prompting, Self-RAG self-critique, and GraphRAG. Production platforms such as Azure AI Search and AWS Bedrock evaluate retrieval relevance and generation faithfulness separately.

Foundational Paper
Lewis et al., arXiv:2005.11401 (May 22, 2020)1
Retriever Basis
Dense Passage Retrieval (DPR, April 2020)2
Core Mechanism
Retrieve relevant chunks -> supply to generator1
Key Variants
In-Context RAG, Self-RAG, GraphRAG4
Cloud Platforms
Azure AI Search, Amazon Bedrock Knowledge Bases7
Evaluation Principle
Measure retrieval quality & faithfulness separately5

Retrieval-Augmented Generation (RAG) is a technique that retrieves relevant external documents or passages for a query and supplies them as context to a language model during text generation.

Also known as RAG, Retrieval Augmented Generation

01

Origins and Core Mechanism

Government and public records Academic and news Official sites

Retrieval-Augmented Generation (RAG) was formalized by Lewis et al. (May 22, 2020) to address limitations of purely parametric language models, whose factual knowledge is frozen at training time and difficult to inspect or update.1 Their formulation coupled a pretrained generative model with a non-parametric dense vector index built using Dense Passage Retrieval (DPR), comparing sequence-level conditioning (RAG-Sequence) and token-level conditioning (RAG-Token).12

02

Evolution: In-Context RAG, Self-RAG, and GraphRAG

Subsequent research expanded RAG far beyond joint fine-tuning. In-Context Retrieval-Augmented Language Models (Ram et al., January 2023) showed that prepending retrieved passages directly to a frozen language model's prompt improves performance without retraining the generator.3

More advanced architectures added adaptive control and structured corpora: Self-RAG (Asai et al., October 2023) trains models to decide dynamically when to retrieve and to critique their own outputs using reflection tokens,4 while GraphRAG (Edge et al., April 2024) extracts entity graphs and community summaries to answer global, corpus-wide queries.6 Survey work (Gao et al., December 2023) categorizes these stages into Naive, Advanced, and Modular RAG.5

03

Production Search Indexes and Knowledge Bases

In enterprise deployments documented by Microsoft Learn (Azure AI Search) and Amazon Web Services (Amazon Bedrock Knowledge Bases), RAG pipelines ingest documents into a searchable index or knowledge base, retrieve top-ranked evidence passages for each user query, and pass those excerpts into the language model prompt to synthesize a grounded response with citations.78

04

Why Retrieval and Generation Are Evaluated Separately

A RAG system can fail at two distinct stages: the retriever may miss relevant or current documents, or the generator may ignore or distort the retrieved evidence (hallucination).57 Consequently, evaluation frameworks separate retrieval metrics (relevance, recall, freshness) from generation metrics (faithfulness to retrieved context and answer correctness).5

Accuracy numbers reported across different research papers cannot be directly compared without matching datasets and evaluation setups, and production deployments must independently verify document access-control enforcement and index update latency.578

05

Frequently asked questions

What does RAG retrieve and how does it shape the model's answer?
A retriever searches an external index or knowledge base for passages relevant to the user's query and passes them into the language model's context so the model generates a response grounded in those sources.178
Why are retrieval quality and answer accuracy evaluated separately in RAG?
An error can occur either because the retriever failed to fetch the right or current documents, or because the language model hallucinated despite having the right context.57
How do In-Context RAG, Self-RAG, and GraphRAG differ?
In-Context RAG inserts retrieved text directly into prompts without retraining, Self-RAG lets the model decide when to retrieve and critique its output, and GraphRAG builds entity graphs for corpus-wide synthesis.346
Can RAG benchmark scores from different papers be compared directly?
No. Accuracy figures depend on the underlying corpus, retriever, generator, and evaluation protocol, and production systems must also verify permissions and index freshness.57
06

Quotable sentences

Each sentence has a source, so you can quote it as it is.
  1. Lewis et al. (May 22, 2020) introduced RAG by combining a pretrained generative model with a dense vector index (DPR), comparing sequence-level and token-level document conditioning.12
  2. Later RAG research introduced training-free in-context prompting (2023), self-reflective retrieval/critique in Self-RAG (2023), and corpus-graph summarization in GraphRAG (2024).346
  3. Cloud platforms including Azure AI Search and Amazon Bedrock Knowledge Bases implement RAG by indexing enterprise data and injecting retrieved passages into LLM prompts.78
  4. RAG evaluation separates retrieval quality (relevance and freshness) from generation faithfulness (whether the output matches retrieved evidence).57
07

Timeline

  1. Karpukhin et al. release Dense Passage Retrieval (DPR, arXiv:2004.04906).2
  2. Lewis et al. introduce Retrieval-Augmented Generation (RAG, arXiv:2005.11401).1
  3. Ram et al. publish In-Context Retrieval-Augmented Language Models (arXiv:2302.00083).3
  4. Asai et al. introduce Self-RAG with adaptive retrieval and self-reflection (arXiv:2310.11511).4
  5. Edge et al. publish GraphRAG for query-focused summarization over document graphs (arXiv:2404.16130).6
08

Sources

8 sources

Academic and news

  1. 1
    Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al.) · arXiv · published 2020-05-22 · checked 2026-12-04https://arxiv.org/abs/2005.11401
  2. 2
    Dense Passage Retrieval for Open-Domain Question Answering (Karpukhin et al.) · arXiv · published 2020-04-10 · checked 2026-12-04https://arxiv.org/abs/2004.04906
  3. 3
    In-Context Retrieval-Augmented Language Models (Ram et al.) · arXiv · published 2023-01-31 · checked 2026-12-04https://arxiv.org/abs/2302.00083
  4. 4
    Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection (Asai et al.) · arXiv · published 2023-10-17 · checked 2026-12-04https://arxiv.org/abs/2310.11511
  5. 5
    Retrieval-Augmented Generation for Large Language Models: A Survey (Gao et al.) · arXiv · published 2023-12-18 · checked 2026-12-04https://arxiv.org/abs/2312.10997
  6. 6
    From Local to Global: A Graph RAG Approach to Query-Focused Summarization (Edge et al.) · arXiv · published 2024-04-24 · checked 2026-12-04https://arxiv.org/abs/2404.16130

Official sites

  1. 7
    Retrieval Augmented Generation (RAG) in Azure AI Search · Microsoft Learn · published 2026-11-17 · checked 2026-12-04https://learn.microsoft.com/en-us/azure/search/retrieval-augmented-generation-overview
  2. 8
    Retrieve Data and Generate AI Responses with Amazon Bedrock Knowledge Bases · Amazon Web Services (AWS) · published 2026-01-01 · checked 2026-12-04https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html
09

Review and writing

review signature

Expert review pending

When a credentialed expert reviews this page, the reviewer's name and the review date appear here. (Current version 2fbd34f9)

How this page was written

Written automatically from the public information in the sources above.

10

Version

SHA-256

2fbd34f940b14c4117b2b28e1d7cf76d7eed749a00bbca7da0f856d736e6e342

Each edit gives the page a new version number.

Cite this page

Mimirwiki. "Retrieval-Augmented Generation (RAG)." Version 2fbd34f9, 2026-12-04. https://mimirwiki.com/wiki/retrieval-augmented-generation

Formats for AI
# Markdown
curl https://mimirwiki.com/wiki/retrieval-augmented-generation.md

# JSON-LD, by content negotiation
curl -H "Accept: application/ld+json" \
  https://mimirwiki.com/wiki/retrieval-augmented-generation

Add an extension to the address to get the same content in that format.

Pages that link here