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

EP is an open specification, Python SDK, and pytest wrapper that provides a standardized way to write evaluations for large language model (LLM) applications. Start with simple single-turn evals for model selection and prompt engineering, then scale up to complex multi-turn reinforcement learning (RL) for agents using Model Context Protocol (MCP). EP ensures consistent patterns for writing evals, storing traces, and saving results—enabling you to build sophisticated agent evaluations that work across real-world scenarios, from markdown generation tasks to customer service agents with tool calling capabilities.

Quick Example

Here's a simple test function that checks if a model's response contains bold text formatting:

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

@evaluation_test(
    input_messages=[
        [
            Message(role="system", content="You are a helpful assistant. Use bold text to highlight important information."),
            Message(role="user", content="Explain why **evaluations** matter for building AI agents. Make it dramatic!"),
        ],
    ],
    model=["accounts/fireworks/models/llama-v3p1-8b-instruct"],
    rollout_processor=default_single_turn_rollout_processor,
    mode="pointwise",
)
def test_bold_format(row: EvaluationRow) -> EvaluationRow:
    """
    Simple evaluation that checks if the model's response contains bold text.
    """
    
    assistant_response = row.messages[-1].content
    
    # Check if response contains **bold** text
    has_bold = "**" in assistant_response
    
    if has_bold:
        result = EvaluateResult(score=1.0, reason="✅ Response contains bold text")
    else:
        result = EvaluateResult(score=0.0, reason="❌ No bold text found")
    
    row.evaluation_result = result
    return row

Documentation

See our documentation for more details.

Installation

This library requires Python >= 3.10.

Install with pip:

pip install eval-protocol

License

MIT

Project details


Release history Release notifications | RSS feed

This version

0.2.2

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.2.tar.gz (590.1 kB 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.2-py3-none-any.whl (521.6 kB view details)

Uploaded Python 3

File details

Details for the file eval_protocol-0.2.2.tar.gz.

File metadata

  • Download URL: eval_protocol-0.2.2.tar.gz
  • Upload date:
  • Size: 590.1 kB
  • 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.2.tar.gz
Algorithm Hash digest
SHA256 baf3b0a9a00d49d522b39fe2a72775efc097b0891d53efa139e0af1ce25dc72f
MD5 dab0c4ffed4178691c08e6d8fb24a2cb
BLAKE2b-256 2591260f787e3beb7b486d09478fa08ab45fdc8532a9eaee3e48f0aae3507d01

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: eval_protocol-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 521.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eval_protocol-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 652d59867f0b112a65666fc9292d44d5b0e17fce90db14c1a00c6bb27284c10e
MD5 67f124e5c850ad3ec19aee4215a0a0a9
BLAKE2b-256 cc5d56e3e0c20a6af9f2578c14ca48799f7930cc9792cf74974f7a58a5229667

See more details on using hashes here.

Provenance

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