Retrieval-augmented generation AI
Retrieval-augmented generation, usually shortened to RAG, connects information retrieval with language generation. A system retrieves relevant material from an external collection and makes it available to a model producing a response.
For example, a question about a research project might retrieve passages from its reports before an answer is composed. This lets the response draw on selected documents rather than relying only on information encoded during model training. The retrieved collection can also be updated separately from the model.
Patrick Lewis and colleagues’ 2020 paper introduced a specific architecture combining a neural retriever, an indexed collection of Wikipedia passages, and a text-generation model. The term now also describes a broader family of retrieval-and-generation arrangements; a particular application need not reproduce that original architecture.
In the essay, RAG is one way to connect a fluid conversational interface with persistent material. Retrieval does not make that material true or guarantee a faithful answer. Missing passages, poor matches, and unsupported interpretations remain possible. It also differs from reinforcement learning: supplying documents during generation is not itself training the model through rewards.
Further reading
- Patrick Lewis and colleagues, Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020), the original architecture and evaluation.