Ragas is a Python library for scoring LLM apps with objective metrics, generating test data, and integrating with common LLM frameworks and observability tools.
Overview
Ragas targets teams that need repeatable evaluation of large language model applications instead of ad hoc manual review. It supplies metrics for measuring answer quality, supports experiment workflows over labeled or synthetic datasets, and helps compare runs after application changes.
Core capabilities include LLM-based and traditional scoring metrics, automatic test set generation when production-aligned data is missing, and hooks to LangChain, LlamaIndex, LangGraph, Haystack, and observability platforms such as LangSmith and Arize Phoenix. Quickstart templates and a CLI-style quickstart command help bootstrap evaluation projects for retrieval setups and related patterns.
The documented workflow loads test cases, runs the application under test, scores outputs per metric, stores results, and re-runs after changes to see which scores moved. Website examples show faithfulness and context recall checks on support-style question answering. Optional telemetry collects anonymized usage unless disabled via environment configuration.
Ragas is distributed as a pip-installable package intended to be imported into Python evaluation scripts and notebooks. It assumes access to configured LLM providers where metrics require model judgments.
Key features
- LLM and classical evaluation metrics
- Production-aligned test generation
- Experiment and dataset utilities
- Framework integrations
- Observability tool adapters
- Quickstart project templates
- Discrete aspect critique metrics
- Opt-out usage telemetry flag
Use cases
- Scoring RAG answer quality
- Regression tests after model upgrades
- Comparing prompt or pipeline changes
- Building LLM evaluation datasets