Retrieval-Augmented Generation (RAG)
Also known as: RAG
Category: Generative AI / LLM
A technique that enhances language model outputs by retrieving relevant external documents and including them as context before generating a response.
Full Explanation
Retrieval-augmented generation (RAG) combines information retrieval with text generation to ground language model outputs in external knowledge. When a query is received, relevant documents are retrieved from a knowledge base, vector database, or search engine, then included in the model context along with the query. This enables the model to reference up-to-date, domain-specific, or proprietary information that was not in its training data. RAG addresses key LLM limitations including hallucination, knowledge cutoffs, and lack of source attribution. The RAG pipeline typically involves chunking documents, creating embeddings, indexing in a vector database, retrieving relevant chunks at query time, and generating a response grounded in the retrieved context. RAG has become the dominant architecture for building knowledge-intensive LLM applications and has spawned numerous variants including naive RAG, advanced RAG, modular RAG, graph RAG, and agentic RAG.
Related Terms
More in Generative AI / LLM
Explore More
- AI Tools Library — Discover AI tools related to Retrieval-Augmented Generation (RAG)
- AI Education — Courses to learn about Generative AI / LLM
- AI News — Latest news and updates