Retrieval-augmented generation

RAG enhances large language models by retrieving relevant information from external knowledge bases before generating a response, improving accuracy and reducing hallucinations.

Also: RAG

What it is

Retrieval-augmented generation, or RAG, is a technique used to improve the output of large language models (LLMs) by giving them access to external, up-to-date, and domain-specific information. Instead of relying solely on their pre-trained knowledge, RAG systems first retrieve pertinent data from a separate knowledge base, such as a database or document collection, and then use this retrieved information to inform the LLM's response generation. This process helps ground the model's answers in factual data, making them more accurate and relevant.

RAG is increasingly adopted by companies to build more reliable AI applications, especially in areas requiring precise, factual, or real-time information, like customer service chatbots or enterprise search. It addresses the limitation of LLMs' static training data by allowing them to access proprietary or current data, which is crucial for business use cases. Developers integrate RAG to ensure AI systems provide verifiable answers, often citing sources, which boosts user trust and practical utility.

Why it matters

RAG helps ensure AI tools provide accurate, up-to-date information, reducing errors and making AI more reliable for research or decision-making.

Reviewed under editorial standardsUpdated September 26, 2026Not investment advice