mlsanityData to 7 Oct 2026

LLMs for Test Input Generation for Semantic Caches

arXiv 2401.08138 ↗First posted 16 Jan 2024cs.SE cs.AIcited by 4

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) enable state-of-the-art semantic capabilities to be added to software systems such as semantic search of unstructured documents and text generation. However, these models are computationally expensive. At scale, the cost of serving thousands of users increases massively affecting also user experience. To address this problem, semantic caches are used to check for answers to similar queries (that may have been phrased differently) without hitting the LLM service. Due to the nature of these semantic cache techniques that rely on query embeddings, there is a high chance of errors impacting user confidence in the system. Adopting semantic cache techniques usually requires testing the effectiveness of a semantic cache (accurate cache hits and misses) which requires a labelled test set of similar queries and responses which is often unavailable. In this paper, we present VaryGen, an approach for using LLMs for test input generation that produces similar questions from unstructured text documents. Our novel approach uses the reasoning capabilities of LLMs to 1) adapt queries to the domain, 2) synthesise subtle variations to queries, and 3) evaluate the synthesised test dataset. We evaluated our approach in the domain of a student question and answer system by qualitatively analysing 100 generated queries and result pairs, and conducting an empirical case study with an open source semantic cache. Our results show that query pairs satisfy human expectations of similarity and our generated data demonstrates failure cases of a semantic cache. Additionally, we also evaluate our approach on Qasper dataset. This work is an important first step into test input generation for semantic applications and presents considerations for practitioners when calibrating a semantic cache.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 6 of its 16 references that are in the map. First posted on arXiv 16 Jan 2024.

Builds on

6 of 16 references.

References · 6

  1. 2023Software Testing with Large Language Models: Survey, Landscape, and Visioncited by 163
  2. 2022Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproductioncited by 110
  3. 2023Prompting Large Language Models for Zero-Shot Domain Adaptation in Speech Recognitioncited by 48
  4. 2022Fill in the Blank: Context-aware Automated Text Input Generation for Mobile GUI Testingcited by 36
  5. 2023LLM for Test Script Generation and Migration: Challenges, Capabilities, and Opportunitiescited by 19
  6. 2023Beyond Testers' Biases: Guiding Model Testing with Knowledge Bases using LLMscited by 9

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 3.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Semantic Caching for Low-Cost LLM Serving: From Offline Learning to Online Adaptation
  2. 2026Asynchronous Verified Semantic Caching for Tiered LLM Architectures
  3. 2025IC-Cache: Efficient Large Language Model Serving via In-context Caching
  4. 2026LLMs taking shortcuts in test generation: A study with SAP HANA and LevelDB
  5. 2026Continuous Semantic Caching for Low-Cost LLM Serving
  6. 2025Tuning LLMs by RAG Principles: Towards LLM-native Memory
  7. 2025Cache-to-Cache: Direct Semantic Communication Between Large Language Models
  8. 2024Let your LLM generate a few tokens and you will reduce the need for retrieval