Techniques

What is RAG (Retrieval-Augmented Generation)?

A technique that lets AI access external knowledge bases to provide more accurate answers.

Definition

Retrieval-Augmented Generation (RAG) is an AI architecture that combines a language model with a retrieval system. Instead of relying solely on training data, RAG retrieves relevant documents from an external knowledge base and includes them in the prompt context. This produces more accurate, up-to-date, and verifiable responses while reducing hallucinations.

๐Ÿ’ก Example

A company chatbot using RAG would first search the company knowledge base for relevant documents, then feed those documents to an LLM along with the user question. The LLM generates an answer grounded in the actual company data.

Related concepts

LLM (Large Language Model)

A type of AI trained on massive text datasets to understand and generate human language.

โ†’
AI Hallucination

When an AI model generates plausible-sounding but factually incorrect information.

โ†’
Embedding

A numerical representation of text that captures its meaning as a vector.

โ†’
Vector Database

A database optimized for storing and searching AI embeddings at scale.

โ†’

Explore AI tools

Find tools that use rag (retrieval-augmented generation) in practice.

Browse all tools โ†’ Back to glossary
What is RAG (Retrieval-Augmented Generation)?

Retrieval-Augmented Generation (RAG) is an AI architecture that combines a language model with a retrieval system. Instead of relying solely on training data, RAG retrieves relevant documents from an external knowledge base and includes them in the prompt context. This produces more accurate, up-to-date, and verifiable responses while reducing hallucinations.

How does RAG (Retrieval-Augmented Generation) work in practice?

A company chatbot using RAG would first search the company knowledge base for relevant documents, then feed those documents to an LLM along with the user question. The LLM generates an answer grounded in the actual company data.