Semantic Caching of Contextual Summaries for Efficient Question-Answering with Language Models
Camille Couturier, Spyros Mastorakis, Haiying Shen, Saravan Rajmohan, Victor Rühle
TL;DR
The paper tackles the high computational and bandwidth costs of real-time, multi-step QA with large language models by introducing semantic caching of intermediate contextual summaries. It presents a cache design that stores compressed, context-aware summaries, uses adaptive cosine similarity thresholds to determine hits, and supports both query-aware and query-agnostic summarization within retrieval-augmented generation workflows. Through comparisons with prompt-based and other caching methods, the study demonstrates that semantic caching can cut redundant computation by up to 50-60% while preserving answer quality on datasets such as NaturalQuestions, TriviaQA, and a synthetic ArXiv corpus. The work analyzes utility, latency, and cache-efficiency trade-offs, discusses deployment considerations, and identifies future directions for adaptive thresholds, scalability, privacy, and broader applications in real-world LLM systems.
Abstract
Large Language Models (LLMs) are increasingly deployed across edge and cloud platforms for real-time question-answering and retrieval-augmented generation. However, processing lengthy contexts in distributed systems incurs high computational overhead, memory usage, and network bandwidth. This paper introduces a novel semantic caching approach for storing and reusing intermediate contextual summaries, enabling efficient information reuse across similar queries in LLM-based QA workflows. Our method reduces redundant computations by up to 50-60% while maintaining answer accuracy comparable to full document processing, as demonstrated on NaturalQuestions, TriviaQA, and a synthetic ArXiv dataset. This approach balances computational cost and response quality, critical for real-time AI assistants.
