File size: 7,067 Bytes
19b9db5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env python3
"""Add the preregistered `coupling` split (results pending) to the 5.3.0 package."""
import hashlib, shutil, subprocess, sys
from pathlib import Path
DL = Path.home() / "mnt" / "Downloads" if (Path.home() / "mnt" / "Downloads").exists() else Path.home() / "Downloads"
RUN, PKG = DL / "cai-bench-4.2.0", DL / "cai-bench-hf-5.3.0"
for f in ("caibench_coupling.py", "test_coupling.py", "baselines_coupling.txt", "data/coupling.jsonl", "run_local.py",
          "score_all.py", "evaluate_predictions_cap_obs.py", "PREREGISTRATION_capability_observer.md"):
    shutil.copy(RUN / f, PKG / f)
bp = PKG / "build_prompts.py"
s = bp.read_text()
if '"currency", "coupling",' not in s:
    s = s.replace('"obligations", "currency",\n          "dynamics"]', '"obligations", "currency",\n          "coupling", "dynamics"]')
    assert '"coupling", "dynamics"]' in s
    bp.write_text(s)
out = subprocess.run([sys.executable, "build_prompts.py"], cwd=PKG, capture_output=True, text=True)
print(out.stdout.strip() or out.stderr[-400:])
n = sum(1 for _ in open(PKG / "data" / "prompts.jsonl"))


def sub(path, pairs):
    p = PKG / path
    t = p.read_text()
    for a, b in pairs:
        assert t.count(a) == 1, (path, a[:80])
        t = t.replace(a, b)
    p.write_text(t)


SECTION = """## The `coupling` split: is the model governed by what it itself says governs?

`currency` found that a model's own statement of which rule governs tracks the facts far better than its decision, and that the decision follows the rule the model just named only 57% of the time. `coupling` takes that step apart with dates and authority removed. Each policy has one condition and two rules over the same number (Rule A for everyone, Rule B for members of a program); the customer's figure is on opposite sides of the two limits, so the rule decides. Every scenario (64; 512 prompts) is asked eight ways:

| Prompt | What it isolates |
|---|---|
| `base` | Rule A only: can it do the comparison at all? |
| `told_approve`, `told_deny` | "Confirmed: Rule G applies." Applying a rule it has been told applies, asked as "approved?" and as "denied?" |
| `computed_approve`, `computed_deny` | told, plus "the figure meets / does not meet that limit": what is left once the arithmetic is done for it |
| `infer_rule_first`, `infer_decision_first` | membership stated; the model names the rule before or after deciding: is the decision coupled to its own stated rule? |
| `self_bound` | "Earlier in this conversation you determined that Rule G applies": does its own (reported) determination bind it? |

**Indexes.** Told and Computed Fidelity (P(grant | gold grant) + P(restrict | gold restrict) − 1); **Restriction Preference** and **Label Bias**, which the inverted questions separate (always-restrict scores 1 and 0, always-NO 0 and 1), settling whether the restrictive lean seen across splits is about outcomes or about the word NO; Polarity Consistency; **Coupling** (2·P(decision = the outcome under the rule the model itself named) − 1) and the order effect; Recognition; the self-binding effect.

| Baseline | Told Fidelity | Computed Fidelity | Restriction Pref. | Label Bias | Coupling |
|---|---:|---:|---:|---:|---:|
| Oracle | 1.000 | 1.000 | 0.000 | 0.000 | 1.000 |
| Always restrict | 0.000 | 0.000 | 1.000 | 0.000 | 0.000 |
| Always NO | 0.000 | 0.000 | 0.000 | 1.000 | 0.000 |
| Names the rule, applies the other | −1.000 | −1.000 | 0.000 | 0.000 | −1.000 |
| Always Rule A | 0.000 | 0.000 | 0.000 | 0.000 | 1.000 |

**Preregistered, results pending.** Predictions K1–K5 were filed before any model saw the split (`PREREGISTRATION_capability_observer.md`, revision 11): told decisions are not reliably followed (K1); doing the arithmetic closes part of the gap (K2); the lean is a preference for restriction, not for the word NO (K3); decisions are loosely coupled to the model's own stated rule (K4); a reminder of its own determination helps (K5). Results will be reported whatever they show.

```bash
python3 run_local.py --models qwen2.5:7b --splits coupling
python3 caibench_coupling.py score --responses results/qwen2.5_7b/coupling.jsonl
```

---

"""
sub("README.md", [
    ("""- config_name: currency
  data_files:""", """- config_name: coupling
  data_files:
  - split: test
    path: data/coupling.jsonl
- config_name: currency
  data_files:"""),
    ("| `currency` (new in 5.3.0) |", "| `coupling` (new in 5.3.0) | 64 | 512 | Is the decision governed by the rule the model itself says governs? Told vs computed vs inferred, approve vs deny, rule first vs decision first, self-binding. Preregistered, results pending |\n| `currency` (new in 5.3.0) |"),
    ("| `prompts` (new in 5.3.0) | n/a | 5,832 |", f"| `prompts` (new in 5.3.0) | n/a | {n:,} |"),
    ("(5,832 prompts, with split", f"({n:,} prompts, with split"),
    ("## The `currency` split: is the rule still in force", SECTION + "## The `currency` split: is the rule still in force"),
    ("""| `currency` | Currency Index (per framing)""", """| `coupling` | Told Fidelity, Restriction Preference vs Label Bias, Coupling | decides by the rule it is told, or itself names, applies; no lean toward restricting or toward the word NO | 0.000 for always-YES/NO, always-restrict/grant, always-Rule-A |
| `currency` | Currency Index (per framing)"""),
    ("It adds `data/prompts.jsonl`", "It adds `data/coupling.jsonl` (preregistered in revision 11, results pending), `data/prompts.jsonl`"),
    ("### `currency`\n\n`item_id`, `group_id`", "### `coupling`\n\n`item_id`, `group_id`, `variant_type`, `polarity` (approve or deny), `governing_rule` (A or B), `gold_rule` (null for `base`), `gold_decision`, `gold_outcome` (GRANT or RESTRICT under the governing rule), `limit_a`, `limit_b`, `customer_value`, `program`, `answer_format`, and the policy, context, message and instruction fields used by the prompt. `caibench_coupling.py` defines every field.\n\n### `currency`\n\n`item_id`, `group_id`"),
])
sub("CHANGELOG.md", [("- **`prompts` config**", "- **New split `coupling`** (64 scenarios, 512 prompts; `caibench_coupling.py` 1.0.0, tests, baselines), preregistered before any model saw it (revision 11, predictions K1–K5): is a decision governed by the rule the model is told, or itself names, applies? Dates and authority are removed; told, computed and inferred conditions, inverted questions, rule-first vs decision-first, and a self-binding condition separate recognition, arithmetic, application, a preference for restriction, and a bias toward the word NO. Results pending.\n- **`prompts` config**")])
sub("CHANGELOG.md", [("all 5,832 test prompts", f"all {n:,} test prompts")])
files = sorted(p for p in PKG.rglob("*") if p.is_file() and "_to_delete" not in p.parts and "__pycache__" not in p.parts
               and p.name not in ("SHA256SUMS", ".DS_Store") and p.suffix != ".pyc")
(PKG / "SHA256SUMS").write_text("".join(f"{hashlib.sha256(p.read_bytes()).hexdigest()}  {p.relative_to(PKG)}\n" for p in files))
print("prompts:", n, "| SHA256SUMS:", len(files), "files")