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

The open-source toolkit for building your internal model leaderboard.

When you have multiple AI models to choose from—different versions, providers, or configurations—how do you know which one is best for your use case?

Quick Example

Compare models on a simple formatting task:

from eval_protocol.models import EvaluateResult, EvaluationRow, Message
from eval_protocol.pytest import default_single_turn_rollout_processor, evaluation_test

@evaluation_test(
    input_messages=[
        [
            Message(role="system", content="Use bold text to highlight important information."),
            Message(role="user", content="Explain why evaluations matter for AI agents. Make it dramatic!"),
        ],
    ],
    model=[
        "fireworks_ai/accounts/fireworks/models/llama-v3p1-8b-instruct",
        "openai/gpt-4",
        "anthropic/claude-3-sonnet"
    ],
    rollout_processor=default_single_turn_rollout_processor,
    mode="pointwise",
)
def test_bold_format(row: EvaluationRow) -> EvaluationRow:
    """Check if the model's response contains bold text."""
    assistant_response = row.messages[-1].content

    if assistant_response is None:
        row.evaluation_result = EvaluateResult(score=0.0, reason="No response")
        return row

    has_bold = "**" in str(assistant_response)
    score = 1.0 if has_bold else 0.0
    reason = "Contains bold text" if has_bold else "No bold text found"

    row.evaluation_result = EvaluateResult(score=score, reason=reason)
    return row

📚 Resources

Installation

This library requires Python >= 3.10.

Install with pip:

pip install eval-protocol

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.20.post1.tar.gz (1.9 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.20.post1-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file eval_protocol-0.2.20.post1.tar.gz.

File metadata

  • Download URL: eval_protocol-0.2.20.post1.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eval_protocol-0.2.20.post1.tar.gz
Algorithm Hash digest
SHA256 ffddff544a9f451a186db84ebdcb14de5189410b7c020b6c8a600d69d607518b
MD5 cfa54836fbf95e9cf78699ffe6b762d3
BLAKE2b-256 103bd05e42246cf729e02656fbbf77d5a55c57fc0f823dcb184d4891778a96fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for eval_protocol-0.2.20.post1.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.20.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for eval_protocol-0.2.20.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 39bb6cad2a9257379586f0dfdb51687e33c009be8f0efc7993fb52bbbc4e797b
MD5 4c27bdb226e6a8963493c65ed5fb1114
BLAKE2b-256 03cba4c77d580814e0fe14eb758fdebf8102662134e1559c3ffe136fdd08e334

See more details on using hashes here.

Provenance

The following attestation bundles were made for eval_protocol-0.2.20.post1-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