Papers · RAG
AI PAPER

Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks

Combined language models with an external knowledge retrieval system, allowing models to look up facts rather than memorizing everything, reducing hallucination and enabling updatable knowledge.

Authors
Patrick Lewis, Ethan Perez, Aleksandra Piktus +7
Institution
Meta AI
Published
May NaN, 2020
Citations
5,000
Category
Architecture
Impact
major
PAPER EXPLAINED

Plain-English Summary

Language models memorize knowledge during training, which creates two problems: they cannot know about events after their training cutoff, and they sometimes “hallucinate” — confidently stating things that are wrong. RAG solves both problems by giving the model a search engine. Instead of relying solely on memorized knowledge, the model retrieves relevant documents from an external database and uses them to generate its answer.

The approach works in two steps. First, a retriever finds the most relevant documents for the question. Then, the language model reads those documents and generates an answer grounded in the retrieved information. This means the model’s knowledge can be updated simply by updating the document database — no retraining needed.

Think of it as the difference between a student taking a closed-book exam (pure language model) versus an open-book exam (RAG). The open-book student can look things up, verify facts, and handle questions about topics studied only briefly.

Key Innovation

RAG combined a pre-trained retriever (Dense Passage Retrieval) with a pre-trained language model (BART) into an end-to-end system that could be fine-tuned jointly. The retriever learns to find documents most useful for the generator, and the generator learns to synthesize information from retrieved passages. This joint training produces better results than using retrieval and generation independently.

The paper proposed two variants: RAG-Sequence (retrieves documents for the entire output) and RAG-Token (retrieves different documents for different parts of the output), offering flexibility for different use cases.

Impact on the Field

RAG became arguably the most widely adopted technique in applied AI. Every major AI product now uses some form of retrieval augmentation: Bing Chat searches the web, Perplexity is built entirely around retrieval, ChatGPT can browse the internet, and enterprise AI systems ground responses in company documents. The pattern of “retrieve then generate” is the standard approach for building reliable, factual AI applications.

RAG also created an entire market for vector databases (Pinecone, Weaviate, Chroma) and embedding models that power the retrieval step. The technique transformed AI from a novelty into a practical business tool by addressing the hallucination problem.

Models That Built on This

Perplexity AI built its entire product around RAG principles. Microsoft’s Bing Chat integrates retrieval with GPT-4. ChatGPT’s browsing feature is a RAG system. Google’s Gemini uses retrieval for grounded responses. Enterprise applications universally use RAG to ground AI responses in company knowledge bases. The technique has also been extended with re-ranking, hybrid search, and agentic retrieval patterns.