An Ensemble Embedding Approach for Improving Semantic Caching Performance in LLM-based Systems

Shervin Ghaffari, Zohre Bahranifard, Mohammad Akbari
7/8/2025
cs.LG

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Semantic caching enhances the efficiency of large language model (LLM) systems by identifying semantically similar queries, storing responses once, and serving them for subsequent equivalent requests. However, existing semantic caching frameworks rely on single embedding models for query representation, which limits their ability to capture the diverse semantic relationships present in real-world query distributions. This paper presents an ensemble embedding approach that combines multiple embedding models through a trained meta-encoder to improve semantic similarity detection in LLM caching systems. We evaluate our method using the Quora Question Pairs (QQP) dataset, measuring cache hit ratios, cache miss ratios, token savings, and response times. Our ensemble approach achieves a 92\% cache hit ratio for semantically equivalent queries while maintaining an 85\% accuracy in correctly rejecting non-equivalent queries as cache misses. These results demonstrate that ensemble embedding methods significantly outperform single-model approaches in distinguishing between semantically similar and dissimilar queries, leading to more effective caching performance and reduced computational overhead in LLM-based systems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ghaffari2025ensemble,
  title  = {An Ensemble Embedding Approach for Improving Semantic Caching Performance in LLM-based Systems},
  author = {Shervin Ghaffari and Zohre Bahranifard and Mohammad Akbari},
  year   = {2025},
  eprint = {2507.07061},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.07061v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.07061.svg)](https://codeofpaper.com/paper/2507.07061)

Discussion