veracle
Honest numbers from LLM judges.
Most AI evaluations today are scored by another model: an LLM judge decides whether each answer is correct, helpful or safe. Judges make mistakes, and those mistakes are almost never accounted for. A judge that waves through 20 % of wrong answers turns a 75 % model into an 81 % model, and the confidence interval around that number is computed as if the judge were perfect.
veracle fixes this in three steps:
- Audit the judge. Compare it with human labels on a small sample and estimate its sensitivity and specificity, with exact intervals, a sample size planner and a test of whether it errs equally for every model.
- Correct the result and carry the uncertainty. Remove the judge's bias (Rogan-Gladen, or prediction-powered inference when the audit is a subsample of the evaluation) and propagate the uncertainty of the audit into the final interval, with the delta method or a (cluster) bootstrap.
- Decide with error control. Answer "did the model clear the bar?" or "is model A better than model B?" as pass, fail or inconclusive, with a guaranteed bound on the probability of a wrong claim, also across many models or benchmarks.
The result is not a score but a claim that can be defended.
Installation
pip install veracle
Python 3.10 or newer is required. The only runtime dependency is NumPy.
Quick start
The example simulates a model whose true pass rate is 75 %, scored by a lenient judge that passes 40 % of wrong answers. A human audit of 400 answers measures the judge.
import veracle as vc
from veracle.datasets import simulate_evaluation
data = simulate_evaluation(
3000, true_rate=0.75, sensitivity=0.95, specificity=0.6, n_audit=400, seed=11
)
# 1. Audit: how does the judge compare with humans?
print(data.audit.summary())
# audited items: 400 (303 truly pass, 97 truly fail)
# sensitivity: 0.960 (95% CI 0.932 to 0.979)
# specificity: 0.701 (95% CI 0.600 to 0.790)
# ...
# 2. Correct the judge's pass rate and carry the audit uncertainty.
result = vc.correct_rate(data.audit, data.judge)
print(result.summary())
# corrected 0.7782 (95% CI 0.7323 to 0.8240); naive judge rate 0.8137; rogan-gladen (delta)
# 3. Did the model clear the 80 % release bar?
print(vc.threshold_decision(result, threshold=0.80, name="model-v2"))
# model-v2: INCONCLUSIVE (estimate 0.7782, bounds 0.7397 to 0.8166, threshold 0.8;
# naive judge verdict: pass)
The judge alone says the model passes. Once its errors are accounted for, the evidence does not support that claim.
With your own data, build the audit from paired labels with
vc.JudgeAudit.from_labels(human_labels, judge_labels) and pass the judge's
verdicts on the full evaluation to vc.correct_rate.
Several models against one bar, with Holm correction:
results = {name: vc.correct_rate(audit, verdicts) for name, verdicts in runs.items()}
decisions = vc.decide_many(results, threshold=0.80, method="holm")
Is model A really better than model B?
diff = vc.compare_rates(audit, verdicts_a, verdicts_b, paired=True)
vc.threshold_decision(diff, threshold=0.0, name="A minus B")
Several answers per prompt? Pass the prompt identifiers:
vc.correct_rate(audit, judge_verdicts, clusters=prompt_ids, method="bootstrap", seed=0)
What is inside
| Module | Purpose | Main objects |
|---|---|---|
veracle.audit |
Judge sensitivity and specificity, audit planning, consistency across models | JudgeAudit, audit_size, judge_consistency, naive_bias |
veracle.correction |
Misclassification correction with uncertainty propagation | correct_rate, ppi_rate, compare_rates, CorrectedRate |
veracle.decisions |
Pass, fail or inconclusive with error control | threshold_decision, decide_many, adjust_pvalues |
veracle.datasets |
Simulated judged evaluations | simulate_evaluation |
Command line
veracle correct --items 3000 --judge-pass 2460 --tp 190 --fn 10 --tn 160 --fp 40 --threshold 0.8
veracle audit-size --half-width 0.03 --rate 0.7 --sensitivity 0.9 --specificity 0.8 --items 5000
Documentation
The user guide, the derivations and the API reference are at https://yunusimanov.github.io/veracle.
Related work
veracle is the third library in a series on statistically sound use of AI systems, together with anywatch (anytime-valid post-market monitoring) and fewlabels (design and robustness for prediction-powered inference).
Citing
If you use veracle in academic work, please cite it using the metadata in CITATION.cff or the "Cite this repository" button on GitHub.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md and the Code of Conduct.
License
veracle is distributed under the Mozilla Public License 2.0.
Author
Yunus Imanov, Researcher, Department of Engineering Mathematics and Artificial Intelligence, Azerbaijan Technical University, Baku, Azerbaijan. Contact: yunus.imanov.fz@student.aztu.edu.az
Metadata
Release files for veracle 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| veracle-0.1.0.tar.gz | 35.6 kB | With provenance | Details for veracle-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| veracle-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for veracle-0.1.0-py3-none-any.whl |
Total release size: 72.4 kB
Release files / veracle-0.1.0.tar.gz
| Download URL | veracle-0.1.0.tar.gz |
|---|---|
| Size | 35.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c24eb4674d942df7f5a1c3eb8cf0275caf4e4d630f12e7571eadaaa672625991
|
|
BLAKE2b-256 checksum How to use checksums |
164a4e5222bceec9f412b4de253f3b23a08243b00ebb3fd2c219a75ffa32bbaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logRelease files / veracle-0.1.0-py3-none-any.whl
| Download URL | veracle-0.1.0-py3-none-any.whl |
|---|---|
| Size | 36.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a64f1ecac3c54ed4ee254f5d627fb0a0e8a16ee001fc8db4277c69ce35b084a9
|
|
BLAKE2b-256 checksum How to use checksums |
fa2d30eba71834c230bd45b1dca6c8ec60055d439d61dcfd4cd8fe20b6869d5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logSecurity for veracle 0.1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for veracle-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logA 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.