Skip to main content

claimeval

PyPI version License: MIT Python 3.9+

Uncertainty quantification for cost–accuracy claims about AI agents.

Leaderboards, press releases, and papers declare:

  • "Agent A is #1 on SWE-bench Verified"
  • "Model X outperforms Model Y"
  • "System A matches System B at a fifth of the cost"
  • "Agent A is Pareto-optimal on the cost–accuracy frontier"

Each of these is a statement about noisy sample estimates from a finite benchmark of tasks and runs. claimeval attaches a probability to each such claim, using a bootstrap over the correct unit of generalization, and reports whether it is statistically supported.


🚀 Quick Start

Installation

claimeval requires only NumPy:

pip install claimeval

Or install from source in editable mode:

git clone https://github.com/claimeval/claimeval.git
cd claimeval
pip install -e .

🔍 Test a Claim in One Command

Evaluate claims against a raw rollout log:

claimeval claims examples/runs.jsonl examples/claims.json --map examples/map.json

Output:

id        kind            subject                      P(claim)  verdict
c1        top1            agent-E                         0.960  supported
c2        pairwise        agent-D                         0.996  supported
c3        cost_dominance  agent-D                         0.717  NOT supported
c4        frontier        agent-A                         0.993  supported
supported = P >= 0.9; resampling: task

Claim Definitions (claims.json)

Define claims in testable JSON schemas:

[
  {
    "id": "c1",
    "kind": "top1",
    "subject": "agent-A",
    "comparators": ["agent-B", "agent-C"]
  },
  {
    "id": "c2",
    "kind": "pairwise",
    "subject": "agent-A",
    "comparators": ["agent-B"]
  },
  {
    "id": "c3",
    "kind": "cost_dominance",
    "subject": "agent-B",
    "comparators": ["agent-D"]
  },
  {
    "id": "c4",
    "kind": "frontier",
    "subject": "agent-A",
    "comparators": ["agent-B", "agent-C", "agent-D"]
  }
]

Supported claim types:

  • top1: The subject strictly leads all comparators.
  • topk: The subject ranks within the top $k$ systems.
  • pairwise: The subject strictly outperforms named rivals.
  • parity: Performance difference is within a threshold ($|a_c - a_f| \le \delta$).
  • cheaper_noninferior: Subject is cheaper than rival and accuracy is within parity margin.
  • frontier: Subject belongs to the non-dominated Pareto frontier.
  • cost_dominance: Subject is both strictly cheaper and more accurate than rival.

🐍 Python API

from claimeval import Rollout, RolloutSet, Claim, evaluate_claims

# Ingest rollout records: (config, task_id, seed, success_bool, cost_dollars, group)
rollouts = [
    Rollout("agent-A", "task-1", seed=0, success=1.0, cost=0.15, group="repo-1"),
    Rollout("agent-B", "task-1", seed=0, success=0.0, cost=0.08, group="repo-1"),
    # ...
]
dataset = RolloutSet(rollouts)

# Test a pairwise claim
claims = [Claim("pairwise", subject="agent-A", comparators=["agent-B"])]
results = evaluate_claims(dataset, claims, threshold=0.9, n_boot=2000)

for r in results:
    print(f"Claim {r['id']}: P = {r['probability']:.3f} -> {r['verdict']}")

Modular Architecture & Subpackages

claimeval is organized into clean, focused subpackages:

  • claimeval.core: Data models (Rollout, RolloutSet), stream/file ingestion (load, inspect_path), and benchmark loaders (swebench, terminal_bench, tau2).
  • claimeval.stats: Resampling estimators (hierarchical_bootstrap, variance_decomposition), Pareto geometry (dominance, pareto_mask, frontier_band, hausdorff), cluster methods (wild_intervals), BCa intervals, bias corrections (split_sample_debias), and cost diagnostics (diagnose_cost_axis).
  • claimeval.analysis: Claim evaluation engine (Claim, evaluate_claims), benchmark baselines, pairwise comparison suites, and formatted tabular reporting (analyze, headline).
  • claimeval.sim: Generative ground-truth simulations (make_population, simulate) and Monte Carlo estimator coverage studies (coverage_study).

All common functions remain accessible directly from the top-level import claimeval.


📊 Auditing Public Benchmarks Directly

claimeval provides built-in loaders for public agent benchmarks:

# SWE-bench Verified (from github.com/SWE-bench/experiments)
claimeval claims evaluation/verified claims.json --from swebench

# SWE-bench Verified cost leaderboard (mini-SWE-agent runs)
claimeval claims evaluation/verified claims.json --from swebench-cost

# Terminal-Bench 2.0 (Harbor evaluation trees)
claimeval claims submissions/terminal-bench/2.0 claims.json --from terminal-bench

# tau2-bench leaderboard trajectories
claimeval claims tau2_results/ claims.json --from tau2

🛠️ CLI Toolkit

Command Purpose
claimeval claims Evaluate a set of typed claims against a rollout dataset
claimeval analyze Compute empirical Pareto frontier with membership & dominance probabilities
claimeval inspect Automatically inspect schema and statistics of an unknown evaluation dump
claimeval seed-curve Simulate error of a $k$-run study vs. full data
claimeval coverage Validate estimator calibration against known ground truth
claimeval demo Run an end-to-end demonstration on synthetic benchmark data

👤 Author & Contact

Harish Mashetty
Independent Researcher
E-mail: harish.mashetty@gmail.com
Project Repository: https://github.com/claimeval/claimeval


📜 License

MIT License. See LICENSE for details.

Metadata

Release files for claimeval 1.0.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 claimeval 1.0.0
File Size Uploaded Provenance Actions
claimeval-1.0.0.tar.gz 56.7 kB Without provenance Details for claimeval-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for claimeval 1.0.0
File Interpreter ABI Platform Actions
claimeval-1.0.0-py3-none-any.whl Python 3 none any Details for claimeval-1.0.0-py3-none-any.whl

Total release size: 111.5 kB

Release files / claimeval-1.0.0.tar.gz

Download URL claimeval-1.0.0.tar.gz
Size 56.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f2a6754997a15520bbbb9f2240afe1f0c142657719f5d07ccc33c8cc4094003c
BLAKE2b-256 checksum
How to use checksums
48752202b088022bb12cefe36f0100979bbf7a1e826a7d1a8b2ad193be64081c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / claimeval-1.0.0-py3-none-any.whl

Download URL claimeval-1.0.0-py3-none-any.whl
Size 54.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c47e5ca339965b44a05f1b73e1d1fcdb2c5add753eb33b8862fad6903684b66a
BLAKE2b-256 checksum
How to use checksums
22832e51edfe595d7bc5d769cc645ebea5d068f16669775faf46ce267c58b69e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for claimeval 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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