Definition

Retrieval-Augmented Generation (RAG) combines information retrieval with language generation.

A typical RAG workflow looks like this:

  1. A user submits a query.
  2. The system identifies relevant information.
  3. Relevant documents or passages are retrieved.
  4. The retrieved context is added to the model’s input.
  5. 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.