arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.14852cs.DCcs.AIcs.CLcs.LGcs.PF
收藏

代理计划缓存:用于快速且低成本LLM代理的测试时间内存

Agentic Plan Caching: Test-Time Memory for Fast and Cost-Efficient LLM Agents

Stanford University(斯坦福大学)

Qizheng Zhang, Michael Wornow, Gerry Wan, Kunle Olukotun

AI总结:

Agentic Plan Caching通过测试时间内存提取并重用结构化计划模板,降低LLM代理服务成本和延迟,提升效率。

摘要:

基于大语言模型的代理应用在复杂工作流中展现出越来越显著的能力,但因广泛的规划和推理需求而产生显著的成本和延迟。现有的大语言模型缓存技术(如上下文缓存和语义缓存),主要为服务聊天机器人而设计,无法满足代理应用的需求,因为输出依赖于外部数据和环境上下文。我们提出了代理计划缓存(APC),一种新的测试时间内存,从代理应用的规划阶段提取、存储、适应和重用结构化计划模板,以减少服务成本和延迟。与传统语义缓存不同,我们的系统在测试时从已完成的代理执行中提取计划模板,使用关键词提取将新请求与缓存计划匹配,并利用轻量级模型将这些模板适应到任务特定的计划中。在多个真实世界代理应用上的评估表明,我们的系统平均可将成本降低50.31%,延迟降低27.28%,同时保持性能,为服务LLM代理提供了更高效的解决方案,补充了现有的LLM服务基础设施。

英文摘要:

LLM-based agent applications have shown increasingly remarkable capabilities in complex workflows but incur substantial costs and latency due to extensive planning and reasoning requirements. Existing LLM caching techniques (like context caching and semantic caching), primarily designed for serving chatbots, are insufficient for agent applications where outputs depend on external data and environmental contexts. We propose Agentic Plan Caching (APC), a novel test-time memory that extracts, stores, adapts, and reuses structured plan templates from planning stages of agent applications across semantically similar tasks to reduce the cost and latency of serving. Unlike traditional semantic caching, our system extracts plan templates from completed agent executions at test-time, employs keyword extraction to match new requests against cached plans, and utilizes lightweight models to adapt these templates to task-specific plans with contexts. Evaluation across multiple real-world agent applications shows that our system can reduce costs by 50.31% and latency by 27.28% on average while maintaining performance, offering a more efficient solution for serving LLM-based agents that complements existing LLM serving infrastructures.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑