arXiv:2611.01077cs.LGOct 2026

Manuscript Offprint

arXiv:2611.01077

Multi-Turn Semantic Caching for Low-Cost LLM Serving

Baran Atalar, Selly Beyene, Xutong Liu, Carlee Joe-Wong

ABSTRACT

Semantic caching lowers the cost of serving large language models (LLMs) by reusing stored responses for similar requests. In multi-turn conversations, whether a cached response is acceptable depends on both conversations' histories, which embedding similarity of requests and histories predicts poorly (AUC 0.62–0.74 on five workloads). We therefore learn the reuse risk, the probability that a cached response is unacceptable, from judge feedback, and choose a budgeted set of conversation states to cache by weighing the generation cost a reuse avoids against a price for unacceptable reuse. We propose CUCB-SC-MT, which learns a cache from logged conversations with a suboptimality guarantee, and CLCB-LS-MT, which learns online and has O~(N)\tilde{O}(\sqrt{N}) regret over NN requests when conversation states recur. On math-tutoring (SocraTeach) and movie-ticketing (Taskmaster-3) conversations, both achieve lower loss than prior semantic caching approaches: ContextCache, multi-turn variants of ElastiCache and vCache, and single-turn semantic caching at every cache budget. With 1,000 cache entries, CLCB-LS-MT avoids 35–41% of the generation cost through acceptable reuses, against at most 22–25% for the baselines, and lowers estimated serving latency by 19–35%.

1 INTRODUCTION

Serving large language models (LLMs) is expensive, and much of the work repeats: about 31% of ChatGPT users' queries are similar to earlier ones (Gill et al., 2025). Semantic caching answers a new request with the stored response of a similar earlier one and skips token generation entirely (Bang, 2023; Gaspar Schroeder et al., 2026), thus lowering serving cost and latency. Recent work gives such caches cost guarantees, both offline and online (Liu et al., 2026; Atalar et al., 2026). Cloud providers also offer semantic caching as a service (Amazon Web Services, 2026).

These guarantees treat each request as a standalone query, but LLM traffic is conversational: 73% of ShareGPT conversations have several turns (Gao et al., 2024). The same follow-up, such as “Yes, that’s right” in a ticket booking, calls for different replies under different histories, so whether a cached response is acceptable depends on a pair of conversation states, the current one and the one whose response is cached, and the probability that it is not, the reuse risk, is unknown. Yet multi-turn semantic caches still threshold an embedding similarity, computed on the recent messages or on the request followed by a context check (Gill et al., 2025; Yan et al., 2025; Yu et al., 2026), and single-turn analyses take the cost of a mismatch to be a known function

Figure

Figure 1. AUC for acceptable reuse of embedding distance and of a learned reuse risk when each follow-up turn is served by its nearest state (request and history) in another conversation and an LLM judge rates the reuse. Right: AUC gain of the learned risk (95% CI). The risk model is fixed on WildChat (Appendix D.1).

of embedding distance (Atalar et al., 2026).

Figure 1 shows that distance is a poor proxy in conversations. We took five workloads: open-domain chat (WildChat (Zhao et al., 2024)), movie-ticket booking (Taskmaster-3 (Byrne et al., 2021)), math tutoring (SocraTeach (Liu et al., 2024)), document-grounded assistance (MultiDoc2Dial (Feng et al., 2021)) and customer service (ABCD (Chen et al., 2021)). We matched every follow-up turn to its nearest state (request and history) in another conversation and asked an LLM

¹Carnegie Mellon University, Pittsburgh, PA, USA ²University of Washington Tacoma, Tacoma, WA, USA. Correspondence to: Baran Atalar batalar@andrew.cmu.edu.

Preprint. Under review.

judge whether the cached response would be acceptable. Distance ranks acceptable reuse poorly (AUC 0.62–0.74). A reuse-risk model learned from judge labels with kernel regression on features that compare the two requests, their histories, the cached response and the turn positions, ranks it better on every workload (AUC +0.06 to +0.20), with one configuration fixed on open-domain WildChat. At 80% judge precision it serves 2.2× as many Taskmaster-3 follow-ups as a distance threshold (38.9% vs. 17.3%).

Learning this risk while serving is hard: it lives on pairs of states whose histories grow with every turn and is revealed only by judge labels on reuses, while generation costs are revealed only by LLM calls; turns of a conversation are correlated; and choosing what to cache is NP-hard. Our contributions are:

  • Model (Sections 2–3): multi-turn semantic caching over conversation states with a learned reuse risk and a price for unacceptable reuse. Given the costs and risks, Reverse Greedy chooses the cache and keeps its approximation guarantee for learned, masked and asymmetric reuse losses.

  • Offline learning (Section 4): The learning algorithm CUCB-SC-MT, whose suboptimality bound holds for arbitrarily dependent turns and adds a reuse-risk term evaluated only along the comparator's decisions.

  • Online learning (Section 5): Our proposed algorithm CLCB-LS-MT, which freezes its policy within each conversation, labels a random fraction of reuses and rarely recomputes its cache. Its regret is O~(N)\tilde{O}(\sqrt{N}) over NN requests when conversation states recur, although its net is built from correlated turns.

  • Evaluation (Section 6): on math tutoring (SocraTeach) and movie-ticket booking (Taskmaster-3), our algorithms have the lowest loss at every cache budget, offline and online, against ElastiCache, ContextCache, vCache, a joint-state threshold and single-turn caching.

Related work. GPTCache (Bang, 2023) serves the nearest cached response above a similarity threshold. For conversations, MeanCache (Gill et al., 2025) also compares each entry's context chain, ContextCache (Yan et al., 2025) refines the match with self-attention over the dialogue history, and SmartCache (Yu et al., 2026) detects context shifts from the LLM's attention scores; vCache (Gaspar Schroeder et al., 2026) learns a threshold per entry to meet an error-rate target. None weighs a reuse against the generation cost it saves. Learning formulations (Liu et al., 2026; Atalar et al., 2026), similarity caching (Garetto et al., 2020) and online caching with regret guarantees (Paschos et al., 2019) take the mismatch cost as given while we learn the reuse risk itself. KV and prefix caching (Kwon et al., 2023; Gao et al., 2024; Gim

Figure

Figure 2. Multi-turn semantic caching system.

et al., 2024; Zheng et al., 2024) reuses computation within a request and complements response reuse, and cascades and routers (Chen et al., 2023; Ong et al., 2025) choose which model answers. Unlike generic combinatorial bandits (Chen et al., 2013), CUCB-SC-MT and CLCB-LS-MT choose a cache whose loss couples a learned cost with a learned risk on pairs of states, and learn from correlated turns that reveal the risk only on sampled reuses.

References (51)