What is Retrieval-Augmented Generation (RAG)?
Retrieval-Augmented Generation (RAG) is a 2020 method from Lewis et al. that pairs a pretrained text generator with a searchable index of Wikipedia passages, so the model retrieves documents and then writes an answer conditioned on them. The arXiv record lists the paper as accepted at NeurIPS 2020; this page summarises what the paper itself reports.
Verified against the sources on 2026-11-25. Labels: Proven means the primary source we opened states it. Practice means widely used practice or secondary reporting the primary source does not confirm. Experimental means a proposal or draft.
What problem was RAG designed to solve?
- Proven The abstract says large pretrained language models store factual knowledge in their parameters but have limited ability to access and precisely manipulate it, and that providing provenance and updating their knowledge remain open problems.
- Proven The paper describes models that keep knowledge only in their weights as unable to easily expand or revise their memory, and notes they may produce hallucinations.
- Proven RAG combines a parametric memory (the generator’s weights) with a non-parametric memory (a dense vector index of Wikipedia) and fine-tunes them together.
How does a RAG model work?
- Proven The retriever is Dense Passage Retriever (DPR), a bi-encoder: one BERT-base encoder embeds documents and another embeds the query, and the top documents are found with Maximum Inner Product Search (MIPS).
- Proven The generator is BART-large, a pretrained seq2seq transformer the paper gives as roughly 400M parameters; the input and each retrieved passage are simply concatenated.
- Proven Wikipedia (December 2018 dump) was split into disjoint 100-word chunks, giving 21M documents, indexed with FAISS.
- Proven During fine-tuning the document encoder and index are kept fixed; only the query encoder and the BART generator are updated. The authors say they did not find updating the document encoder necessary for strong performance.
- Proven RAG-Sequence uses the same retrieved document for the whole output; RAG-Token can draw on a different document for each generated token.
What did the experiments show?
- Proven The paper reports new state-of-the-art results on open-domain QA for Natural Questions, WebQuestions and CuratedTrec, and strong TriviaQA results, without a re-ranker or extractive reader.
- Proven In a human evaluation of Jeopardy question generation, evaluators judged BART more factual than RAG in 7.1% of cases and RAG more factual in 42.7%.
- Proven On FEVER fact verification (3-way), RAG scored within 4.3% of state-of-the-art pipeline systems that use retrieval supervision, which RAG does not require.
- Proven Swapping a BM25 retriever in for the learned retriever gave the best FEVER result, but the learned retriever was better on all other tasks in the ablation.
Can a RAG model’s knowledge be updated without retraining?
- Proven The authors built a second index from a December 2016 Wikipedia dump and asked about 82 world leaders who changed between 2016 and 2018.
- Proven With matching index and year the model answered 70% (2016) and 68% (2018) correctly; with mismatched indices accuracy fell to 12% and 4%. The paper calls this replacing the non-parametric memory, or index hot-swapping.
- Proven The broader-impact section notes that Wikipedia, or any external knowledge source, will probably never be entirely factual and free of bias.
What this page does not cover
- How any commercial AI search or assistant product retrieves or ranks content; the paper studies research models on academic benchmarks only.
- Later RAG variants and the code port to Hugging Face Transformers the paper’s appendix mentions; we did not review them here.