Skip to main contentSkip to main content
Typeai
Created2020
CreatorFacebook AI Research (Meta), University College London, New York University
Open SourceYes
ai
active
Open Source
Featured
growing

Retrieval-Augmented Generation

Retrieval-Augmented Generation (RAG) is a technique that grounds LLM responses in retrieved documents: given a query, relevant content is fetched from a knowledge base and injected into the prompt before the LLM generates its answer.

RAG addresses a core limitation of LLMs: their knowledge is frozen at training time and they can hallucinate facts they are uncertain about. By retrieving relevant documents at inference time and including them in the prompt context, RAG gives the model access to current, specific, or proprietary information.

Understand Retrieval-Augmented Generation

30-Second Explanation

RAG (Retrieval-Augmented Generation) is a technique that grounds LLM responses in retrieved documents. Given a query, relevant content is fetched from a knowledge base and injected into the prompt before generation. This gives the LLM access to current, specific, or proprietary information beyond its training data.
30 Sec explanation

How It Works

1
User Question
3
Vector Search
4
Relevant Documents
5
Prompt + Context
7
Answer

Learn First