Lune

NeurIPS2025Top-tier venue

Generative Caching for Structurally Similar Prompts and Responses

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

2025Year
5Citations

Abstract

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 , a generative cache that produces variation-aware responses for structurally similar prompts. identifies reusable response patterns across similar prompt structures and synthesizes customized outputs for new requests. We show that achieves 83% cache hit rate, while having minimal incorrect hits on datasets without prompt repetition. In agentic workflows, it improves cache hit rate by ∼\sim20% and reduces end-to-end execution latency by ∼\sim34% compared to standard prompt matching.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 6bd25c1e-a20d-4109-a97e-a4f31ca95465

Builds on24

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines