arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2511.17565cs.CLcs.AI
收藏

生成式缓存用于结构相似的提示和响应

Generative Caching for Structurally Similar Prompts and Responses

University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Microsoft Research(微软研究院)

Sarthak Chakraborty, Suman Nath, Xuchao Zhang, Chetan Bansal, Indranil Gupta

AI总结:

本研究提出生成式缓存方法,通过识别结构相似提示的响应模式,提升缓存命中率和执行效率。

摘要:

大型语言模型(LLMs)越来越多地被用于在多样化场景中规划、推理和执行任务。在可重复的工作流和代理设置中,提示通常被重复使用,仅作轻微修改,且具有相似的结构以执行重复任务。这为缓存提供了机会。然而,精确的提示匹配在这样的结构相似提示上失败,而语义缓存可能会因忽略关键差异而产生不正确的响应。为了解决这个问题,我们引入了\ourmethod{},一种生成式缓存,能够为结构相似的提示生成变体感知的响应。\ourmethod{}在相似提示结构中识别可重用的响应模式,并为新的请求合成定制的输出。我们证明,\ourmethod{}实现了83%的缓存命中率,同时在没有提示重复的数据集上具有极小的错误命中率。在代理工作流中,它比标准提示匹配提高了约20%的缓存命中率,并将端到端执行延迟减少了约34%。

英文摘要:

Large Language Models (LLMs) are increasingly being used to plan, reason, and execute tasks across diverse scenarios. In use cases like repeatable workflows and agentic settings, prompts are often reused with minor variations while having a similar structure for recurring tasks. This opens up opportunities for caching. However, exact prompt matching fails on such structurally similar prompts, while semantic caching may produce incorrect responses by ignoring critical differences. To address this, we introduce \ourmethod{}, a generative cache that produces variation-aware responses for structurally similar prompts. \ourmethod{} identifies reusable response patterns across similar prompt structures and synthesizes customized outputs for new requests. We show that \ourmethod{} achieves 83\% cache hit rate, while having minimal incorrect hits on datasets without prompt repetition. In agentic workflows, it improves cache hit rate by $\sim$20\% and reduces end-to-end execution latency by $\sim$34\% compared to standard prompt matching.

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

↑