Overview

RAG addresses the limitations of LLMs, such as outdated information (knowledge cutoffs) and the tendency to invent facts (hallucinations), by providing the model with access to up-to-date or domain-specific data.

How it Works

  1. Retrieval: The system searches external sources (like documents or databases) for information relevant to the user's query.
  2. Augmentation: The retrieved context is added to the original prompt.
  3. Generation: The LLM generates a response based on both its training and the provided context.

Benefits

  • Reduces factual errors.
  • Allows for source attribution.
  • Enables real-time knowledge updates without retraining.

Related Terms