Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks

AuthorsPatrick Lewis, Ethan Perez, Aleksandra Piktus et al.

arXiv 20202020

TL;DR

RAG combines a DPR retriever with a BART generator to marginalize over retrieved Wikipedia passages and reach 44.5 EM on Natural Questions, beating DPR by 3.0 points.

SharePost on XLinkedIn

Read our summary here, or open the publisher PDF on the next tab.

THE PROBLEM

Parametric LMs struggle on knowledge intensive tasks and lag behind task specific architectures

Large pre trained language models store factual knowledge in parameters but still have limited ability to access and precisely manipulate knowledge, especially on knowledge intensive tasks.

On open domain QA benchmarks like Natural Questions and TriviaQA, purely parametric seq2seq systems trail specialized retrieve and extract architectures, leading to lower accuracy and no provenance or easy knowledge updates.

HOW IT WORKS

Retrieval Augmented Generation with latent document marginalization

RAG combines a Retriever pη(z|x) based on DPR, a Generator pθ(yi|x,z,y1:i−1) using BART, and two formulations RAG-Sequence and RAG-Token that treat retrieved documents as latent variables.

You can think of RAG like a CPU using fast parametric memory as registers and an external non parametric memory index as disk, fetching relevant Wikipedia chunks on demand instead of memorizing everything.

By marginalizing over top K retrieved passages per sequence or per token, RAG accesses more evidence than a fixed context window and generates answers even when no single passage contains the exact span.

DIAGRAM

Token level retrieval and generation flow in RAG Token

This diagram shows how RAG Token retrieves top K passages once and marginalizes over them at each decoding step to compute token probabilities.

DIAGRAM

Evaluation pipeline across open domain QA and generation tasks

This diagram shows how RAG is evaluated on Natural Questions, TriviaQA, WebQuestions, CuratedTrec, MS MARCO, Jeopardy question generation, and FEVER.

PROCESS

How RAG Handles a Knowledge Intensive NLP Task

  1. 01

    Retriever DPR

    RAG uses the Retriever pη(z|x) based on DPR to encode the query with BERTq and retrieve top K Wikipedia passages via Maximum Inner Product Search.

  2. 02

    Generator BART

    RAG feeds the input x concatenated with each retrieved passage z into the Generator pθ(yi|x,z,y1:i−1) implemented with BART large to compute token probabilities.

  3. 03

    RAG Sequence Model

    RAG Sequence treats a single retrieved document as a latent variable for the whole sequence and marginalizes pη(z|x)pθ(y|x,z) over the top K passages.

  4. 04

    RAG Token Model

    RAG Token allows a different latent document per token, marginalizing over pη(z|x)pθ(yi|x,z,y1:i−1) at each step and decoding with a standard beam search.

KEY CONTRIBUTIONS

Key Contributions

  • 01

    Retrieval Augmented Generation models

    RAG introduces RAG Sequence and RAG Token, combining a DPR based Retriever pη(z|x) with a BART Generator pθ(yi|x,z,y1:i−1) and training them end to end over latent documents.

  • 02

    State of the art open domain QA

    RAG achieves 44.5 EM on Natural Questions and 68.0 EM on TriviaQA Wiki, surpassing DPR and T5 11B plus SSM without specialized salient span masking pre training.

  • 03

    Knowledge intensive generation improvements

    RAG improves MS MARCO Bleu 1 by 2.6 points over BART and yields more factual and specific Jeopardy questions, with human evaluators preferring RAG in 42.7 percent of factuality comparisons.

RESULTS

By the Numbers

Natural Questions EM

44.5

+3.0 over DPR

TriviaQA Wiki EM

68.0

+10.1 over DPR

WebQuestions EM

45.2

+4.1 over DPR

MS MARCO Bleu 1

44.2

+2.6 over BART

These metrics come from open domain Natural Questions, TriviaQA Wiki, WebQuestions, and open MS MARCO NLG, showing that RAG consistently improves Exact Match and Bleu over DPR and BART on knowledge intensive QA and generation.

BENCHMARK

By the Numbers

These metrics come from open domain Natural Questions, TriviaQA Wiki, WebQuestions, and open MS MARCO NLG, showing that RAG consistently improves Exact Match and Bleu over DPR and BART on knowledge intensive QA and generation.

BENCHMARK

Open Domain QA Test Scores on Natural Questions

Exact Match on Natural Questions open domain QA comparing RAG to T5 and DPR.

KEY INSIGHT

The Counterintuitive Finding

RAG achieves 11.8 percent accuracy on Natural Questions even when the correct answer is not present in any retrieved document, where extractive systems score zero.

This is surprising because retrieval augmented systems are usually assumed to rely entirely on retrieved spans, but RAG shows parametric memory can still generate correct answers without explicit textual support.

WHY IT MATTERS

What this unlocks for the field

RAG enables a single architecture to handle open domain QA, abstractive QA, Jeopardy question generation, and FEVER fact verification using the same retriever and generator.

Builders can now plug different document indices into RAG to update world knowledge without retraining, and jointly fine tune retrieval and generation for new knowledge intensive applications.

~14 min read← Back to papers

Related papers

RAG

A Dynamic Retrieval-Augmented Generation System with Selective Memory and Remembrance

Okan Bursa

· 2026

Adaptive RAG Memory (ARM) augments a standard retriever–generator stack with a Dynamic Embedding Layer and Remembrance Engine that track usage statistics and apply selective remembrance and decay to embeddings. On a lightweight retrieval benchmark, ARM achieves NDCG@5 ≈ 0.9401 and Recall@5 = 1.000 with 22M parameters, matching larger baselines like gte-small while providing the best efficiency among ultra-efficient models.

RAGLong-Term Memory

HingeMem: Boundary Guided Long-Term Memory with Query Adaptive Retrieval for Scalable Dialogues

Yijie Zhong, Yunfan Gao, Haofen Wang

· 2026

HingeMem combines Boundary Guided Long-Term Memory, Dialogue Boundary Extraction, Memory Construction, Query Adaptive Retrieval, Hyperedge Rerank, and Adaptive Stop to segment dialogues into element-indexed hyperedges and plan query-specific retrieval. On LOCOMO, HingeMem achieves 63.9 overall F1 and 75.1 LLM-as-a-Judge score, surpassing the best baseline Zep (56.9 F1) by 7.0 F1 without using category-specific QA formats.

Questions about this paper?

Paper: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks

Answers use this explainer on Memory Papers.

Checking…