Retrieval-Augmented Generation

Retrieval-augmented generation (RAG) is a technique in generative artificial intelligence that combines the strengths of information retrieval and language generation to produce more accurate and grounded responses. In RAG, a model first retrieves relevant documents or data from an external knowledge base and then uses a language model (such as a large language model) to generate responses based on that retrieved information. This approach enhances factual accuracy, reduces hallucinations, and allows models to access up-to-date or domain-specific knowledge without retraining. RAG is widely used in applications like chatbots, question answering and enterprise search.