Request Order Matters: Cache-History Sensitivity in Selective KV-Cache Reuse for Rolling Agents
Tiffany Gu, Annie Guan, Manshu Huang, Nitin Rao, Siddhant Shah, Margaret Capetz
Abstract
Long-running agents repeatedly call an LLM while retaining most of their document window, evicting old documents, and appending new ones. These rolling updates break exact prefix caching and motivate non-prefix KV-cache reuse with selective recomputation. We show that persistent KV-cache reuse with selective recomputation can be history-dependent: in our rolling-agent workload, an unchanged prompt can produce different answers depending on the requests processed before it. At a matched 5% recomputation budget, document-aligned recomputation reduces answer variation across request orders from 69.0% with CacheBlend's token top- policy to 26.1%. When each prompt is evaluated after a different sequence of preceding requests, document-aligned recomputation improves fidelity to full prefill by 34.5-52.5 percentage points over token top-, while both policies achieve approximately 5.7 median TTFT speedup. Our ablation study shows that, in our rolling-agent workload, contiguity is the main factor associated with robust selective recomputation.
Create a lesson
Metadata
- Categories
- cs.AI, cs.LG, cs.PF
- Comments
- 10 pages, 5 figures
Related papers
Reducing Order Sensitivity in Decision Models
Shared title terminologycs.AIBodong Liu, Dongyoung Go, Sofian Zalouk et al.
LiveLoRA: Exact KV Cache Migration Across LoRA Updates for LLM Agents
Shared title terminologycs.AITianyi Huang, Samuel Xu, Ivy Gu et al.
Testing Quantized KV-Cache Maintenance: Encoding Layout and Historical Restoration
Shared title terminologycs.AIZiyang Huang, Songwei Wu
DMC-5: Dual-Model Collaboration with Cache-aware Context Compression for Long-horizon Agents
Shared title terminologycs.AIHaochen Li, Xiaobing Tu, Yinggui Wang et al.
Does an Agent's History Tell You When Compaction Will Hurt? A Modest, Bounded Effect on the TRACE Paired-Replay Corpus
Shared title terminologycs.AIEgor Pakhomov, Erik Nijkamp
Personal-Agent Mediated Recommendation with Cross-Platform User History
Shared title terminologycs.AIYu Xia, Jiangfan Zhang, Jun Xiao et al.