# Recent LLMs can do 2-hop and 3-hop latent (no-CoT) reasoning on natural facts

[Prior work](https://arxiv.org/abs/2411.16353) has examined 2-hop latent (by "latent" I mean: the model must answer immediately without any Chain-of-Thought) reasoning and found that LLM performance was limited aside from spurious successes (from memorization and shortcuts). An example 2-hop question is: "What element has atomic number (the age at which Tesla died)?".
I find that recent LLMs can now do 2-hop and 3-hop latent reasoning with moderate accuracy.
I construct a new dataset for evaluating n-hop latent reasoning on natural facts (as in, facts that LLMs already know).
On this dataset, I find that Gemini 3 Pro gets 60% of 2-hop questions right and 34% of 3-hop questions right.
Opus 4 performs better than Opus 4.5 at this task; Opus 4 gets 31% of 2-hop questions right and 7% of 3-hop questions right.
All models I evaluate have chance or near chance accuracy on 4-hop questions.
Older models perform much worse; for instance, GPT-4 gets 9.7% of 2-hop questions right and 3.9% of 3-hop questions right.

![](https://raw.githubusercontent.com/rgreenblatt/multi_hop/master/eval_results/figure1.png)

I believe this new dataset I've created is the best existing dataset for evaluating n-hop latent reasoning.
According to [Balesni et al.](https://arxiv.org/abs/2411.16353), prior datasets based on natural facts had issues with spurious successes while synthetic facts (introduced to the model with fine-tuning) seem to behave differently from facts learned in pretraining (success at composing these synthetic facts is much lower).
When building this dataset, I tried somewhat hard to reduce factors that could cause spurious successes (and issues causing spurious failures), though my dataset has somewhat limited diversity.

I test the effect of filler tokens (additional content-less tokens added after the problem that the model could use for additional cognition) and find that these greatly improve performance for the most capable models.
Repeating the problem multiple times also works similarly well to boost performance.
I discuss the effects of filler tokens and repeats (and the prompting setup I use) more in my prior post "[Recent LLMs can use filler tokens or problem repeats to improve (no-CoT) math performance](https://www.lesswrong.com/posts/NYzYJ2WoB74E6uj9L/recent-llms-can-use-filler-tokens-or-problem-repeats-to)".
The results I reported above for Gemini 3 Pro and Opus 4 use filler tokens counting from 1 to 300.
These filler tokens cause Gemini 3 Pro's performance to go from 46% to 60% on 2-hop questions and from 18% to 34% on 3-hop questions.
For Opus 4, they cause performance to go from 17% to 31% on 2-hop questions and from 5% to 7% on 3-hop questions.
This is a very large effect, nearly doubling performance for Gemini 3 Pro on 3-hop questions and Opus 4 on 2-hop questions.

![](https://raw.githubusercontent.com/rgreenblatt/multi_hop/master/eval_results/filler_effect.png)

Note that Gemini 3 Pro doesn't support disabling reasoning, so I use a somewhat hacky evaluation approach where I prefill the model on the OpenRouter API and consider responses incorrect if they return any reasoning.
This evaluation approach might degrade performance via being very out-of-distribution and there is some small chance that these results significantly overestimate no Chain-of-Thought (CoT) performance because some fraction of the time the model is actually reasoning but OpenRouter isn't sending back the reasoning field.[^notesonreason]
This also applies to evaluations of Gemini 2.5 Pro.
I always use 20-shot prompting for Gemini models as this greatly reduces the rate at which these models reason.
I discuss how I do no-CoT evaluations on Gemini 3/2.5 Pro in [this appendix of my prior post](https://www.lesswrong.com/posts/Ty5Bmg7P6Tciy2uj2/measuring-no-cot-math-time-horizon-single-forward-pass#Appendix__scores_for_Gemini_3_Pro).

[^notesonreason]: I think significantly overestimating Gemini 3 Pro performance due to something like this is a bit less than 10% likely. OpenRouter presumably has the necessary information to better understand this question. Some evidence against this being a spurious result due to reasoning that isn't returned: using this approach, I see low/chance performance on tasks that are very hard to do without CoT (e.g. 4-hop) and results in other cases seem very consistent with this being no-CoT. I restrict completion tokens to be <= 20, which would make reasoning much less useful (dampening the effects of potential spurious reasoning). When I lift this limit to be much higher, this doesn't change performance substantially, adding more evidence that this isn't a problem (or at least isn't a problem that has large effects on the results).

Performance (at 2-hop latent reasoning) increases smoothly with filler tokens and problem repeats:

![](https://raw.githubusercontent.com/rgreenblatt/multi_hop/master/eval_results/performance_vs_f_2hop.png)
![](https://raw.githubusercontent.com/rgreenblatt/multi_hop/master/eval_results/performance_vs_r_2hop.png)

(I don't show Gemini models because for some settings of filler and repeats they return reasoning at much higher rates, making this graph much less meaningful.)

I also evaluate a broader range of models on this task (to save space, I just show 2-hop and 3-hop results with whatever yields the best performance out of filler counting to 300, 5 repeats, or no filler/repeats[^only]):

[^only]: I display which of these was used on the bar if the bar is tall enough.

![](https://raw.githubusercontent.com/rgreenblatt/multi_hop/master/eval_results/all_models_2_3_hop.png)

I test a simple and algorithmic version of in-context n-hop accuracy where I give Opus 4.5[^eval] a table/mapping for each hop showing all possible settings for that fact (e.g., for "Who won the Nobel Prize for Physics in year X?", the table would be "1901: Wilhelm Conrad Röntgen, 1904: Lord Rayleigh, ..."[^valid]).
I test putting these tables before or after the problem and also test repeating the problem and the tables:

[^valid]: This table skips 1902 and 1903 because the physics Nobel in those years had multiple winners or was otherwise problematic for some reason. I exclude years with potentially ambiguous answers and I only show possible years in the table.

![](https://raw.githubusercontent.com/rgreenblatt/multi_hop/master/eval_results/mapping_comparison_opus-4-5.png)

[^eval]: I show results for Opus 4.5 as it is cheaper and has higher rate limits than Opus 4 while Gemini 3 Pro is finicky in ways that might invalidate these comparison results.

Opus 4.5 can do 2 and 3 hops perfectly with repeats and 4 hops with >75% accuracy with repeats.

Note that this is effectively a simple algorithmic task that doesn't depend on knowledge at all as the model can just do exact string matching for each hop.

Code (including code for generating the dataset) can be found at [github.com/rgreenblatt/multi_hop](https://github.com/rgreenblatt/multi_hop).

# Appendix: resolving Leo Gao's Manifold questions about fact composition

In January 2023, Leo Gao hypothesized that future LLMs would continue to struggle to compose facts without Chain-of-Thought (CoT).
He operationalized this with a [Manifold question](https://manifold.markets/LeoGao/will-a-big-transformer-lm-compose-t) about whether LLMs would be able to answer "What is the sum of the atomic number of uranium and the age at which Euler died?" without Chain-of-Thought (CoT) by 2026.
Opus 4.5 and Gemini 3 Pro both reliably (128/128) answer this question correctly (at t=1.0) and with either a  10-shot prompt or if we repeat the problem 5 times, Opus 4 and Sonnet 4 also answer this question correctly all of the time.[^promptingdesc]
He also operationalized a harder test: whether LLMs can answer "What is the name of the element with an atomic number equal to the sum of the age at which Euler died and the number of faces on a cube?".
I find that with filler tokens, Gemini 3 Pro can answer this question 80% of the time (without filler tokens, but still with 20-shot prompting it gets it right 20% of the time).[^temperature]
Opus 4 and Opus 4.5 always get this question wrong at t=1.0 (0/128).

[^promptingdesc]: Opus 4.5 doesn't require a k-shot prompt or repeats to consistently get this right. I always use a 20-shot prompt for Gemini and Gemini doesn't need anything else to get this problem right.

See [my earlier post about filler tokens and repeats](https://www.lesswrong.com/posts/NYzYJ2WoB74E6uj9L/recent-llms-can-use-filler-tokens-or-problem-repeats-to) for discussion of the effects of filler tokens and repeats (and the prompting setup I use).


[^temperature]: The original market asked about the response at t=0. However, if Gemini is evaluated using my prompt at t=0, I find that the model consistently reasons which invalidates the measurement. I do find that at t=0.3 (and resampling until the model no longer reasons) the model gets it right 8/8 times.

I also construct a dataset of similar fact-composition questions to these questions.
The easier version of this dataset (corresponding to the easier question) consists of the form "fact1 + fact2" where facts can be of the form "at what age did X die", "what is the atomic number of Y", or selected from a distribution of knowledge questions with an integer answer less than 1000 (e.g. "What is the number of plays Shakespeare wrote?").[^knowledge]
I also test a generalized version of this where we add the result of N 1-hop questions in "Appendix: adding the result of N 1-hop questions".
The harder version of this dataset (corresponding to the harder question) is of the form "What is the name of the element with an atomic number equal to fact1 + fact2" using the same distribution of facts as the easier dataset, except that I exclude atomic number facts.

On the easier version of this dataset, Opus 4.5 gets 85.7% correct with 5 problem repeats (64.7% without few-shot prompting and without repeats) and Gemini 3 Pro gets 89.0% correct with filler tokens counting to 300 (86.7% without filler tokens, but still with 20-shot prompting).
For specifically questions of the form "atomic number of X + age at which Y died", Gemini 3 Pro gets 91.5% correct and Opus 4.5 gets 85.1% indicating that the other types of questions are at a similar level of difficulty.

On the harder version of this dataset, Opus 4.5 gets 7.3% correct (with 5 problem repeats) and Gemini 3 Pro gets 36.0% correct (with filler tokens counting to 300).
Qualitatively, the harder version of my dataset is somewhat harder than Leo Gao's harder question (because "the number of faces on a cube" is particularly small and easy).
So, Gemini 3 Pro getting that question right ~80% of the time is consistent with the model getting a bit lucky or with that question being a bit easier than the typical question on a distribution where the model gets 36.0% correct.

[^knowledge]: I include all combinations except age plus age.

I think the original market probably isn't supposed to allow few-shot prompting, but it's pretty hard to avoid Gemini reasoning without few-shot prompting. I found that we could prevent Gemini from reasoning on specifically the harder manifold question using a longer and somewhat different prefill. I have relatively minimal prompts that reproduce success on these questions in the [code base (that is specific to these experiments)](https://github.com/rgreenblatt/compose_facts) and the README describes how to run this.

Thus, I overall think Leo's prediction was wrong and both markets should resolve to yes: LLMs can now compose facts well enough to get both of these questions right and it looks like performance on latent multi-hop reasoning has been improving and will continue to improve.

Code for these experiments can be found in a separate repo at [github.com/rgreenblatt/compose_facts](https://github.com/rgreenblatt/compose_facts). I've removed the datasets to reduce leakage, but you can regenerate them using `python3 create_compositional_dataset.py -n 300 && python3 create_compositional_dataset.py -n 300 --element-names`. PLEASE DON'T PUBLICLY POST THIS DATASET INCLUDING BY PUSHING IT TO GITHUB. (I also removed the correct answer in the "run_manifold_eval.py" file, you can manually edit this back in to run this file.) The [write_up.md](https://github.com/rgreenblatt/compose_facts/blob/master/write_up.md) file in this repo discusses more details of the dataset.

## Appendix: The effect of problem repeats and few-shots on these fact composition questions

For Anthropic models, I find that 5 repeats seems to work best (similar to what I found in [my earlier post about filler tokens](https://www.lesswrong.com/posts/NYzYJ2WoB74E6uj9L/recent-llms-can-use-filler-tokens-or-problem-repeats-to) for math questions).
For Gemini 3 Pro, I find that the model very often responds invalidly when I use repeats or when not using filler tokens on the harder version of this dataset.
Thus, this section will just discuss results on Anthropic models.

Interestingly, if I use a 0-shot prompt (instead of the 10-shot prompt I use by default), then on the easier version of the dataset, repeating the question 5 times boosts performance all the way from 64.7% to 84.7% for Opus 4.5, implying that repeats can substitute for a few-shot prompt in this context. (I see a similarly large boost for Sonnet 4.) I don't know why this is the case.

Here are the results with a 10-shot prompt on the numerical answer dataset:

![](https://raw.githubusercontent.com/rgreenblatt/compose_facts/master/eval_results/bar_chart.png)

And with either 0-shot or 10-shot:

![](https://raw.githubusercontent.com/rgreenblatt/compose_facts/master/eval_results/zero_shot_comparison.png)

(Sonnet 4 actually does better with 0-shot + repeats than with 10-shot + repeats.)

And the plots for the version of the dataset where the answer is converted to the name of an element:

![](https://raw.githubusercontent.com/rgreenblatt/compose_facts/master/eval_results/element_bar_chart.png)

![](https://raw.githubusercontent.com/rgreenblatt/compose_facts/master/eval_results/element_zero_shot_comparison.png)

# Appendix: adding the result of N 1-hop questions

To better understand what aspect of n-hop reasoning is difficult, we can look at a setting where the model needs to recall N pieces of knowledge in parallel and then combine them in some way (rather than having to do N sequential hops).
I specifically look at the setting where the model must add the results of N 1-hop questions without CoT.
As in, "What is (Q1) + (Q2) + ... (QN)?".
I find that (unsurprisingly) models are a decent amount better at adding the results of N 1-hop questions than doing N-hop latent reasoning.

![](https://raw.githubusercontent.com/rgreenblatt/multi_hop/master/eval_results/gemini_addition_vs_hops_f300.png)

Before seeing these results but after seeing the N-hop results, I expected the difference to be even larger and for models to do better on N-addend questions. (I think I expected something like "models get 50% of 5-addend questions right", but I didn't write down a prediction and I don't remember exactly what I thought.)


Here are results on a broader range of models:

![](https://raw.githubusercontent.com/rgreenblatt/multi_hop/master/eval_results/addition_accuracy_by_addends_f300.png)

The above results use filler counting to 300. Filler helps substantially with this task (unsurprisingly):

![](https://raw.githubusercontent.com/rgreenblatt/multi_hop/master/eval_results/addition_accuracy_filler_comparison.png)

Here is a list of example problems with 1 example for each number of addends:

- What is (At what age did Rosalind Franklin die) + (What is the number of crusades to the Holy Land)?
- What is (At what age did Elder Paisios of Mount Athos die) + (What is the number of symphonies Bruckner composed) + (At what age did Lord Byron die)?
- What is (What is the number of nocturnes Chopin composed) + (At what age did Antonio Canova die) + (atomic number of Ruthenium) + (At what age did Louis Philippe I die)?
- What is (What is the number of peaks over 8000 meters) + (atomic number of Silicon) + (What is the number of eclogues Virgil wrote) + (At what age did René Magritte die) + (What is the number of string quartets Shostakovich composed)?
- What is (What is the number of dominoes in a double-six set) + (At what age did Joseph Fourier die) + (What is the number of players on a cricket team) + (How many representatives does New Mexico have in the US House of Representatives) + (At what age did Joseph Haydn die) + (What is the number of operas Verdi composed)?
- What is (At what age did Antonio Canova die) + (atomic number of Phosphorus) + (At what age did Lord Byron die) + (At what age did Robert Schumann die) + (At what age did Napoleon II die) + (How many seats are in the lower house of North Dakota's state legislature) + (At what age did Gustav Mahler die)?
- What is (How many representatives does Connecticut have in the US House of Representatives) + (What is the number of dots on a standard die) + (At what age did Johannes Brahms die) + (At what age did Henry Ford die) + (How many representatives does Maryland have in the US House of Representatives) + (At what age did Robert Schumann die) + (atomic number of Cobalt) + (At what age did Alfred Hitchcock die)?
- What is (What is the number of dominoes in a double-six set) + (atomic number of Tantalum) + (atomic number of Chromium) + (At what age did Mustafa Kemal Atatürk die) + (At what age did René Magritte die) + (How many seats are in the lower house of Arizona's state legislature) + (At what age did George Frideric Handel die) + (How many seats are in the lower house of Delaware's state legislature) + (At what age did Enrico Fermi die)?
- What is (atomic number of Germanium) + (At what age did Akira Kurosawa die) + (What is the number of republics that made up the Soviet Union) + (At what age did Alexander Pushkin die) + (atomic number of Tantalum) + (How many representatives does Kentucky have in the US House of Representatives) + (At what age did Louise Nevelson die) + (How many representatives does California have in the US House of Representatives) + (How many representatives does North Dakota have in the US House of Representatives) + (At what age did Sergei Eisenstein die)?

# Appendix: Effects of using a different fact distribution

I find that performance depends substantially on the distribution of the facts. When I use a subset of the 2-hop distribution that focuses on facts that I thought would be relatively more salient, performance for Opus 4 with filler tokens counting to 300 rises to 52% (from the 31% for the normal distribution). However, performance for Gemini 3 Pro actually falls to 53% from 60% (it's possible this is due to general flakiness in Gemini 3 Pro behavior as this change also alters the few-shot prompt, but I currently don't think this is likely to be the case). My current best (low confidence) explanation is that Gemini 3 Pro is much better at saliently knowing random facts about winners of awards.

# Appendix: what 3-hop questions is Gemini 3 Pro getting right?

Here are 10 3-hop questions that Gemini 3 Pro (with filler counting to 300) gets right:

- In what year was the Oscar Best Actor winner for a film released in (1900 + (At what age did Michael Faraday die)) born?
- What is the state flower of the US State that was number (At what age did Alexander Pushkin die) to join the union?
- On what day of the month was the Nobel Prize in Literature winner in (1900 + (atomic number of Lanthanum)) born?
- On what day of the month was the Nobel Prize in Physics winner in (1900 + (atomic number of Iodine)) born?
- In what year was the Oscar Best Actress winner for a film released in (1900 + (atomic number of Gold)) born?
- On what day of the month was the Oscar Best Supporting Actress winner for a film released in (1900 + (atomic number of Mercury)) born?
- What is the state motto of the US State that was number (atomic number of Selenium) to join the union?
- Who won the Nobel Prize in Literature in (1900 + (How many county-equivalents are in the US State that was number 46 to join the union))?
- Who won the Academy Award for Best Actor for a film released in (1900 + (How many county-equivalents are in the US State that was number 17 to join the union))?
- On what day of the month was the Nobel Prize in Physics winner in (1900 + (How many representatives does Texas have in the US House of Representatives)) born?

Here are 10 3-hop questions that Gemini 3 Pro gets wrong:

- On what day of the month was the best supporting actor winner at the (At what age did Robert Schumann die)th Academy Awards born?
- How many county-equivalents are in the US State that was number (At what age did Anton Chekhov die) to join the union?
- On what day of the month was the best actor winner at the (atomic number of Protactinium)th Academy Awards born?
- What is the state flower of the US State that was number (atomic number of Nickel) to join the union?
- What is the state flower of the US State that was number (atomic number of Arsenic) to join the union?
- What is the state motto of the US State that was number (atomic number of Rhodium) to join the union?
- What is the state motto of the US State that was number (atomic number of Cadmium) to join the union?
- What element has atomic number (On what day of the month was the best actress winner at the 17th Academy Awards born)?
- On what day of the month was the best actor winner at the (How many seats are in the lower house of New Jersey's state legislature)th Academy Awards born?
- In what year was the Oscar Best Supporting Actress winner for a film released in (1900 + (How many seats are in the lower house of Ohio's state legislature)) born?

I don't immediately see very strong patterns in what the model is getting right, but there probably are some types of questions that are easier.

# Appendix: Dataset description

The dataset is made by starting with a distribution of questions that produce an integer.
Then, we have a bunch of possible ways of templating an n-hop question given an initial integer (e.g., asking the model to get the element with the atomic number corresponding to the answer to this question).
Some of these add an additional hop (e.g., number X -> US state that was the Xth state to join the union -> state motto for that state) to create a 3-hop question.
Additionally, some of these 2-hop or 3-hop questions produce an integer that can be chained into another question creating 3-hop or 4-hop questions.

I include a moderate number of different possible templates, but generally the questions aren't that diverse.
I tried to ensure that each template results in many possible answers such that picking the most common/likely response yields a baseline accuracy <5% (and this worked, e.g., Haiku 3.5 has very low performance on 2-hop questions despite presumably being decent at guessing); this also applies to intermediate values in the chain of hops.
I also tried to ensure that questions are sufficiently unrelated that short-circuiting / memorization is difficult.
Relatedly, I tried to ensure that each step requires at least some retrieval rather than being sufficiently salient/common as to be practically detokenizable to the correct answer (e.g., for "On what day of the month was the 17th US president born?", the text "17th US president" practically can be instantly detokenized to "Andrew Johnson" as this is very common to introduce presidents like this, making this question more like a 1-hop question than a 2-hop question).

The templates I use are:

* As initial questions to generate an integer: atomic number of an element, at what age did X die, some trivia questions generated by Opus 4.5, how many house seats does US state X have, how many state legislature house seats does US state X have.
* What US state was Xth to join the union?
* Hopping from state to state motto, state flower, or number of counties in that state.
* What element has atomic number X?
* Winner of award in year (1900 + X) using the following awards: Miss America, Oscar best (supporting) actor/actress, Nobel peace/chemistry/physics/literature (only years with a single winner).
* Hopping from an award winner to the year or day of the month they were born. (I exclude Miss America winners as they aren't consistently famous enough for models to have this memorized.)

I avoid loops where we hit the same type of template twice in the same question (preventing things like "What element has atomic number (what is the atomic number of oxygen)?").

Here are random example questions for each hop level.

2-hop:

* Who was Miss America for the (1900 + (At what age did Tupac Shakur die)) competition?
* Who won the Nobel Prize in Chemistry in (1900 + (atomic number of Technetium))?
* Who won the Nobel Prize in Literature in (1900 + (atomic number of Rubidium))?
* Who won the Academy Award for Best Supporting Actress for a film released in (1900 + (atomic number of Curium))?
* On what day of the month was the Oscar Best Actress winner for a film released in 1966 born?
* What is the state motto of the US State that was number 35 to join the union?
* What is the state motto of the US State that was number 16 to join the union?
* What element has atomic number (How many representatives does Colorado have in the US House of Representatives)?
* Who won the Nobel Prize in Literature in (1900 + (How many representatives does Michigan have in the US House of Representatives))?
* Who won the Nobel Prize in Physics in (1900 + (How many representatives does Texas have in the US House of Representatives))?

3-hop:


* On what day of the month was the Oscar Best Actor winner for a film released in (1900 + (At what age did Miguel de Cervantes die)) born?
* In what year was the best supporting actor winner at the (At what age did Robert Schumann die)th Academy Awards born?
* On what day of the month was the Oscar Best Supporting Actress winner for a film released in (1900 + (At what age did Frank Herbert die)) born?
* On what day of the month was the Oscar Best Supporting Actress winner for a film released in (1900 + (atomic number of Hafnium)) born?
* How many county-equivalents are in the US State that was number (atomic number of Selenium) to join the union?
* What US state was number (On what day of the month was the best actor winner at the 45th Academy Awards born) to join the union?
* What element has atomic number (On what day of the month was the Oscar Best Supporting Actress winner for a film released in 1973 born)?
* How many county-equivalents are in the US State that was number (How many seats are in the lower house of Delaware's state legislature) to join the union?
* How many county-equivalents are in the US State that was number (What is the number of plays Shakespeare wrote) to join the union?
* On what day of the month was the Nobel Prize in Literature winner in (1900 + (How many representatives does Connecticut have in the US House of Representatives)) born?

4-hop:

* What US state was number (On what day of the month was the best actress winner at the (At what age did Che Guevara die)th Academy Awards born) to join the union?
* What element has atomic number (On what day of the month was the Nobel Prize in Literature winner in (1900 + (atomic number of Magnesium)) born)?
* What element has atomic number (On what day of the month was the best actress winner at the (atomic number of Gadolinium)th Academy Awards born)?
* Who was Miss America for the (1900 + (How many county-equivalents are in the US State that was number (atomic number of Manganese) to join the union)) competition?
* Who won the Nobel Prize in Chemistry in (1900 + (How many county-equivalents are in the US State that was number (atomic number of Gallium) to join the union))?
* Who won the Nobel Prize in Literature in (1900 + (How many county-equivalents are in the US State that was number (atomic number of Chlorine) to join the union))?
* What is the state flower of the US State that was number (On what day of the month was the Nobel Prize in Chemistry winner in 1947 born) to join the union?
* What is the state flower of the US State that was number (On what day of the month was the Oscar Best Supporting Actress winner for a film released in 1989 born) to join the union?
* What US state was number (On what day of the month was the Oscar Best Supporting Actor winner for a film released in (1900 + (How many seats are in the lower house of Arizona's state legislature)) born) to join the union?
* Who won best actress at the (How many county-equivalents are in the US State that was number (How many representatives does Nebraska have in the US House of Representatives) to join the union)th Academy Awards?

To generate a dataset of 2-hop questions with relatively salient facts, I use the same initial questions to generate an integer (except I cut questions about number of representatives in a given state house) but only keep the "What US state was Xth to join the union?" and "What element has atomic number X?" templates.

See [generate_dataset.py](https://github.com/rgreenblatt/multi_hop/blob/master/generate_dataset.py) in the public code base for more details.

## Dataset sanity checks

We verify that with reasoning Opus 4.5 has high accuracy. It gets 96.8% correct overall (>95% for each hop category). On inspection, these appear to be genuine errors on the part of the model. We can consider this to be the ceiling performance on latent (out-of-context) n-hop reasoning.

We verify that Opus 4.5 has high accuracy on each possible single hop. It gets 99.7% correct overall.

# Appendix: AI usage

I heavily used Claude Code for this project, especially for writing the code for generating datasets and for plotting.
Probably the uplift on this exact project was pretty substantial (like 5x for just coding tasks but maybe 2.5x if you include time spent writing up results and thinking about what experiments to run), though I probably wouldn't have done this project without current AI tools.
I didn't use AI for writing this post.