Papers › BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack

BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack

14 Jun 2024arXiv:2406.10149archive 2025-07-28

Yuri Kuratov, Aydar Bulatov, Petr Anokhin, Ivan Rodkin, Dmitry Sorokin, Artyom Sorokin, Mikhail Burtsev

In recent years, the input context sizes of large language models (LLMs) have increased dramatically. However, existing evaluation methods have not kept pace, failing to comprehensively assess the efficiency of models in handling long contexts. To bridge this gap, we introduce the BABILong benchmark, designed to test language models' ability to reason across facts distributed in extremely long documents. BABILong includes a diverse set of 20 reasoning tasks, including fact chaining, simple induction, deduction, counting, and handling lists/sets. These tasks are challenging on their own, and even more demanding when the required facts are scattered across long natural text. Our evaluations show that popular LLMs effectively utilize only 10-20\% of the context and their performance declines sharply with increased reasoning complexity. Among alternatives to in-context reasoning, Retrieval-Augmented Generation methods achieve a modest 60\% accuracy on single-fact question answering, independent of context length. Among context extension methods, the highest performance is demonstrated by recurrent memory transformers after fine-tuning, enabling the processing of lengths up to 50 million tokens. The BABILong benchmark is extendable to any length to support the evaluation of new upcoming models with increased capabilities, and we provide splits up to 10 million token lengths.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.10149")

Code

Syntology Ran 7 of 8 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 7 ran with no contract checked.

By repository: official repository: 8 samples from 1 repository, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

booydar/babilong officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
InternLM/opencompass mentioned on GitHubpytorchApache-2.0 report
NVIDIA/Star-Attention mentioned on GitHubpytorchApache-2.0 report
open-compass/opencompass mentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

8 samples harvested; 7 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

7ran
1unverified

Licence: 0 of the 8 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from booydar/babilong. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

compare_answers booydar/babilong/babilong/babilong_utils.py official repository ran fingerprinted Apache-2.0 (permissive) · 13c862882ed08796 · report
compare_answers booydar/babilong/babilong/metrics.py official repository ran Apache-2.0 (permissive) · eebaceb4246b1413 · report
get_formatted_input booydar/babilong/babilong/prompts.py official repository ran Apache-2.0 (permissive) · 3a65b7efc6fb285d · report
parse_run_cfg booydar/babilong/babilong/collect_results.py official repository ran fingerprinted Apache-2.0 (permissive) · 2f19bc766480b809 · report
plot_results booydar/babilong/babilong/collect_results.py official repository ran Apache-2.0 (permissive) · afddb622e3acfafe · report
preprocess_output booydar/babilong/babilong/metrics.py official repository ran fingerprinted Apache-2.0 (permissive) · 4b85c3e1781febe5 · report
sum_lengths booydar/babilong/babilong/babilong_utils.py official repository ran Apache-2.0 (permissive) · 2da2bf2533e266ad · report
get_dataset_df booydar/babilong/babilong/babilong_utils.py official repository unverified Apache-2.0 (permissive) · 4923e6cc1a07a2fd · report

Tasks

Question AnsweringRetrieval-augmented Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SET

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections