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
Add --multiturn to make the agent open the codebook and documentation files with tools instead of receiving them in the prompt.
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 |
| opened_documentation | Multi-turn only: share of responses whose agent opened the documentation file |
| saw_both_candidates | Multi-turn only: share whose agent read the codebook entries for both instruments |
| adoption_when_ruled_out_and_seen | Multi-turn only: adoption among violation responses that saw both candidates |
A model passes when adoption_when_valid is high and adoption_when_ruled_out is near zero.
Metadata
Release files for decoybench 0.2.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 |
|---|---|---|---|---|
| decoybench-0.2.0.tar.gz | 497.4 kB | With provenance | Details for decoybench-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| decoybench-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for decoybench-0.2.0-py3-none-any.whl |
Total release size: 994.0 kB
Release files / decoybench-0.2.0.tar.gz
| Download URL | decoybench-0.2.0.tar.gz |
|---|---|
| Size | 497.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0f40863fdc58c05cc7526c7273cd338bcca525e580dbb2bc365b4ec6a162450
|
|
BLAKE2b-256 checksum How to use checksums |
53fb0464ad4f13cea21838290dfc38392757ed9fd7ffbbd3c83e56efa7d70934
|
| 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 logRelease files / decoybench-0.2.0-py3-none-any.whl
| Download URL | decoybench-0.2.0-py3-none-any.whl |
|---|---|
| Size | 496.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2837758d3591e55cf68819e6479bb43767cee97f744474f6817ebe221aaed20c
|
|
BLAKE2b-256 checksum How to use checksums |
4eeea41abcf93b142ccec9efddad37f9057f0551474978a44e345149afe77520
|
| 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 logSecurity for decoybench 0.2.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 decoybench-0.2.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 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.