arrow
Return

ContextCache: Context-Aware Semantic Cache for Multi-Turn Queries in Large Language Models

delete2025-08-01
delete1
PRE
AI
J
Jianxin Yan *
W
Wangze Ni
陈蕾 cover
陈蕾 (Lei Chen)
林学民 (Xuemin Lin)
P
Peng Cheng
Z
Zhan Qin
K
Kui Ren
DOI:10.14778/3750601.3750679delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Semantic caching significantly reduces computational costs and improves efficiency by storing and reusing large language model (LLM) responses. However, existing systems rely primarily on matching individual queries, lacking awareness of multi-turn dialogue contexts, which leads to incorrect cache hits when similar queries appear in different conversational settings. This demonstration introduces ContextCache, a context-aware semantic caching system for multi-turn dialogues. ContextCache employs a two-stage retrieval architecture that first executes vector-based retrieval on the current query to identify potential matches and then integrates current and historical dialogue representations through self-attention mechanisms for precise contextual matching. Evaluation of real-world conversations shows that ContextCache improves precision and recall compared to existing methods. Additionally, cached responses exhibit approximately 10 times lower latency than direct LLM invocation, enabling significant computational cost reductions for LLM conversational applications.

Journal

P
Proceedings of the VLDB Endowment
IF:
3.3
Papers:
553
Citations:
1.2W

Organization

T
tongji university
Scholars:
7.7W
Papers: 5.9W
Citations: 98
S
Shanghai Jiao Tong University
Scholars:
7.8K
Papers: 2.4K
Citations: 14.8W
Z
zhejiang university
Scholars:
17.4W
Papers: 12.0W
Citations: 152
researcher View more organizations