Definition
Retrieval-Augmented Generation (RAG) combines information retrieval with language generation.
A typical RAG workflow looks like this:
- A user submits a query.
- The system identifies relevant information.
- Relevant documents or passages are retrieved.
- The retrieved context is added to the model’s input.
- The LLM generates a response using the additional context.
For example, a company could retrieve relevant information from its policies, terms and conditions, product documentation, internal knowledge base, or customer-support content.
The goal is to provide the language model with useful, domain-specific context at the time of the request.
Why It Matters
RAG helps you design applications that use company-specific information — without retraining the underlying model every time that information changes.