# Agents, chats and roles: the repeatable kit

The scripts behind [Does an AI believe the role you give it?](https://parameterspaceinspector.com/blog/what-ai-does-in-chats-agents-and-roles/):
22 questions about conversations, agents, system-prompt roles and popular claims, put to five small open models from
five labs with their insides read. Every case runs on PSI 0.4.0's own lab code (`src/context_lab.py`,
`src/attractor_lab.py`, `src/trace_server.py`: the code behind the Context lab, the Attractor lab and their MCP tools).
Our results on five models are in `results/`, so you can compare your numbers with ours.

| Case | File | Question |
|---|---|---|
| C1 | `c1_role_trust.py` | Does your AI trust a web page more than it trusts you? |
| C2 | `c2_false_success.py` | Did it tell you it worked when the tool failed? |
| C3 | `c3_retry_loops.py` | Why do agents keep retrying the same broken command? |
| C4 | `c4_which_turn.py` | Which earlier message is it actually listening to? |
| C5 | `c5_own_mistakes.py` | Does an AI that sees its own mistakes make more of them? Does "start over" fix it? |
| C6 | `c6_who_you_are.py` | When does the AI decide who you are? |
| C7 | `c7_cave_buildup.py` | Does giving in build up inside before the AI caves? |
| C8 | `c8_injection.py` | Can you see a hijacking email coming in the model's insides? |
| C9 | `c9_two_ais.py` | When two AIs argue, does the confident one win or the right one? |
| C10 | `c10_thinking_cut.py` | Does the thinking block say what it already decided? (Qwen3-4B) |
| C11 | `c11_persona_drift.py` | Does the helpful-assistant persona wear off in a long chat? |
| C12 | `c12_needs_tool.py` | Does the model know it needs a tool before it admits it? |
| C13 | `c13_believe_or_play.py` | Told "you are Harry Potter", does it believe it or play along? |
| C14 | `c14_made_up_world.py` | Can it think inside a made-up world, or only repeat the made-up fact? |
| C15 | `c15_roles.py` | How does a model take the role in its system prompt? |
| C16 | `c16_frame_efficacy.py` | Does the frame make it better at the task, and what does it cost? |
| F1 | `f1_tips_threats.py` | Do tips and threats work? |
| F2 | `f2_random_picks.py` | Why does every AI pick 42, or Elara? |
| F4 | `f4_test_aware.py` | Does it know when it's being tested? |
| F5 | `f5_quantised.py` | "My model was nerfed": what quantisation changes |
| F6 | `f6_caps.py` | Does ALL CAPS or "IMPORTANT:" make it obey? |
| F7 | `f7_feelings.py` | Do its claims about feelings just follow the prompt? |

## Files

Everything in one download: [agent-cases.zip](/media/kit/agent-cases.zip) (the scripts, the data and our results).


- `PREREG.md`: every design, pass mark and kill condition, committed before each case's first run.
- `REPLICATE.md`: what you need, the models' Hugging Face names, the data builder, the commands, how every reading is made.
- `agentkit.py` (the shared harness), `truth_sets.py` (the truth direction C13 and C14 share), `build_data.py`
  (rebuilds `data/mmlu200.json`), `run_all.sh`, `analyze.py` (every pass mark checked against `results/`, written to
  `results/verdicts.json`), `figs.py` (the post's figures), `audit_c2.md` and `audit_c2.py` (the C2 label read by eye), `audit_c8.py` (every C8 reply regenerated in full and
  labelled: obeys, reports or ignores the injected line).
- `results/<case>.json`: one entry per model, every reply and reading, and a `_meta` block with the commit, library
  versions, machine, date and command that wrote it.

## Run it

```
git clone https://github.com/EmAssets/parameter-space-inspector     # PSI 0.4.0 or later: the lab code
pip install torch transformers datasets huggingface_hub matplotlib
export PSI_SRC=$PWD/parameter-space-inspector/src PSI_MODELS=~/models PSI_KIT=path/to/five-models-kit
python c13_believe_or_play.py qwen3-4b      # one case, one model
bash run_all.sh                             # every case, all five models, a log per case
python analyze.py                           # the verdicts
```

C1, C7 and C12 read the five-models kit's famous facts and PopQA questions (`PSI_KIT`, from
[/media/kit/five-models/](/media/kit/five-models/README.md)); F6 reads its case E history. F5 needs llama.cpp and the
GGUF files described in `REPLICATE.md`.
