SuperAPIAI Directory

open-rag-eval

github.com · AI developer platforms

open-rag-eval is an open-source Python evaluation toolkit from Vectara for evaluating and improving retrieval-augmented generation (RAG) pipelines. Its core metrics, UMBRELA and AutoNuggetizer, can run without "golden answers" or golden chunks, making RAG evaluation more scalable. The toolkit includes built-in TREC-RAG benchmark evaluation metrics, a Vectara platform connector, and LlamaIndex and LangChain connectors. It supports modular custom metrics, per-query scoring and intermediate outputs, visual comparison of results, and optional support for golden answer evaluation.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

open-rag-eval is an open-source Python evaluation toolkit for evaluating and improving retrieval-augmented generation (RAG) pipelines. It provides a flexible and extensible framework for measuring RAG system performance and helping identify areas for improvement. Its modular design allows easy integration of custom metrics and connectors.

Purpose: To evaluate the quality of RAG pipelines without relying on "golden answers" or golden chunks, making evaluation simpler and more scalable. The core metrics UMBRELA and AutoNuggetizer originate from research in Jimmy Lin's lab at the University of Waterloo.

Key capabilities:

  • Built-in TREC-RAG benchmark evaluation metrics (see METRICS.md for details).
  • Provides a Vectara RAG platform connector, as well as LlamaIndex and LangChain connectors (more coming soon).
  • Modular architecture that allows adding custom evaluation metrics or integrating any RAG pipeline.
  • Generates per-query scores and intermediate outputs for easier debugging and analysis.
  • Provides plotting tools to compare results across different configurations or runs.
  • Supports optional golden answer evaluation (when reference answers are available).
  • Supports automatically generating synthetic queries from a corpus, and can also generate expected answers at the same time.
  • Supports comparing multiple chunking strategies.

Usage:

  • Environment requirements: Python 3.9 or later; OpenAI API Key (for the default LLM judge model); for factual consistency evaluation, optionally an open-source HHEM model (requires a Hugging Face token and requesting access to vectara/hallucination_evaluation_model) or the Vectara commercial API (requires a Vectara API key).
  • Installation: pip installation (installs the open-rag-eval command-line tool), or building from source.
  • Using the Vectara connector: create a CSV query file containing a query column; edit eval_config_vectara.yaml to configure the connector, evaluators, and metrics; set environment variables or a .env file; run the evaluation command.
  • Using your own RAG output: format the output into the toolkit-readable format (refer to data/test_csv_connector.csv), copy the configuration and comment out the connector section, ensure the input query, results folder, generated answers, and evaluation results files are configured correctly, then run the evaluation.
  • Visualization: the Open Evaluation Web Viewer is recommended (visit https://openevaluation.ai to upload results.json); or use the CLI plotting tool (requires specifying the --evaluator parameter); or use the built-in Streamlit local viewer.
  • Generating synthetic queries: documents can be loaded from a Vectara corpus, local files, or CSV, configure query generation parameters, and optionally customize question type weights (directly answerable, requires reasoning, unanswerable, partially answerable).
  • Golden answer evaluation: add an expected_answer column to the query CSV, configure GoldenAnswerEvaluator, and run the evaluation.
  • Combining multiple evaluators: list multiple evaluators in the configuration; each runs independently and outputs CSV, merged by query_id; ConsistencyEvaluator must be listed last.

Applicable scenarios: RAG system developers and researchers who need to evaluate retrieval and generation quality, compare different configurations or chunking strategies, generate test queries, perform hallucination detection, etc.

Limitations: Some features depend on external services (OpenAI API, Vectara API, Hugging Face model access); specific details such as charges, pricing, and platform support are not yet provided.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools