跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2612.00909 · v1

Evaluating KV-Cache Eviction Policies for LLM Agents: The Effect on the Shared System Prompt

首次提交 2026-12-01 12:18
版本更新 2026-12-01 12:18
雷达观测 2026-12-02 23:12
arXiv ↗PDF ↗

摘要

Large Language Model (LLM) agents run long sessions that all begin with the same system prompt, which holds the agent's instructions and the documentation of its tools. Serving engines store this shared prefix once for all sessions, so removing it from the key-value (KV) cache of one session frees no memory, but the session loses the documentation that the agent needs to call its tools. Published KV-cache eviction policies treat every cached token the same way against the memory budget, so they remove the shared prefix like any other text. In this paper, we measure seven published eviction policies on recorded sessions of SWE-agent, a coding agent, and we count the memory of each session the way a serving engine does, with the shared prefix counted once for all sessions. We test four models of the Qwen2.5 and Llama-3.1 families, with 1.5 to 14 billion parameters. When a session keeps an eighth of its cache, four of the policies, which choose tokens by attention or by position, keep at most 14% of the shared prefix, and the model can rarely recall how to call its tools. Under prefix caching, keeping the whole prefix costs no extra memory per session, and it lets the model recall its tool documentation in nearly every case. Keeping the prefix also improves how often the agent's next commands follow the command format documented in the system prompt by 10 to 22 percentage points on three models. For five of the six policies that we test on recall, it never significantly lowers the recall of facts from the session's own history (the part of its input after the shared prefix). Our results show that a serving engine with prefix caching can keep the shared prefix out of eviction at no memory cost, and that the agent then recalls its tool documentation and writes valid commands more often.

作者备注:10 pages, 4 figures, 6 tables. Code and results at https://github.com/hriday1231/agent-kv-eviction

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

目前只收录了一个版本。收录下一版后,可以对照标题、作者、分类和摘要。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v1 · 2026-12-01 12:18 · 最新观测版本

Evaluating KV-Cache Eviction Policies for LLM Agents: The Effect on the Shared System Prompt

Large Language Model (LLM) agents run long sessions that all begin with the same system prompt, which holds the agent's instructions and the documentation of its tools. Serving engines store this shared prefix once for all sessions, so removing it from the key-value (KV) cache of one session frees no memory, but the session loses the documentation that the agent needs to call its tools. Published KV-cache eviction policies treat every cached token the same way against the memory budget, so they remove the shared prefix like any other text. In this paper, we measure seven published eviction policies on recorded sessions of SWE-agent, a coding agent, and we count the memory of each session the way a serving engine does, with the shared prefix counted once for all sessions. We test four models of the Qwen2.5 and Llama-3.1 families, with 1.5 to 14 billion parameters. When a session keeps an eighth of its cache, four of the policies, which choose tokens by attention or by position, keep at most 14% of the shared prefix, and the model can rarely recall how to call its tools. Under prefix caching, keeping the whole prefix costs no extra memory per session, and it lets the model recall its tool documentation in nearly every case. Keeping the prefix also improves how often the agent's next commands follow the command format documented in the system prompt by 10 to 22 percentage points on three models. For five of the six policies that we test on recall, it never significantly lowers the recall of facts from the session's own history (the part of its input after the shared prefix). Our results show that a serving engine with prefix caching can keep the shared prefix out of eviction at no memory cost, and that the agent then recalls its tool documentation and writes valid commands more often.

查看此版本解读 →查看此版本原文 ↗