Advancing Semantic Caching for LLMs with Domain-Specific Embeddings and Synthetic Data

Waris Gill, Justin Cechmanek, Tyler Hutcherson, Srijith Rajamohan, Jen Agarwal +3 more
4/3/2025
cs.LGcs.CL

No confident code implementation found for this paper.

Abstract

This report investigates enhancing semantic caching effectiveness by employing specialized, fine-tuned embedding models. Semantic caching relies on embedding similarity rather than exact key matching, presenting unique challenges in balancing precision, query latency, and computational efficiency. We propose leveraging smaller, domain-specific embedding models, fine-tuned with targeted real-world and synthetically generated datasets. Our empirical evaluations demonstrate that compact embedding models fine-tuned for just one epoch on specialized datasets significantly surpass both state-of-the-art open-source and proprietary alternatives in precision and recall. Moreover, we introduce a novel synthetic data generation pipeline for the semantic cache that mitigates the challenge of limited domain-specific annotated data, further boosting embedding performance. Our approach effectively balances computational overhead and accuracy, establishing a viable and efficient strategy for practical semantic caching implementations.

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. Any repos shown below are weak matches — 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{gill2025advancing,
  title  = {Advancing Semantic Caching for LLMs with Domain-Specific Embeddings and Synthetic Data},
  author = {Waris Gill and Justin Cechmanek and Tyler Hutcherson and Srijith Rajamohan and Jen Agarwal and Muhammad Ali Gulzar and Manvinder Singh and Benoit Dion},
  year   = {2025},
  eprint = {2504.02268},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.02268v1}
}

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/2504.02268.svg)](https://codeofpaper.com/paper/2504.02268)

Discussion