TweakLLM: A Routing Architecture for Dynamic Tailoring of Cached Responses

Muhammad Taha Cheema, Abeer Aamir, Khawaja Gul Muhammad, Naveed Anwar Bhatti, Ihsan Ayyub Qazi +1 more
7/31/2025
cs.LGcs.CL

No confident code implementation found for this paper.

Abstract

Large Language Models (LLMs) process millions of queries daily, making efficient response caching a compelling optimization for reducing cost and latency. However, preserving relevance to user queries using this approach proves difficult due to the personalized nature of chatbot interactions and the limited accuracy of semantic similarity search. To address this, we present TweakLLM, a novel routing architecture that employs a lightweight LLM to dynamically adapt cached responses to incoming prompts. Through comprehensive evaluation, including user studies with side-by-side comparisons, satisfaction voting, as well as multi-agent LLM debates, we demonstrate that TweakLLM maintains response quality comparable to frontier models while significantly improving cache effectiveness. Our results across real-world datasets highlight TweakLLM as a scalable, resource-efficient caching solution for high-volume LLM deployments without compromising user experience.

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!

Cite this paper

@article{cheema2025tweakllm,
  title  = {TweakLLM: A Routing Architecture for Dynamic Tailoring of Cached Responses},
  author = {Muhammad Taha Cheema and Abeer Aamir and Khawaja Gul Muhammad and Naveed Anwar Bhatti and Ihsan Ayyub Qazi and Zafar Ayyub Qazi},
  year   = {2025},
  eprint = {2507.23674},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.23674v2}
}

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

Discussion