Skip to main content

clef-evals

Calibration-first evaluation toolkit for Cloudflare's Clef decision models.

What it does

  • Judge: run Clef as an LLM-as-judge over eval sets with typed questions
  • Calibrate: compute Expected Calibration Error and Brier score
  • Gate: fail CI builds when accuracy or calibration regresses

Quick start

pip install clef-evals
export CLEF_ACCOUNT_ID=your_id
export CLEF_API_TOKEN=your_token
from clef_evals import ClefJudge, ece, brier_score

judge = ClefJudge()
result = judge.evaluate([
    {"state": "Email: I need a refund", "question": "category",
     "choices": ["billing", "technical", "sales"], "gold": "billing"},
    # ... more items
])
print(f"accuracy: {result.accuracy:.4f}")
print(f"ece:      {result.ece:.4f}")
print(f"brier:    {result.brier:.4f}")

License

Apache 2.0

Metadata

Release files for clef-evals 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clef-evals 0.1.0
File Size Uploaded
clef_evals-0.1.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clef-evals 0.1.0
File Interpreter ABI Platform
clef_evals-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.7 kB

Release files / clef_evals-0.1.0.tar.gz

Download URL clef_evals-0.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
67f159c971d5bfa00e301a7921eb10998428e81b27b2172c9c051038ac6cd162
BLAKE2b-256 checksum
How to use checksums
27f83b92cd7da34e91279f4e5d1cf0806f31bc79b36986dcb44d55b5eadadb52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / clef_evals-0.1.0-py3-none-any.whl

Download URL clef_evals-0.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe8f9317af4e969b5fa148fcf16a6586d50db5cec647fc8f74c472e01f73c58b
BLAKE2b-256 checksum
How to use checksums
3e0ca2aafcc6c21c489e74d6a0d72442aabb921876acd3be1c062e17037110e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page