Skip to content

Latest commit

History

561 Commits

Folders and files

NameName
Last commit message
Last commit date

OpenAgent Eval — pytest-level simplicity for AI evaluation

The open-source evaluation framework for RAG systems and AI Agents.

PyPI VersionPython VersionsLicenseDownloadsCode StylePRs WelcomeGitHub StarsForksContributorsIssues

Local-first. Framework-agnostic. Developer-friendly.

Getting Started · Documentation · Contributing


Why OpenAgent Eval?

Evaluating RAG systems shouldn't require a PhD or a cloud account. OpenAgent Eval brings pytest-level simplicity to AI evaluation — run from your terminal, get actionable insights, and ship with confidence.

  • Local-first — No cloud services, dashboards, or authentication required
  • Framework-agnostic — Works with LangChain, LlamaIndex, or any custom RAG pipeline
  • 18+ metrics — Retrieval, generation, faithfulness, relevancy, performance, and cost
  • Plugin-based — Extend with custom metrics, providers, and report generators
  • Production-ready — Corpus auditing, failure diagnosis, and synthetic test data generation

Installation

pip install openagent-eval

For development:

git clone https://github.com/OpenAgentHQ/openagent-eval.git
cd openagent-eval
uv sync

Quick Start

1. Initialize Configuration

oaeval init --interactive

oaeval init --interactive wizard demo

The wizard walks you through your dataset path, LLM provider and model, retriever, metric preset, and report format, then writes a ready-to-run config.yaml.

2. Validate Configuration

oaeval validate config.yaml

3. Run Evaluation

oaeval run config.yaml

4. View Results

oaeval report latest

Contributing & Community

OpenAgent Eval is community-built and welcomes contributors of every experience level. If you've used the tool, you already know something worth sharing — a bug, a rough edge in the docs, or a metric you wish existed.

Ways to help:

  • Code — pick up a good first issue or something labeled help wanted, fix a bug, or add a metric or provider.
  • Docs — clarify a guide, fix a typo, or expand the documentation.
  • Bug reports — hit something unexpected? Open an issue with steps to reproduce.
  • Tutorials & examples — show how you use OpenAgent Eval by adding to examples/.

Getting started:

  1. Fork the repository and create a feature branch (git checkout -b feature/your-change)
  2. Make your change and add tests where it makes sense
  3. Run the checks (uv run pytest and uv run ruff check .)
  4. Open a pull request

New to the project? CONTRIBUTING.md walks through setup, the development workflow, and coding conventions in detail.

Where to connect:


Features

FeatureDescription
CLI + SDKUse via command line or import as a Python library
Beautiful ReportsTerminal, Markdown, HTML, and JSON output formats
Failure AnalysisIdentify why evaluations fail, not just that they failed
Corpus Health AuditorDetect contradictions, staleness, and duplicates before evaluation
LLM-as-Judge MetricsNLI-based scoring for faithfulness and relevancy
Component DiagnosisBlame attribution — retrieval vs generation vs chunking
Synthetic Test DataAuto-generate test cases from your knowledge base

Evaluation Metrics

Retrieval Metrics
  • Context Precision & Recall
  • Precision@K & Recall@K
  • Hit Rate
  • Mean Reciprocal Rank (MRR)
  • Normalized Discounted Cumulative Gain (NDCG)
Generation Metrics
  • Faithfulness (NLI-based)
  • Answer Relevancy (NLI-based)
  • Hallucination Detection
  • Semantic Similarity
  • Exact Match & F1 Score
  • BLEU & ROUGE
  • BERTScore
  • LLM-as-Judge (custom criteria)
Performance & Cost
  • Latency tracking (embedding, retrieval, LLM stages)
  • Token counting (prompt, completion, total)
  • Cost estimation per provider

Supported Providers

LLM Providers: OpenAI · Anthropic · Google Gemini · Groq · OpenRouter · Ollama

Retriever Providers: Chroma · Qdrant · Pinecone · Weaviate · FAISS · pgvector · Elasticsearch · BM25


CLI Reference

CommandDescription
oaeval initCreate configuration file (interactive wizard)
oaeval run <config>Run evaluation pipeline
oaeval report <id>View evaluation reports
oaeval compare <a> <b>Compare two experiments
oaeval listList previous evaluations
oaeval validate <config>Validate configuration
oaeval doctorCheck environment and dependencies
oaeval audit --corpus <path>Audit corpus health
oaeval diagnose --report <id>Diagnose failures and attribute blame
oaeval synth --corpus <path>Generate synthetic test cases

SDK Usage

fromopenagent_eval.coreimportEnginefromopenagent_eval.configimportload_configconfig=load_config("config.yaml")
engine=Engine(config)
report=awaitengine.run(dataset)
print(report.summary)

Project Structure

openagent-eval/
├── openagent_eval/
│ ├── cli/ # CLI commands (Typer)
│ ├── config/ # Configuration system (Pydantic)
│ ├── core/ # Core orchestration engine
│ ├── metrics/ # 18+ evaluation metrics
│ ├── providers/ # LLM & Retriever adapters
│ ├── corpus/ # Corpus Health Auditor
│ ├── diagnosis/ # Component Diagnosis
│ ├── synthesis/ # Synthetic Test Data
│ ├── reports/ # Report generators
│ └── plugins/ # Plugin system
├── tests/ # Test suite
├── docs/ # Documentation
└── examples/ # Tutorials and examples

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.


Built with care by the OpenAgentHQ community.

About

Local-first evaluation framework for RAG systems and AI Agents. 18+ metrics, CLI + SDK, framework-agnostic. The pytest of AI evaluation.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

16 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages