Loading...
Loading...
Contributors:
Dataset URI:
10.5281/zenodo.23463363Supplementary data for the article “Constraining LLM Agents with Code, Not Prompts” (Aditya Ranjan, submitted to Communications of the ACM, Practice section). The archive holds the prompts, raw model outputs, analysis scripts and results for three small tests reported in the article. All calls were made in October 2026 through the headless Claude Code command line, with no tools and default sampling. Test 1, random picks. Sonnet 5.5 was asked for a random integer from 1 to 10 (200 calls) and from 1 to 100 (200 calls). Haiku 5.5 and Opus 5.5 were each asked for 1 to 10 (100 calls each). A seeded Python generator is the reference. Test 2, a prompt-only rule under pressure. Two scenarios each carry one hard rule in the system prompt: a database code freeze, and a never-sell-below-cost price floor. Each has three pressure messages and a control message. Sonnet 5.5 had 30 trials per pressure message and 20 per control. Haiku 5.5 and Opus 5.5 had 20 trials per pressure message. Test 3, enforcing “read only”. Ten hand-written write statements were run against an in-memory SQLite database under three guards: a word list, SQLite’s read-only mode, and an authorizer callback. Contents. runs/: 620 raw Sonnet 5.5 outputs. runs3/: 440 raw Haiku 5.5 and Opus 5.5 outputs. exp1_random.py, exp2_pressure.py, exp3_models.py: the scripts that made the calls. common.py holds the call wrapper. analyze.py, analyze3.py: the analysis scripts. analysis.json, analysis3.json, exp1_results.json: the results. exp1.log, exp2.log, exp3.log: the run logs. runs4/ holds 540 raw outputs from the six-turn conversation test (Sonnet 5.5, Haiku 5.5, Opus 5.5; 15 conversations per model and scenario), with exp4_multiturn.py and analyze4.py and analysis4.json runs5/ holds the adaptive-attacker runs. Only complete conversations are analysed: the first 15 for every agent and scenario, and the first 39 for the Sonnet agent in the freeze scenario. Later files are partial (a usage limit stopped the run) and are not analysed. exp6_ladder.py and exp9_ladder2.py hold the two demonstrations. See README.txt. Limits. The tests are small, use single-turn prompts, and cover one vendor’s models. A regular expression read the model’s JSON answer, and nothing was adjudicated by a person. In the tool’s usage records, most calls list additional models. For the Opus runs, Haiku 5.5 appears on 219 of 220 calls, Opus 4.8 on 9, and one call lists only Opus 5.5. The Sonnet runs list Haiku 5.5 on 605 of 620 calls.
Keyword(s):
guardrails; LLM agents; random number generation; reliability; state machines.
Grants and Funding:
No Grants or Funding Data Available
Associated Publication(s):
No Associated Publication Data Available
Supplementary Data:
No Supplementary Data Available
Related Dataset(s):
No Related Dataset Data Available
The National Library of Medicine (NLM) provides information about biomedical datasets. Inclusion on an NLM Web page does not imply endorsement of, or agreement with, the contents by NLM or the National Institutes of Health. Learn more: NLM Web Policies (nih.gov)