For GPTCache, LangChain, RAG pipelines and self-built Redis caches

Your semantic cache is probably wrong more often than your dashboards show

CacheVerifier is a semantic cache verification platform for LLM apps. A similarity threshold can't tell a real cache hit from a confident-looking near-miss. Serve one of those, and if an agent treats it as fact, it's a hallucination you never chose.

<2%Gray-zone precision in our tests against real production traffic. CacheVerifier adds a synchronous verification call plus fine-tuning on your own feedback — no switching cache backends.

Read the full breakdown of why similarity fails →

Query: "When will my order arrive?"

approvedsimilarity 0.95

"In-stock items ship within 48 hours and usually arrive 2–3 days after shipping."

rejectedsimilarity 0.92

"In-stock items ship within 48 hours."

It says when the order ships, not when it arrives.

Both candidates score high on similarity — a plain threshold can't separate them. Illustrative example, not a live API call; try /v1/verify on your own pairs for free.

Architecture

Where CacheVerifier sits in your system

You keep your cache backend and decide what counts as gray-zone. CacheVerifier only runs on the candidates you route to it, and the learning loop runs asynchronously — neither ever blocks a request.

Request flow · synchronous

1Your app / agent

A user asks a question.

2Your cache backend

GPTCache, LangChain, a Redis lookup — you set the gray zone.

3POST /v1/verify

Gray-zone hits only — a confident hit skips this and serves straight from cache.

approved → serve the cached answer

rejected → call your LLM, then re-cache

Answer to the user

Async learning loop · never on the request path

4POST /v1/feedback

Was the served answer actually correct?

5Learning pipeline

Fine-tune job retrains your verifier · drift monitor watches its stability.

6Verifier recalibrated

Flows back into /v1/verify — the next gray-zone hit uses the updated model.

Higher cache correctnessLower cost and latencyContinuously improving

One line in a pipeline you already have

It implements GPTCache's own SimilarityEvaluation extension point — no fork, no PR. On LangChain, VerifiedCache wraps the cache you already use. A self-built Redis lookup? /v1/verify is a plain REST call.

pip install "cacheverifier[gptcache]"
from cacheverifier.integrations.gptcache import CacheVerifierEvaluation

cache.init(
    similarity_evaluation=CacheVerifierEvaluation(api_key="cv_..."),
    ...
)

Capabilities

What CacheVerifier gives you

Synchronous verification

Send a borderline hit, the question and the cached answer, and get approve or reject with a score in tens of milliseconds, whatever cache produced it.

Self-serve fine-tuning

Send feedback on verdicts and train a verifier on your own traffic in minutes. It's free, and it's what makes the verifier accurate.

Drift monitoring

Flags when your traffic shifts away from what your verifier was trained on, the failure that quietly turns a fine-tune harmful.

Certified risk budgets

Certify a threshold that bounds expected false-reuse risk while traffic looks like your calibration data; randomized audits keep that sample fair.

ROI, not just a hit rate

Your dashboard turns real verify volume and held-out accuracy into calls avoided, wrong hits caught and, given your LLM cost, dollars saved.

Gray-zone tuning

Replays your feedback to recommend where your cache's own cutoff should sit, so verify only runs on the hits that are genuinely uncertain.

See every endpoint in the API reference

Proof

We tried to break this before shipping it

Three questions the underlying research didn't answer — how noisy feedback can get, how little data is enough, whether gains decay over time — checked on three public benchmarks and real production traffic, not just one dataset.

Fine-tuning gain (AUC delta) vs. label noise — all three datasets cross zero in the same range

-0.13-0.06+0.00+0.07+0.130%5%10%20%30%40%LmArenaSearchQueriesQuora

~130K

benchmark-labeled gray-zone examples across multiple datasets

~30%

label-noise threshold, consistent across datasets

1,000

feedback rows before fine-tuning reliably helps everywhere

Both limits are enforced for you automatically — Health Check fails closed below the AUC bar, and fine-tune jobs hold back instead of activating once label noise clears the danger zone.

~6×

more answers reused

Live API test: where verification pays off

When 90% of reused answers had to be correct, a fine-tuned verifier reused 44% of the reusable cached answers. A tuned similarity threshold managed 7%. At looser risk levels, a good threshold did just as well.

LMArena public benchmark, 500 held-out pairs through the production API, single run, best threshold for each picked on the same data. Full results and caveats

Fit

Is this your traffic?

Verification helps a specific shape of workload, not every semantic cache. Four things that need to be true — and the honest read if they aren't.

The same question reaches you worded many different ways.

FAQ deflection, support assistants, high-volume RAG — enough of your hits are genuine paraphrases, not near-duplicates, that a similarity score has real work to do.

A wrong reused answer costs several times more than one extra model call.

The wrong refund policy, cancellation step, or dosage is expensive; a miss just costs a regeneration. With a verifier fine-tuned on your traffic, the break-even on our strongest benchmark is about 3.5×; untuned, it takes tens of times. If the two costs are close, raising your threshold for maximum hit rate is the better move.

The gray zone is a real fraction of your hits.

Not near-zero — then there's nothing to verify. Not near-everything — then your threshold is just set wrong. Somewhere in between, a verify call actually changes the outcome.

The verifier can tell your gray-zone hits apart — on your data.

Not something you can eyeball. The free Health Check measures whether the stock model, or a fine-tune on your feedback, is actually more trustworthy than raw similarity in that band.

If a Health Check shows your gray zone is Quora-shaped — where the task's own score ceiling, not your threshold, is the limit — raising the threshold is the right call and you don't need this. We'd rather tell you that before you integrate.

FAQ

Common questions

Data handling, self-hosting, SLA, fine-tuning requirements and the rest are on the full FAQ.

+What is semantic cache verification?
A semantic cache reuses a stored answer when a new question is similar enough to an old one. A similarity score measures how alike two questions look — not whether the old answer is still correct for the new one. Verification is a second check on exactly those borderline (“gray-zone”) hits: a model reads the actual (question, candidate answer) pair and judges correctness directly, instead of trusting the similarity number.
+Do I have to replace my existing cache?
No. CacheVerifier does not do similarity search or store answers. You keep whatever cache you run — GPTCache, Redis LangCache, a self-built Redis cache, LangChain — do your lookup first, and call /v1/verify only on the candidates where similarity alone isn’t a confident enough signal.
+Is it really free?
Self-serve verification and fine-tuning are free forever, and the Health Check Report is free. The paid tiers are Managed — hosted, scheduled recalibration on your production feedback plus drift monitoring — starting at $149/mo.
+When is verification worth adding — and when isn’t it?
It pays off when the same question arrives worded many different ways, a wrong reused answer costs meaningfully more than one extra model call, and the verifier is measurably more discriminative than raw similarity on your own data. If a Health Check shows your gray zone is not separable by any verifier, the honest answer is to raise your similarity threshold instead — see the research.
+Is this the same as prompt caching?
No. Prompt caching (Anthropic, OpenAI, Gemini) is a provider-side discount for reusing an exact prompt prefix and has no correctness risk. Semantic caching matches on meaning, which is what creates the gray zone verification checks. Most stacks run both — full breakdown here.
+How much latency does a verify call add?
Only on gray-zone candidates, not every request. The model forward pass is ~17ms; a full server round trip measured p50 ~33ms / p95 ~44ms / p99 ~47ms on the production no-GPU box, plus your own network hop. Every response reports latency_ms so you can measure it against your own traffic.

Get started

From first call to a managed loop

01

Start free

Register gets you a tenant, a dashboard, and an API key — no card required.

02

Point your gray zone at /v1/verify

Wherever your cache backend flags an uncertain hit — GPTCache, LangChain, a self-built Redis lookup.

03

Run a health check

See baseline vs. fine-tuned precision on a sample of your real traffic before committing to anything.

04

Let us run the loop

Move to managed calibration + drift monitoring once you know it's worth automating.

Self-serve is free forever.

Verify and fine-tuning stay free, and so does the Health Check Report. Don't want to own the retraining loop? Managed runs recalibration on a schedule, watches for drift and alerts you, from $149/mo.