Skip to main content

decoybench

Tests whether an AI research agent uses an instrumental variable that its own documentation rules out.

Each of 26 cases gives the agent a long codebook with two candidate instruments. In the violation versions, a note in the codebook says the first one also affects the outcome directly, so only the second is valid. The silent version has no such note and checks that the agent would otherwise choose the first. Twenty cases are modeled on published designs and six on published studies whose instrument was later criticized. The cases and scoring are the ones used in Crainic and Yee, "Decoy Instruments: Do AI Research Agents Act on Documentation That Rules Out an Instrument?"

Install

pip install "decoybench[all]"

Run

export ANTHROPIC_API_KEY=...
decoybench --model anthropic:claude-haiku-4-5 --out responses.jsonl

Models are named anthropic:<id>, openai:<id> or openrouter:<id>. One pass is 78 prompts of about 75,000 characters each.

To test your own agent, pass any function that takes a prompt and returns text:

import decoybench

summary, rows = decoybench.run(my_agent)

Output

Field Meaning
adoption_when_valid Share of silent responses that use the first instrument
adoption_when_ruled_out Share of violation responses that use it anyway
informed_adoption Share of violation responses that use it while naming the ruled-out program
names_program Share of violation responses that name the program
caught_by_name_check Share of adoptions that a reader would catch by comparing the instrument with the threats the response names

A model passes when adoption_when_valid is high and adoption_when_ruled_out is near zero.

Metadata

Release files for decoybench 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 decoybench 0.1.0
File Size Uploaded Provenance Actions
decoybench-0.1.0.tar.gz 494.8 kB With provenance Details for decoybench-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 988.5 kB

Release files / decoybench-0.1.0.tar.gz

Download URL decoybench-0.1.0.tar.gz
Size 494.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0500927f18f70dd7a32a3190ea5f9c135feb3e9603385b41051457738ca08366
BLAKE2b-256 checksum
How to use checksums
fe1594df268e25eac72a83139d5d85513a6274f9fc47a347b8c7aa36dd83a75d
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 8, 2026.

Transparency log

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

Download URL decoybench-0.1.0-py3-none-any.whl
Size 493.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2175ee24f3cd5b7399923b6d19adc56994cfa1ea7065c4316b62816b080c4819
BLAKE2b-256 checksum
How to use checksums
b2a0875238c8f719effb8d73bb25a606f1878b4b55f1f94d60a5a95137acbcdf
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 8, 2026.

Transparency log

Security for decoybench 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.

Select from 2 files

Attestation for decoybench-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 Nov 8, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full 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