Skip to content

Definition

Retrieval-Augmented Generation: a technique that combines document retrieval with text generation.

RAG lets an LLM answer with external information without retraining. Flow: (1) convert documents to embeddings, (2) retrieve the most relevant fragments for a query, (3) pass fragments to the model as context, (4) generate the answer. It's the basis of assistants with proprietary knowledge.