# RAG System Guide ## What is RAG? RAG (Retrieval-Augmented Generation) combines information retrieval with text generation. It retrieves relevant documents and uses them to generate accurate answers. ## Key Components 1. Retriever: Finds relevant documents from a knowledge base 2. Generator: Creates answers based on retrieved documents 3. Knowledge Base: Collection of documents to search ## Evaluation Metrics - Context Recall: How well relevant documents are retrieved - Context Precision: How precise the retrieved documents are - Faithfulness: Whether answers are faithful to the context - Answer Relevancy: How relevant answers are to questions - Correctness: How correct answers are compared to ground truth