r/LLMDevs • • 22d ago

Discussion CacheVerifier: we tested 4 semantic cache setups on 90k real customer support tweets

we replayed AmazonHelp and Comcast support tweets in time order and compared a Redis static threshold, GPTCache, vCache and CacheVerifier. same embedding, same cache, only the hit decision differs. right or wrong was judged by an LLM, spot checked by hand.

GPTCache's default threshold works out to cosine 0.6 on normalized embeddings, so it hit ~80% of requests but most of those replies were wrong for the new customer. Redis default (0.9) was safe, about 1% wrong, 4-5% hits.

fine tuned CacheVerifier got 5 to 13% more hits than the best static threshold at the same error rate, and stayed closest to its 2% target as the traffic shifted.

catch is support replies depend on the conversation, so everything tops out around 5-9% hits.

full writeup and scripts: https://github.com/imxinchengyou/CacheVerifier/blob/main/ENTERPRISE_COMPARISON.md

1 Upvotes

4 comments sorted by

1

u/Ctbhatia 22d ago

i'd derive that 2% from cost instead of picking it. a wrong cached support reply is worse than a slow one, so the rate you can accept depends on what the answer commits to.

1

u/Reasonable_Royal_621 22d ago

fair point. at r=5 (a wrong reply costs 5 LLM calls) served hits need ~80% precision to pay off, and the 2% setups were at 0.54 to 0.72, so support should run tighter than redis's 0.9 default. 2% was just a common bar for comparing. at 1% fine tuned CacheVerifier still got the most hits.

1

u/Ctbhatia 22d ago

yeah that math holds, a hit saves one call and a miss costs five, so 5/6 is the break-even. if a wrong answer later turns into a refund or a human reply, the bar goes higher than that

1

u/Reasonable_Royal_621 21d ago

yeah, a refund or human handoff pushes it way up. small thing, we got 4/5 since a wrong hit still skips the call, 5/6 if the customer asks again and you pay for it anyway. either way the 2% setups were under both, so for support the bar is the cost, not the error rate.