Technique

RAG

Retrieval-Augmented Generation

/rag/

A technique that combines external database retrieval with language model generation to provide accurate, up-to-date answers.

In plain English
Instead of relying solely on an AI's memorized training data, RAG acts like an open-book exam. When you ask a question, the system first searches your private documents for relevant facts and hands them to the AI to write an informed answer.
Real-world example
Enterprise customer service bots querying internal company knowledge bases to resolve technical support tickets accurately.
Technical definition
Retrieval-Augmented Generation enhances LLM performance by coupling the generative network with an external retriever and vector database. When a query is posed, the retriever fetches top-k relevant document chunks based on semantic similarity. These retrieved passages are injected into the model prompt context, grounding the generation and mitigating hallucinations.