RAG fundamentals

2. RAG fundamentals#

In section 1 of this guide, we introduced RAG, explained its functionality at a high level, and highlighted its advantages over standalone LLMs.

This section will introduce the key components and principles behind developing RAG applications over unstructured data. In particular, we will discuss:

  1. Data pipeline: Transforming unstructured documents, such as collections of PDFs, into a format suitable for retrieval using the RAG application’s data pipeline.

  2. Retrieval, Augmentation, and Generation (RAG chain): A series (or chain) of steps is called to:

    1. Understand the user’s question

    2. Retrieve the supporting data

    3. Call an LLM to generate a response based on the user’s question and supporting data

  3. Evaluation: Assessing the RAG application to determine its quality/cost/latency to ensure it meets your business requirements.

  4. Governance & LLMOps: Tracking and managing the lifecycle of each component, including data lineage and governance (access controls).

Major components of RAG over unstructured data