talira

Objective metrics, intelligent test generation, and data-driven insights for LLM apps

open sourceApache-2.0self-hostablefree

Ragas is an Apache-2.0 Python library for evaluating LLM applications, best known for RAG: it scores retrieval with context precision and recall and answers with faithfulness and response relevancy, and it has metrics for agents' tool calls, SQL and plain text comparison (BLEU, ROUGE, exact match). Context recall comes three ways: judged by an LLM against a reference answer, by string comparison against reference contexts, or by ID (IDBasedContextRecall), which compares the IDs of retrieved and reference documents with no LLM at all. Its test set generator builds a knowledge graph from your documents and writes single-hop and multi-hop questions from it, so you can start without a hand-labelled set. Vibrant Labs maintains it (its GitHub organization was explodinggradients), and it works with LangChain and observability tools.

Problems it solves

  • measure whether my RAG retriever actually brings back the right chunks for each question
  • I have no test questions for our knowledge base and need a realistic set generated from the documents
  • compute retrieval recall from document IDs without paying an LLM to judge every result
  • check whether our chatbot's answers are grounded in the retrieved context or made up
  • compare two chunking or embedding setups on the same question set before switching
  • single-hop and multi-hop questions to stress-test a document search pipeline
  • score whether an agent called the right tools with the right arguments
  • write a custom LLM-as-judge metric that can only answer from a fixed set of values
  • evaluate generated SQL by running it and the reference query and comparing the results
  • catch a prompt or retriever change that quietly makes our RAG answers worse
  • BLEU, ROUGE, chrF and exact-match scores for generated text in Python

Features

  • RAG metrics: context precision, context recall, context entities recall, noise sensitivity, response relevancy, faithfulness
  • LLM-based, non-LLM (string comparison) and ID-based context recall and precision
  • synthetic test set generation from your documents through a knowledge graph: single-hop and multi-hop, specific and abstract queries
  • agent metrics: topic adherence, tool call accuracy, tool call F1, agent goal accuracy
  • traditional metrics: BLEU, ROUGE, chrF, exact match, string presence, semantic similarity
  • SQL metrics: execution-based comparison and query equivalence
  • custom metrics: discrete, rubric and aspect critics with any LLM
  • ragas quickstart CLI with a RAG evaluation project template
  • integrations with LangChain, LlamaIndex and observability tools

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what Ragas does.

  1. DeepEval The LLM Evaluation Framework
  2. promptfoo Test your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI
  3. Langfuse Open source AI engineering platform: AI Gateway, agent observability, evals, and prompt/skill management, built on OpenTelemetry.
  4. Arize Phoenix Tracing, evaluation and experiments for LLM applications and agents
  5. Braintrust The active observability platform for agents
  6. Opik Open-Source LLM Observability, Evaluation & AI Agent Tracing

Compare Ragas with the top 3