Skip to main content

Open-source CLI framework for evaluating RAG systems and AI Agents

Project description

OpenAgent Eval

Open-source CLI framework for evaluating RAG systems and AI Agents.

PyPI Version Python Versions License


Overview

OpenAgent Eval is a local-first, developer-friendly evaluation framework that runs entirely from the command line. It helps developers measure quality, compare experiments, detect hallucinations, and identify retrieval failures in their RAG systems.

Goal: Become the pytest of AI evaluation.


Features

  • Local-First - No cloud services, dashboards, or authentication required
  • CLI + SDK - Use via command line or import as a Python library
  • Framework Agnostic - Works with any RAG implementation (LangChain, LlamaIndex, custom)
  • Plugin-Based - Extend with custom metrics, providers, and report generators
  • Comprehensive Metrics - Retrieval, generation, performance, and cost evaluation
  • Beautiful Reports - Terminal, Markdown, HTML, and JSON output formats
  • Failure Analysis - Identify why evaluations fail, not just that they failed

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

This creates a config.yaml file with default settings.

2. Configure Your Setup

Edit config.yaml:

dataset: data/questions.json

retriever:
  provider: chroma
  settings:
    collection_name: my_docs

llm:
  provider: openai
  model: gpt-4o

metrics:
  - faithfulness
  - answer_relevancy
  - hallucination
  - latency

output: terminal
output_dir: ./reports

3. Run Evaluation

oaeval run config.yaml

4. View Results

oaeval report latest

CLI Commands

Command Description
oaeval init Create configuration file
oaeval run <config> Run evaluation pipeline
oaeval report <id> View evaluation reports
oaeval compare <a> <b> Compare two experiments
oaeval list List previous evaluations
oaeval doctor Check environment and dependencies

SDK Usage

Use OpenAgent Eval as a Python library:

from openagent_eval import Evaluator

evaluator = Evaluator(config_path="config.yaml")
result = evaluator.evaluate(dataset)

print(result.summary)

Evaluation Metrics

Retrieval

  • Context Precision
  • Context Recall
  • Precision@K
  • Recall@K
  • Hit Rate
  • Mean Reciprocal Rank (MRR)
  • Normalized Discounted Cumulative Gain (NDCG)

Generation

  • Faithfulness
  • Answer Relevancy
  • Hallucination Detection
  • Semantic Similarity
  • Exact Match
  • F1 Score
  • BLEU
  • ROUGE
  • BERTScore

Performance

  • Latency (embedding, retrieval, LLM stages)

Cost

  • Token counting (prompt, completion, total)
  • Cost estimation per provider

Supported Providers

LLM Providers

  • OpenAI
  • Anthropic
  • Google Gemini
  • Groq
  • OpenRouter
  • Ollama (local)

Retriever Providers

  • Chroma
  • Qdrant
  • Pinecone
  • Weaviate
  • FAISS
  • pgvector
  • Elasticsearch
  • BM25
  • Memory
  • HTTP

Project Structure

openagent-eval/
├── openagent_eval/          # Main package
│   ├── cli/                 # CLI commands (Typer)
│   ├── config/              # Configuration system (Pydantic)
│   ├── core/                # Core orchestration
│   ├── datasets/            # Dataset loaders
│   ├── metrics/             # Evaluation metrics
│   ├── providers/           # LLM/Retriever adapters
│   ├── reports/             # Report generators
│   ├── plugins/             # Plugin system
│   └── exceptions/          # Custom exceptions
├── tests/                   # Test suite
├── pyproject.toml           # Project configuration
└── README.md

Development

Setup

# Clone repository
git clone https://github.com/openagenthq/openagent-eval.git
cd openagent-eval

# Install dependencies
uv sync

# Run tests
uv run pytest

# Run linter
uv run ruff check .

# Format code
uv run ruff format .

Running Tests

# Run all tests
uv run pytest

# Run with coverage
uv run pytest --cov=openagent_eval

# Run specific test file
uv run pytest tests/unit/test_exceptions.py

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.


License

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


Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openagent_eval-0.1.1.tar.gz (87.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openagent_eval-0.1.1-py3-none-any.whl (151.7 kB view details)

Uploaded Python 3

File details

Details for the file openagent_eval-0.1.1.tar.gz.

File metadata

  • Download URL: openagent_eval-0.1.1.tar.gz
  • Upload date:
  • Size: 87.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openagent_eval-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6bbfdca8a781752520dfbc308327adac9df8648f73ea1d39f8eb80d7b30e52e4
MD5 5ca7358ca9ae105af150d91f0a09bd3e
BLAKE2b-256 63abc5cff3fb5d6bee3c9e6185585894d5b82ec3f9cc959ec3f2fbe72d920391

See more details on using hashes here.

Provenance

The following attestation bundles were made for openagent_eval-0.1.1.tar.gz:

Publisher: release.yml on OpenAgentHQ/openagent-eval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openagent_eval-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: openagent_eval-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 151.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openagent_eval-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 146d750d964490c740176b437c22225ce0da2c700c0a6dad49957f5ae4b329c9
MD5 5a12322123e8aa045229fadd473623b1
BLAKE2b-256 f5ecac68242557dfa552325f7b996eb68990167de4ca999875e6af62994f10a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openagent_eval-0.1.1-py3-none-any.whl:

Publisher: release.yml on OpenAgentHQ/openagent-eval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page