Papers › Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks

Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks

22 May 2020NeurIPS 2020 12arXiv:2005.11401archive 2025-07-28

Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, Douwe Kiela

Large pre-trained language models have been shown to store factual knowledge in their parameters, and achieve state-of-the-art results when fine-tuned on downstream NLP tasks. However, their ability to access and precisely manipulate knowledge is still limited, and hence on knowledge-intensive tasks, their performance lags behind task-specific architectures. Additionally, providing provenance for their decisions and updating their world knowledge remain open research problems. Pre-trained models with a differentiable access mechanism to explicit non-parametric memory can overcome this issue, but have so far been only investigated for extractive downstream tasks. We explore a general-purpose fine-tuning recipe for retrieval-augmented generation (RAG) -- models which combine pre-trained parametric and non-parametric memory for language generation. We introduce RAG models where the parametric memory is a pre-trained seq2seq model and the non-parametric memory is a dense vector index of Wikipedia, accessed with a pre-trained neural retriever. We compare two RAG formulations, one which conditions on the same retrieved passages across the whole generated sequence, the other can use different passages per token. We fine-tune and evaluate our models on a wide range of knowledge-intensive NLP tasks and set the state-of-the-art on three open domain QA tasks, outperforming parametric seq2seq models and task-specific retrieve-and-extract architectures. For language generation tasks, we find that RAG models generate more specific, diverse and factual language than a state-of-the-art parametric-only seq2seq baseline.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2005.11401")

Code

Syntology Ran 4 of 6 code samples harvested from 3 repositories linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 3 ran with no contract checked.

By repository: community (archive-listed): 6 samples from 3 repositories, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

18 repositories listed; official and paper-mentioned ones first.

Zefty/rag-end2end-retriever mentioned on GitHubpytorchnot reachable when probed 2026-09-17 — repositories for recent papers often appear after camera-ready report
amaiya/onprem mentioned on GitHubpytorch report
assafelovic/gpt-researcher mentioned on GitHub report
docarray/docarray mentioned on GitHubjaxApache-2.0 report
huggingface/transformers mentioned on GitHubpytorch report
thu-keg/korc mentioned on GitHubpytorchMIT report
deepset-ai/haystack pytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

6 samples harvested; 4 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
3ran
2unverified

Licence: 0 of the 6 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

RAGPipeline amaiya/onprem/onprem/pipelines/rag.py community (archive-listed) ran Apache-2.0 (permissive) · 97232ee5cefc6ca0 · report
SafeFormatter amaiya/onprem/onprem/pipelines/rag.py community (archive-listed) ran Apache-2.0 (permissive) · 0e37c1a090eb1522 · report
SearchAPIRetriever assafelovic/gpt-researcher/gpt_researcher/context/retriever.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 8ebc0b59ac8e1139 · report
format_string amaiya/onprem/onprem/pipelines/rag.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · b5b35b915ca92dc5 · report
get_paths docarray/docarray/docarray/helper.py community (archive-listed) unverified Apache-2.0 (permissive) · f54f8f538675cd65 · report
identity docarray/docarray/docarray/computation/numpy_backend.py community (archive-listed) unverified Apache-2.0 (permissive) · e855f42db656867c · report

Tasks

Fact VerificationQuestion AnsweringRAGRetrievalRetrieval-augmented GenerationText GenerationWorld Knowledge

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Fact Verification FEVER RAG Accuracy 72.5 #6 of 7 Archive leaderboard report
Question Answering Natural Questions RAG EM 44.5 #19 of 47 Archive leaderboard report
Question Answering TriviaQA RAG EM 56.1 #43 of 56 Archive leaderboard report
Question Answering WebQuestions RAG EM 45.2 #8 of 37 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: RAG

AdamAttentionAttention DropoutBARTBERTBPEDense ConnectionsDropoutLSTMLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionRAGResidual ConnectionSeq2SeqSigmoid ActivationSoftmaxTanh ActivationWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections