FAQ resource for What is retrieval-augmented generation (RAG)?.
Answer
Retrieval-augmented generation is a technique that supplements a language model with relevant documents fetched at query time, rather than relying only on knowledge baked into the model's weights. A retriever searches a knowledge source (often a vector database) for passages related to the user's question, and those passages are inserted into the prompt as context. RAG reduces hallucination, lets models answer about private or recent data, and avoids retraining when the underlying information changes.