This folder contains Jupyter notebooks for evaluating RAG (Retrieval-Augmented Generation) systems using the Ragas framework.
Ragas is a framework for evaluating RAG systems using LLM-based metrics. These notebooks demonstrate how to use Ragas to evaluate the quality of question-answer pairs.
Basic evaluation notebook with a simple example:
- Single question-answer pair evaluation
- Demonstrates the core Ragas workflow
- Shows how to set up data and run metrics
Interactive evaluation notebook:
- Input widgets for question and response
- Real-time evaluation
- User-friendly interface for testing custom Q&A pairs
Batch evaluation with multiple examples:
- Pre-defined Q&A pairs with varying quality
- Demonstrates how different response qualities score
- Shows metrics for good, incomplete, and incorrect responses
The notebooks evaluate using these Ragas metrics:
- Faithfulness: Measures if the answer is faithful to the provided context
- Context Precision: Measures if the retrieved context is relevant to the question
- Context Recall: Measures if all relevant context was retrieved
- Answer Relevancy: Measures if the answer is relevant to the question
- 1.000: Perfect score (answer is completely faithful/relevant)
- 0.500-0.999: Good to very good quality
- 0.000-0.499: Poor quality (unfaithful, irrelevant, or incorrect)