{"data":{"kind":"file","path":"README.md","version_id":"vhirmx2h1ngfh7567y111iqj","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":4357,"modified_at":"2026-11-26T01:18:01.410000","content_hash":"b53f683c6568a1109852f13b0d94d634282bd800e5b293e72ca4cb1b687f0281"},"entries":[],"content":"# structure-mapping\n\nAdvent of Evals, Day 3. Two stories describe two worlds with the same hidden relational structure (Gentner's\nstructure-mapping, 1983). World A is told in full. World B uses other names and other verbs, adds a few extra\ncharacters who correspond to nothing, and leaves a few facts out. The model maps every World A character to its\ncounterpart in World B, then states the World B facts the analogy implies but the story never said.\n\n### Overview\n- **Environment ID**: `structure-mapping`\n- **Short description**: carry knowledge across an analogy: map two relational worlds and predict the missing facts.\n- **Tags**: `advent-of-evals`, `analogy`, `relational-reasoning`, `single-turn`, `eval`, `train`\n\n### Task\n- **Type**: single turn, text in, text out, scored by code.\n- **Answer**: a `<mapping>` block (`the Archer = the Hazel`, one line per World A character) and a `<missing>` block\n  (one World B fact per line, active or passive voice).\n- **Reward**: 0.5 × mapping accuracy + 0.5 × F1 of the missing facts, 0 to 1. The leaderboard metric is pass@1: the\n  share of tries scoring 0.9 or more.\n\nWhat makes it hard: every kind of relation is a permutation, so each character (World B's extras included) is the\nsubject of exactly one fact of each kind and the object of exactly one. Counting facts tells you nothing; the only way\nin is to follow chains of relations and see where the worlds agree. Paths through the extras lead to wrong facts, and\na verb may correspond to another with its direction reversed.\n\n### Levels and modes\n| Level | Characters | Kinds of relation | Extras in B | Facts left out | Reversed kinds |\n| --- | --- | --- | --- | --- | --- |\n| 1 | 10 | 3 | 2 | 6 | 1 |\n| 2 | 16 | 4 | 2 | 8 | 1 |\n| 3 | 24 | 4 | 3 | 12 | 2 |\n| 4 | 30 | 5 | 3 | 15 | 2 |\n\n| `mode` | Stories |\n| --- | --- |\n| `plain` | two different settings, no surface cues |\n| `misleading` | surface traits point each of several characters to the wrong counterpart |\n| `crossmap` | the same setting and verbs in both stories; most of World A's names reappear in World B, every one on a different role, and a few World B characters (extras and counterparts alike) get new names |\n\n### Datasets\nBy default (`frozen=True`) the environment serves the frozen Day 3 task set the leaderboard was scored on: 75 eval\nand 25 train tasks (v4.1: crossmap's names redrawn so a new name doesn't mark an extra; every task re-verified; v1.2: the prompt states the 32,000-token output cap), the three modes in near-equal shares, levels weighted toward the larger worlds (eval: 6 / 23 /\n27 / 19 at levels 1-4). Every task is proven by exhaustive search to have exactly one answer under the rules the\nprompt states, and a counting shortcut (match characters by fact counts) is held below 70 on every task.\n`frozen=False` generates fresh tasks from disjoint train/eval seed streams (`num_train`, `num_eval`, `levels`).\n\n### Quickstart\n```bash\nprime env install brendanhogan/structure-mapping\nvf-eval structure-mapping -p prime -m anthropic/claude-opus-5.5 -n 5 -r 1\n```\n\nTo reproduce the leaderboard, run all 75 eval tasks with the budget every model got: reasoning effort `medium`, 32,000\noutput tokens (reasoning included, and stated in the prompt), 4 tries per task. The leaderboard number is the mean of `pass_metric` over the 300 tries.\n\n```bash\nvf-eval structure-mapping -p prime -m <model> -n 75 -r 4 -t 32000 -S '{\"reasoning_effort\": \"medium\"}'\n```\n\n### Arguments\n| Arg | Type | Default | Description |\n| --- | ---- | ------- | ----------- |\n| `mode` | str or list | all three | `plain`, `misleading`, `crossmap`, or a list |\n| `frozen` | bool | `true` | Serve the frozen leaderboard tasks; `false` generates fresh ones |\n| `levels` | list[int] | `[1, 2, 3, 4]` | Levels to generate when `frozen=false` |\n| `num_train` / `num_eval` | int | `300` / `60` | Tasks to generate when `frozen=false` |\n\n### Metrics\n| Metric | Meaning |\n| ------ | ------- |\n| `reward` / `total_reward` | 0.5 × mapping accuracy + 0.5 × missing-fact F1 (0-1) |\n| `pass_metric` | 1 if the reward is ≥ 0.9; its mean is the leaderboard's pass@1 |\n| `mapping_acc` | share of World A characters mapped to the right counterpart |\n| `missing_f1` | F1 of the stated missing facts against the true ones |\n| `decoy_capture_rate` | misleading mode: share of decoy pairs the model fell for |\n","encoding":"utf-8","truncated":false,"total_bytes":4357},"status":null}