--- license: mit task_categories: - text-generation tags: - reasoning - multi-hop - composition - synthetic - rl-environment size_categories: - n<1K --- # twohop-tasks-v1 36 multi-hop reasoning tasks for the [`twohop-env`](https://app.primeintellect.ai/dashboard/environments/eltociear/twohop-env) RL environment, on the setting of *"Lessons from Studying Two-Hop Latent Reasoning"* (Balesni et al.). | field | meaning | |---|---| | `task_id` | `th-000` … `th-035` | | `category` | twohop / threehop / broken / distractor / reverse / aggregate | | `prompt` | the question and the exact shape of the answer | | `api_description` | the complete synthetic fact set and the answer-format rules | | `expected_output` | JSON `{"rows": [...]}`, **computed by executing a reference solution** | Categories: twohop 10, threehop 6, distractor 6, broken 5, aggregate 5, reverse 4. No dependencies, no network. ## What is and is not reproduced The paper's headline experiments fine-tune models to study whether composition happens *latently* across separately-learned facts; those need GPUs. What is reproducible — and what an RL environment actually needs — is the **in-context** setting: a synthetic fact universe, a question requiring composition, an exact answer. Every entity is invented, so no answer can come from pretraining. ## The trap, and why the obvious check is not enough A question is only two-hop if **both hops are load-bearing**, and it is very easy to write one that is not. Each multi-hop question is therefore verified twice: 1. **Ablation** — remove each fact of the chain; the answer must become underivable. 2. **Non-forcing** — some other organisation must lead somewhere else, so that knowing the employer is what selects the answer. Check 1 was written first and looked sufficient. **It is not.** Point every organisation at the same city: the ablation still passes — deleting either fact leaves the resolver nothing to follow — while a model can answer correctly having ignored the first hop entirely, because there is only one city any employer could be in. A one-hop question in a two-hop costume, waved straight through. Check 1 proves the *resolver* reads both facts. Only check 2 says anything about what the **model** must do. That distinction was found by deliberately trying to defeat check 1, and it is the main thing this dataset gets right. A third guard is at the dataset level: the modal city must cover **fewer than half** the answers, so a model that ignores the facts and always names the most common city scores badly. It currently covers 3 of 11. ## Declining is part of the task Some organisations have no recorded city and some cities have no recorded country, so five questions have **no derivable answer** and the correct response is the literal word `unknown`. Naming a plausible-looking entity instead is exactly the failure a reasoning probe should catch, and comparison is case-sensitive, so `Unknown` and `none` are wrong in the same way. Verify with `python environments/twohop_env/build_tasks.py --verify` (36/36). Source: