BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack
Yuri Kuratov, Aydar Bulatov, Petr Anokhin, Ivan Rodkin, Dmitry Sorokin, Artyom Sorokin et al. · 2024 · 136 citationsRead the paper
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.
What the full text shows
Working prototype- Popular LLMs effectively utilize only a small fraction of their advertised context window. — 10-20% of context (General evaluation across popular LLMs)
- Most LLMs fail to maintain satisfactory performance (>85% accuracy) beyond 4K tokens for single-fact tasks. — <85% accuracy beyond 4K tokens (QA1 task (single supporting fact))
- Recurrent memory transformers (ARMT) can process extremely long sequences after fine-tuning. — up to 50 million tokens (Fine-tuned ARMT)
- RAG methods show limited effectiveness for single-fact QA regardless of length. — 60% accuracy (Single-fact question answering)
- High-performing models for single-fact tasks (QA1) extend further than others. — up to 64K tokens (Qwen-2.5-70b and Gemini Pro 1.5)
- Performance drops sharply as reasoning complexity increases. — Best scores <80% for QA3 (Tasks requiring three supporting facts)
- Setup
- Benchmark includes 20 tasks with data splits up to 10 million tokens; tested models include GPT-4, Gemini Pro 1.5, Llama-3.1, Qwen-2.5, and fine-tuned small models (RMT/ARMT 137M, Mamba 130M).
- How
- The authors developed the BABILong benchmark consisting of 20 reasoning tasks (fact chaining, induction, deduction, etc.) where facts are embedded in long natural texts from PG19 and Wiki. They evaluated various LLMs, RAG systems, and recurrent memory models (RMT, ARMT, Mamba) across context lengths ranging from 0 to 50 million tokens.
- Limitations
- Background texts were limited to PG19 and Wiki, which may influence results. · RAG retrieval components were not optimized. · Limited vocabulary in fact generation may make tasks easier for fine-tuned models. · Recurrent models have reduced parallelizability due to their sequential nature.
Summarized by Gemma 4 from the open-access full text · 15 Nov 2026. Read it