Log-Augmented Generation: Scaling Test-Time Reasoning with Reusable Computation
Peter Baile Chen, Yi Zhang, Dan Roth, Samuel Madden, Jacob Andreas, Mike Cafarella
Abstract
While humans naturally learn and adapt from past experiences, large language models (LLMs) and their agentic counterparts struggle to retain reasoning from previous tasks and apply them in future contexts. To address this limitation, we propose a novel framework, log-augmented generation (LAG) that directly reuses prior computation and reasoning from past logs at test time to enhance model's ability to learn from previous tasks and perform better on new, unseen challenges, all while keeping the system efficient and scalable. Specifically, our system represents task logs using key-value (KV) caches, encoding the full reasoning context of prior tasks while storing KV caches for only a selected subset of tokens. When a new task arises, LAG retrieves the KV values from relevant logs to augment generation. Our approach differs from reflection-based memory mechanisms by directly reusing prior reasoning and computations without requiring additional steps for knowledge extraction or distillation. Our method also goes beyond existing KV caching techniques, which primarily target efficiency gains rather than improving accuracy. Experiments on knowledge-and reasoning-intensive datasets demonstrate that our method significantly outperforms standard agentic systems that do not utilize logs, as well as existing solutions based on reflection and KV cache techniques. 1 Query 2: When was the most recent Bicycle Friendly Community Award given to the city where the company Study in Brown's record label is part of is headquartered? Thought process: 1. Study in Brown's record label is EmArcy Records.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Reflexion: language agents with verbal reinforcement learning cites ReAct: Synergizing Reasoning and Acting in Language Models
- GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning cites ReAct: Synergizing Reasoning and Acting in Language Models
- GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning cites Reflexion: language agents with verbal reinforcement learning
Cited by top-tier papers1
Builds on4
- Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
- Buffer of Thoughts: Thought-Augmented Reasoning with Large Language ModelsLing Yang, Zhaochen Yu, Tianjun Zhang, Shiyi Cao et al.NeurIPS 2024 · 144 citations
- TurboRAG: Accelerating Retrieval-Augmented Generation with Precomputed KV Caches for Chunked TextSongshuo Lu, Hua Wang, Yutian Rong, Zhi Chen et al.EMNLP 2025 · 2 citations
- ReAct: Synergizing Reasoning and Acting in Language ModelsShunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du et al.ICLR 2023
Related papers
- a1: Steep Test-time Scaling Law via Environment Augmented GenerationLingrui Mei, Shenghua Liu, Yiwei Wang, Baolong Bi et al.ACL Findings 2026
- LTRAG: Enhancing Autoformalization and Self-refinement for Logical Reasoning with Thought-Guided RAGRuikang Hu, Shaoyu Lin, Yeliang Xiu, Yongmei LiuACL Findings 2025
- Reflective RAG: Self-Evaluation Driven Strategy Optimization in Agentic Retrieval-Augmented GenerationHaiyan Wu, Chenchen Wang, Chaoqun Sun, Chengxiong Lu et al.ACL Findings 2026 · 1 citation
- StructRAG: Boosting Knowledge Intensive Reasoning of LLMs via Inference-time Hybrid Information StructurizationZhuoqun Li, Xuanang Chen, Haiyang Yu, Hongyu Lin et al.ICLR 2025
- Empowering GraphRAG with Knowledge Filtering and IntegrationKai Guo, Harry Shomer, Shenglai Zeng, Haoyu Han et al.EMNLP 2025 · 2 citations
