Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

passwedge

Reliability-science metrics for repeated-attempt evaluation of long-horizon LLM agents.

pass@1 tells you whether a model can do a task once. It says nothing about whether an agent does so consistently across repeated attempts — the property that actually matters when a task takes hundreds of tool calls and one slip ends the run. passwedge measures that gap: capability vs. reliability.

  • Pure Python (numpy + scipy only), CPU-only, no GPU, no network, no API keys.
  • Every metric is implemented exactly as defined in its source paper, with the equation and citation in docs/DEFINITIONS.md. Where a paper gives a concept without one canonical estimator, passwedge documents its operationalization and never presents it as a verbatim reproduction.
  • Ships three ways: a library, a pytest plugin (@pytest.mark.passk), and a GitHub Action that comments a reliability table on your PRs.

Alpha (0.0.1a1). The API may change before 0.1.0.

Install

pip install passwedge

Quickstart (library)

import passwedge as pw

# 12 repeated attempts at one task; True = the attempt passed.
trial = pw.coerce_trial([True, True, False, True, True, False, True, True, True, False, True, True])

print("pass@1 :", pw.pass_at_k(trial.n, trial.c, 1))   # >=1 of 1 succeeds
print("pass@5 :", pw.pass_at_k(trial.n, trial.c, 5))   # >=1 of 5 succeeds
print("pass^5 :", pw.pass_pow_k(trial.n, trial.c, 5))  # ALL 5 succeed (reliability)

# Bayesian posterior over the task's true success probability (Jeffreys prior).
post = pw.beta_posterior(trial.c, trial.n)
print("posterior mean :", round(post.mean(), 3))
print("95% credible   :", tuple(round(x, 3) for x in post.credible_interval(0.95)))
print("E[p^5]         :", round(post.expected_pow_k(5), 3))  # expected all-5-success

Quickstart (CI gate / GitHub Action)

Given a JSON file of task outcomes:

[
  {"task_id": "t1", "duration_bucket": "short", "outcomes": [true, true, true, false]},
  {"task_id": "t2", "duration_bucket": "long",  "outcomes": [true, false, false, false]}
]
passwedge ci --input trials.json --k 1,2 --metric pass_pow_k --fail-under 0.5

prints a Markdown report, emits $GITHUB_OUTPUT values, and exits non-zero if the chosen metric is below the threshold. In a workflow, use the bundled action:

- uses: hinanohart/passwedge@v0.0.1a2
  with:
    input: trials.json
    fail-under: "0.5"
    metric: pass_pow_k

Quickstart (pytest plugin)

import pytest

@pytest.mark.passk(attempts=20, k=5, min_pass_pow_k=0.9)
def test_agent_is_reliable():
    assert run_agent().solved   # executed 20×; passes iff pass^5 >= 0.9

Metrics

Metric Meaning Source
pass_at_k probability ≥1 of k attempts succeeds Chen et al. 2021 (arXiv:2107.03374)
pass_pow_k probability all k attempts succeed Beyond pass@1 (arXiv:2603.29231), Def. 2
reliability_decay_curve / _slope how pass^k decays with task duration (RDC/RDS) arXiv:2603.29231, Def. 3
variance_amplification_factor VAF: variance ratio long-vs-short bucket arXiv:2603.29231, Def. 4
graceful_degradation_score GDS: weighted partial credit over subtasks arXiv:2603.29231, Def. 5
meltdown_onset_point MOP: tool-call entropy collapse detector arXiv:2603.29231, Def. 6
beta_posterior / dirichlet_posterior Bayesian posterior mean + credible interval, E[p^k] Don't Pass@k (arXiv:2510.04265)

Honest-marketing note. arXiv:2510.04265 does not define a metric called "Bayes@k"; passwedge's Bayesian helpers are our operationalization of that paper's Dirichlet framework. The scorio package (the paper's reference implementation) is the numeric baseline our test suite reproduces under a uniform prior.

MOP thresholds are dataset-specific. meltdown_onset_point requires explicit theta_h, delta, w (no defaults). The paper's calibration is exposed as MOP_PAPER_DEFAULTS but applying it verbatim to other data produces false positives.

Where it fits

passwedge is the measurement layer: it consumes repeated-attempt outcomes (a bool list, a JSON file, or a trace export) and reports reliability. It deliberately does not run rollouts, score reward/fitness functions, audit reward gameability, or detect reward hacking — those are separate concerns handled by tools such as scorewright (fitness scoring + anti-gaming), rewardfuzz (reward gameability auditing), and mav-bench (multi-agent verification). passwedge sits one layer up from those: feed it the per-attempt pass/fail outcomes they (or any eval harness) produce, and it tells you how reliably the agent succeeds. For confidence / hallucination fragility see yuragi; for streaming inference verification see conformlock.

License

Apache-2.0.

Metadata

Release files for passwedge 0.0.1a2

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

Source distribution (sdist)

Source distribution for passwedge 0.0.1a2
File Size Uploaded Provenance Actions
passwedge-0.0.1a2.tar.gz 33.0 kB Without provenance Details for passwedge-0.0.1a2.tar.gz

Built distribution (wheel)

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

Total release size: 62.8 kB

Release files / passwedge-0.0.1a2.tar.gz

Download URL passwedge-0.0.1a2.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1add953ac1589dd550e63df6c24bc2e32605b407639c8f35033ab22d5be4302c
BLAKE2b-256 checksum
How to use checksums
f4055bee57b20b0fce998f8622dc045a658d7f082545687633884471d757a936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / passwedge-0.0.1a2-py3-none-any.whl

Download URL passwedge-0.0.1a2-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9a42b38ac90f4cf27ff52b0a2516ecd6148315327d48c76e7fa343ff9ed521f
BLAKE2b-256 checksum
How to use checksums
348403908646bb1f337ff0b9a466012744a5a1bf5e345dc452d71387708a2ff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for passwedge 0.0.1a2

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.

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