Ragas: Automated Evaluation of Retrieval Augmented Generation
Paper: https://arxiv.org/abs/2309.15217 (2023-09-26) Authors: Shahul Es, Jithin James, Luis Espinosa-Anke, Steven Schockaert
Abstract (original)
> We introduce Ragas (Retrieval Augmented Generation Assessment), a framework for reference-free evaluation of Retrieval Augmented Generation (RAG) pipelines. RAG systems are composed of a retrieval and an LLM based generation module, and provide LLMs with knowledge from a reference textual database, which enables them to act as a natural language layer between a user and textual databases, reducing the risk of hallucinations. Evaluating RAG architectures is, however, challenging because there are several dimensions to consider: the ability of the retrieval system to identify relevant and focused context passages, the ability of the LLM to exploit such passages in a faithful way, or the quality of the generation itself. With Ragas, we put forward a suite of metrics which can be used to evaluate these different dimensions *without having to rely on ground truth human annotations*. We posit that such a framework can crucially contribute to faster evaluation cycles of RAG architectures, which is especially important given the fast adoption of LLMs.
Why It Matters
RAG pipelines couple a retriever with an LLM generator, letting models act as a natural language layer over textual databases while curbing hallucinations. But evaluation is multi-dimensional: retrieval relevance, faithfulness to retrieved context, and generation quality must all be measured. Ragas provides reference-free metrics for all three, removing the need for costly ground-truth annotations and enabling rapid iteration on RAG architectures.
Key Points
- Reference-free evaluation: metrics operate without human-annotated ground truth, shortening evaluation loops.
- Multi-dimensional coverage: assesses retriever quality (relevant, focused context passages), LLM faithfulness to context, and overall generation quality.
- Practical timing: released as LLM adoption accelerates, when fast RAG evaluation cycles are critical.
- Typical RAG architecture discussed in the post: query/document encoding → retriever → reranker → generator, with learning strategies including supervised fine-tuning, contrastive learning, distillation, and RL; inference strategies include single-pass, iterative, and parallel sub-query retrieval with budget control.
- Evaluation of Retrieval-Augmented Generation: A Survey (arXiv:2405.07437)
- ARES: An Automated Evaluation Framework for RAG (arXiv:2311.09476)
- A Dataset of Information-Seeking Questions and Answers Anchored in Research Abstracts (arXiv:2105.03011)
Engineering Checklist (from the post)
| Area | Question | Recommendation | |------|----------|----------------| | Data | PII in training/index? Embedding version control? | Partitioned indexes, anonymization, rollback-capable embedding versions | | Latency | p99 budget? How many retrieval steps? | Cascading + early stopping, query caching, async reranking | | Quality | Do offline gains translate to online satisfaction? | Interleaving experiments, human audits, citation verification | | Safety | Can open retrieval inject poisoning/bias? | Source whitelisting, adversarial detection, output filtering | | Cost | Token/GPU cost per query? | Small-model routing, distillation, hybrid sparse+dense retrieval |
Related Work
Takeaways
1. Architecture: cascaded retrieve → rerank → generate remains mainstream; agentic paradigms are making retrieval strategy itself learnable. 2. Evaluation: the gap between offline metrics and online satisfaction is widening; LLM-as-judge should be cross-validated with human assessment. 3. Deployment: latency, cost, interpretability, and safety are hard constraints—optimize beyond academic benchmarks alone.