Skip to main content

The official Python SDK for Eval Protocol (EP.) EP is an open protocol that standardizes how developers author evals for large language model (LLM) applications.

Project description

Eval Protocol (EP)

PyPI - Version Ask DeepWiki

Stop guessing which AI model to use. Build a data-driven model leaderboard.

With hundreds of models and configs, you need objective data to choose the right one for your use case. EP helps you evaluate real traces, compare models, and visualize results locally.

🚀 Features

  • Pytest authoring: @evaluation_test decorator to configure evaluations
  • Robust rollouts: Handles flaky LLM APIs and parallel execution
  • Integrations: Works with Langfuse, LangSmith, Braintrust, Responses API
  • Agent support: LangGraph and Pydantic AI
  • MCP RL envs: Build reinforcement learning environments with MCP
  • Built-in benchmarks: AIME, tau-bench
  • LLM judge: Stack-rank models using pairwise Arena-Hard-Auto
  • Local UI: Pivot/table views for real-time analysis

⚡ Quickstart (no labels needed)

Install with your tracing platform extras and set API keys:

pip install 'eval-protocol[langfuse]'

# Model API keys (set what you need)
export OPENAI_API_KEY=...
export FIREWORKS_API_KEY=...
export GEMINI_API_KEY=...

# Platform keys
export LANGFUSE_PUBLIC_KEY=...
export LANGFUSE_SECRET_KEY=...
export LANGFUSE_HOST=https://your-deployment.com  # optional

Minimal evaluation using the built-in AHA judge:

from datetime import datetime
import pytest

from eval_protocol import (
    evaluation_test,
    aha_judge,
    EvaluationRow,
    SingleTurnRolloutProcessor,
    DynamicDataLoader,
    create_langfuse_adapter,
)


def langfuse_data_generator() -> list[EvaluationRow]:
    adapter = create_langfuse_adapter()
    return adapter.get_evaluation_rows(
        to_timestamp=datetime.utcnow(),
        limit=20,
        sample_size=5,
    )


@pytest.mark.parametrize(
    "completion_params",
    [
        {"model": "openai/gpt-4.1"},
        {"model": "fireworks_ai/accounts/fireworks/models/gpt-oss-120b"},
    ],
)
@evaluation_test(
    data_loaders=DynamicDataLoader(generators=[langfuse_data_generator]),
    rollout_processor=SingleTurnRolloutProcessor(),
)
async def test_llm_judge(row: EvaluationRow) -> EvaluationRow:
    return await aha_judge(row)

Run it:

pytest -q -s

The pytest output includes local links for a leaderboard and row-level traces (pivot/table) at http://localhost:8000.

Installation

This library requires Python >= 3.10.

pip

pip install eval-protocol

uv (recommended)

# Install uv (if needed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Add to your project
uv add eval-protocol

📚 Resources

License

MIT

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

eval_protocol-0.2.84.dev4.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

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

eval_protocol-0.2.84.dev4-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file eval_protocol-0.2.84.dev4.tar.gz.

File metadata

  • Download URL: eval_protocol-0.2.84.dev4.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eval_protocol-0.2.84.dev4.tar.gz
Algorithm Hash digest
SHA256 567c4589f32da40216a14ae36ea82d334450f48a2f5bdc6bf0d8c5b91c0c5a17
MD5 4aae889c6dfa74b25d2081236558b7d6
BLAKE2b-256 7ba5152273a07083f276ab2085b2ad340b2e6f11c973d5af7c7dc3878a65ab29

See more details on using hashes here.

Provenance

The following attestation bundles were made for eval_protocol-0.2.84.dev4.tar.gz:

Publisher: release.yml on eval-protocol/python-sdk

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

File details

Details for the file eval_protocol-0.2.84.dev4-py3-none-any.whl.

File metadata

File hashes

Hashes for eval_protocol-0.2.84.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 a153ee3708e17d4be0778cdffc6612e67d052e1a5b00235ea2bae1fbf1c2c076
MD5 4b9530ff045f2c0d27dd679f7bce9fd6
BLAKE2b-256 6b34d354b8287d7aced17d1fc5ef8c3d46aa99e7bf579282aa2b55a49e19281f

See more details on using hashes here.

Provenance

The following attestation bundles were made for eval_protocol-0.2.84.dev4-py3-none-any.whl:

Publisher: release.yml on eval-protocol/python-sdk

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