Skip to main content

Confidence-Aware Annotation Toolkit

CI

CAAT is a Python toolkit for deciding which model predictions to accept or send for review. Fit a cutoff on labeled examples, check its error on held-out data, then use the saved policy to route or audit a new batch.

CAAT uses separate labeled splits to select and check a cutoff. A saved policy can route new predictions or define a batch audit.

A confirmed policy can route predictions immediately. If a selected cutoff misses its held-out target, you can still draw a label sample to check that cutoff on a new batch. How the modules work

Try CAAT on five predictions

From an empty directory, install the base CLI (Python 3.10 or later) and download the five-row ticket example.

python -m pip install caat-annotation
curl --fail --location --create-dirs --output examples/ticket_triage.csv https://raw.githubusercontent.com/Daveyuwang/caat/v1.1.2/examples/ticket_triage.csv
caat evaluate examples/ticket_triage.csv --id-column ticket_id --prediction-column model_route --reference-column expected_route --score-column confidence --group-column inbox --threshold 0.75 --probability --output-dir replay/tickets

At a cutoff of 0.75, CAAT accepts three of the five predictions. One of those three is wrong. The output directory contains the risk–coverage curve, Brier score and calibration bins. Report fields · Reliability diagram

Try a review policy

Run the remaining examples from a checkout.

git clone https://github.com/Daveyuwang/caat.git
cd caat
python -m pip install .
caat policy examples/ifeval_graders.csv --score-column mean_token_logprob --correct-column strict_pass --check-column helm_strict_pass --risk-target 0.4 --plot replay/policy.svg

On 217 held-out IFEval responses, the policy accepts 144. Google’s strict grader counts 33 errors among those responses (22.9%). HELM counts 45 (31.2%). Both observed rates fall below the 40% target. How CAAT selects the cutoff

Error among the 144 accepted responses under each grader, plotted against the 40% target

Bring your own evaluations and scores

Use one row per prediction, with a unique ID and a score that increases with confidence. Supply a 0/1 grade, or name the predicted and reference labels for exact-match grading. CAAT reads CSV and JSONL, and can join scores to saved evaluation runs. Prediction table format · Inspect · lm-eval · Every Eval Ever · HELM

If you have… Start here
A classifier with labeled predictions Fit a policy and see review volume by predicted class
Model-generated labels to review Build an annotation queue
Several candidate confidence scores Compare them at the same coverage
Scores to turn into probabilities Fit a calibration map and check it on held-out rows

Reuse one fitted policy from routing through audit

Fit the digits example with the training extra. All four commands below read the resulting workflow file. Routing, evaluation, auditing and monitoring also work in the base install once you have that file.

python -m pip install ".[scorer,workflow]"
caat run examples/fitted_classifier.toml
caat route examples/fitted_batch.csv --threshold-report replay/fitted-classifier/workflow.json --output replay/decisions.csv
caat evaluate examples/fitted_batch_graded.csv --threshold-report replay/fitted-classifier/workflow.json --correct-column correct
caat audit examples/fitted_batch_graded.csv --threshold-report replay/fitted-classifier/workflow.json --correct-column correct --correct-column second_grade
caat monitor examples/fitted_batch_graded.csv --threshold-report replay/fitted-classifier/workflow.json --correct-column correct

The policy accepts new-a and sends new-b to review. One accepted example gives too little evidence to confirm the 2% target, so evaluate and audit return status 1. The monitor reports no alert. Workflow configuration · Monitor interpretation

Audit a withheld policy on a new batch

Give caat plan --forecast --budget-ceiling a label budget. It finds the smallest tested cap that meets your power target and the plan with the lowest expected grading cost. Choose a plan and send its requests with caat audit-block. On ARC-Challenge, the lower-cost plan reserved 325 labels and used 200. The smaller plan reserved 299 and used 250. Compare budgets · ARC-Challenge results

The ANLI policy missed its target on R1. Draw 100 of the outputs its cutoff would accept on R2, then evaluate the saved grades for those exact outputs.

caat plan --threshold-report results/anli_r2/policy.json --batch-predictions results/anli_r2/predictions.csv --label-budget 100 --sample-seed 42 --sample-output replay/r2-sample.csv --output replay/r2-plan.json
caat evaluate replay/r2-sample.csv --grader-file anli=results/anli_r2/sample-grades.csv --grader-output-key-column output_key --threshold-report results/anli_r2/policy.json --batch-predictions results/anli_r2/predictions.csv --plan-report replay/r2-plan.json

The draw found 43 errors in 100 outputs. The one-sided 95% lower bound is 35.34%, above the 20% target. The verdict is exceeds (exit 1). Routing stays disabled. R2 results

Use caat audit-block to issue labels in blocks and caat evaluate --partial to see when the full-budget verdict is settled. WinoGrande needed 90 of 100 labels for its frozen draw. The archived BoolQ draw needed all 100. Labeler handoff · Study and replay

WinoGrande audit. After 90 labels, even the lowest possible final error count exceeds the decision boundary.

Pick a confidence score

Extract candidate scores from saved token log probabilities, then compare them with caat scores. Feature definitions

caat features examples/token_scores.jsonl --output replay/token_scores.csv

Set a cutoff

This empirical example selects -0.35 and accepts 12 of 24 calibration rows, including four errors. Use the default Learn then Test rule for risk control with a prespecified grid and independent calibration rows. Selection rules

caat select examples/ifeval_strict.csv --score-column mean_token_logprob --correct-column strict_pass --thresholds -0.20 -0.35 -0.60 --risk-target 0.4 --rule empirical

Check a grader change

CAAT joins separate grader exports by ID and output identity. Here the graders find one and two errors in the same three accepted tickets. The second grader exceeds the target, so the command exits 1. Run an audit in CI

caat audit examples/audit/predictions.csv --output-key-column output_key --grader-file reference=examples/audit/reference.csv --grader-file rubric=examples/audit/rubric.csv --threshold 0.75 --risk-target 0.4

Benchmarks and development

Run python scripts/replay_benchmarks.py to reproduce the bundled IFEval, MMLU-Pro and TriviaQA samples. Benchmarks and data sources · Research figures · Tool comparison

Contributing · Roadmap · Changelog · MIT license

Metadata

Release files for caat-annotation 1.1.2

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

Source distribution (sdist)

Source distribution for caat-annotation 1.1.2
File Size Uploaded Provenance Actions
caat_annotation-1.1.2.tar.gz 196.7 kB With provenance Details for caat_annotation-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for caat-annotation 1.1.2
File Interpreter ABI Platform Actions
caat_annotation-1.1.2-py3-none-any.whl Python 3 none any Details for caat_annotation-1.1.2-py3-none-any.whl

Total release size: 335.3 kB

Release files / caat_annotation-1.1.2.tar.gz

Download URL caat_annotation-1.1.2.tar.gz
Size 196.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c141326af8dfd8db4cbf7b555062f446db75fe85eaa52397e648a107dbecac28
BLAKE2b-256 checksum
How to use checksums
446ec8ccb6b4419a375bae5629d2d0ed8bc99bb7c7b1717e1d37b8b31522b3f3
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 Nov 18, 2026.

Transparency log

Release files / caat_annotation-1.1.2-py3-none-any.whl

Download URL caat_annotation-1.1.2-py3-none-any.whl
Size 138.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38ed97fd4caa0504a9b3e17d473939563b843d37a7625e7cd548ebdbb4535399
BLAKE2b-256 checksum
How to use checksums
ace58db9b050ab2c7a4c164d64d0cbbd477edf24ae1af707e6185820615d71bc
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 Nov 18, 2026.

Transparency log

Security for caat-annotation 1.1.2

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.

Select from 2 files

Attestation for caat_annotation-1.1.2.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 Nov 18, 2026.

Transparency log

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