AI

Retrieval-Augmented Generation (RAG)

Retrieval-augmented generation (RAG) is a technique that enriches a language model with externally retrieved knowledge at answer time, instead of relying solely on the parametric knowledge stored inside the model. A user query is first used to retrieve relevant passages from an external knowledge source — such as a vector database of embeddings; those passages are then placed, together with the question, into the model's context window, from which it composes its answer.

RAG was introduced in 2020 by Lewis et al., who combined a pretrained seq2seq model (parametric memory) with a dense vector index over Wikipedia (non-parametric memory). The approach reduces hallucination, yields more current and verifiable answers, and lets the underlying knowledge be updated without retraining the model. Today RAG is a standard building block for enterprise chatbots, knowledge assistants and search, because it grounds answers in traceable sources.

All glossary terms