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:
Data pipeline: Transforming unstructured documents, such as collections of PDFs, into a format suitable for retrieval using the RAG application’s data pipeline.
Retrieval, Augmentation, and Generation (RAG chain): A series (or chain) of steps is called to:
Understand the user’s question
Retrieve the supporting data
Call an LLM to generate a response based on the user’s question and supporting data
Evaluation: Assessing the RAG application to determine its quality/cost/latency to ensure it meets your business requirements.
Governance & LLMOps: Tracking and managing the lifecycle of each component, including data lineage and governance (access controls).