The Library Theorem: How External Organization Governs Agentic Reasoning Capacity
On the map: LLM reasoning → Knowledge- and tool-augmented reasoning
also in 1 more
Abstract (arXiv)
Externalized reasoning is already exploited by transformer-based agents through chain-of-thought, but structured retrieval -- indexing over one's own reasoning state -- remains underexplored. We formalize the transformer context window as an I/O page and prove that tool-augmented agents with indexed external memory achieve exponentially lower retrieval cost than agents restricted to sequential scanning: O(logb N) versus Omega(N) page reads per query, and O(T logb T) versus Theta(T2) cumulative cost over T reasoning steps -- a gap that widens as deliberation deepens. We test these predictions on a controlled lookup benchmark across three content types -- random hashes, ordered integers, and encyclopedia entries -- varying store size from 50 to 5,000 items, and replicate key conditions across two model generations (GPT-4o-mini and GPT-5.4). On abstract content, the indexed agent achieves median 1 page read regardless of store size, confirming the O(1) prediction. Sorted pages without an index fail to close the gap: the weaker model cannot sustain binary search at scale, and the stronger model achieves near-optimal log2 N search but still loses to the index by 5×. On familiar content (encyclopedia entries), a competing failure mode emerges: the model recognizes the domain, bypasses the retrieval protocol, and generates answers from parametric memory, producing catastrophic token expenditure even when the index is sound. This parametric memory competition dissociates the two cognitive operations that indexing combines: understanding content (where language models excel) and following navigational protocols (where they fail when understanding tempts them to shortcut). The result argues for a separation of concerns: use language models for index construction, where semantic understanding helps, and deterministic algorithms for index traversal, where it hurts.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 16 of its 35 references that are in the map. First posted on arXiv 22 Mar 2026.
Builds on
16 of 35 references.
Closest ancestors · 1
Same direction, newest first
Other references · 15
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,928
- 2023Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflectioncited by 1,800
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
- 2021Improving language models by retrieving from trillions of tokenscited by 1,278
- 2014Neural Turing Machinescited by 630
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 293
- 2023The Expressive Power of Transformers with Chain of Thoughtcited by 47
- 2023Memory Augmented Large Language Models are Computationally Universalcited by 45
3 more
- 2024Softmax is not Enough (for Sharp Size Generalisation)cited by 42
- 2025Lower Bounds for Chain-of-Thought Reasoning in Hard-Attention Transformerscited by 28
- 2025Constant Bit-size Transformers Are Turing Completecited by 19
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Retrieval as Reasoning: Self-Evolving Agent-Native Retrieval via LLM-Wiki
- 2026Compute Allocation for Reasoning-Intensive Retrieval Agents
- 2026ByteRover: Agent-Native Memory Through LLM-Curated Hierarchical Context
- 2026MAGMA: A Multi-Graph based Agentic Memory Architecture for AI Agents
- 2026Optimizing Agentic Reasoning with Retrieval via Synthetic Semantic Information Gain Reward
- 2026IE as Cache: Information Extraction Enhanced Agentic Reasoning
- 2026Memory is Reconstructed, Not Retrieved: Graph Memory for LLM Agents
- 2026Agent Memory: Characterization and System Implications of Stateful Long-Horizon Workloads