Lab
Same question. Different words.
See how exact-match and semantic caching decide when an earlier answer can be reused.
◇ Curated examples. Similarity scores are illustrative values, not live embeddings, and you can only choose the questions below.
Question → cache decision → answer source
Exact match
- Question“I’ve forgotten my password. How can I change it?”
- ✓ User context: passedA general question: the same answer can apply to anyone.
- ✕ Exact match: failedThe wording differs from every cached question, so exact matching finds nothing.
- Cache missAnswer from the model:
Go to Settings › Security › Reset password and follow the emailed link.
○ Missed a reusable answer
Missed: the cached answer would have been right, but exact matching only recognises identical wording.
Semantic, threshold 0.90
- Question“I’ve forgotten my password. How can I change it?”
- ✓ User context: passedA general question: the same answer can apply to anyone.
- ✓ Similarity: passedSimilarity 0.92 ≥ threshold 0.90 (illustrative score).
- ✓ Freshness: passedCached 3 hours ago; valid for 7 days.
- Cache hitAnswer from the cache:
Go to Settings › Security › Reset password. We’ll email you a link that works for 30 minutes.
✓ Correct answer reused
Reused: the cached answer is correct for this question.
Exact match: Cache miss, Missed a reusable answer. Semantic: Cache hit, Correct answer reused.
What a real implementation needs
- An embedding model to turn each question into a vector, and a vector store to search previous questions quickly.
- A threshold tuned against real examples. Measure good reuse and bad reuse on your own traffic instead of picking a number.
- Scoped cache keys. Separate entries by tenant, user where relevant, model and prompt version, so one context never answers another.
- Freshness rules. Time-to-live values and invalidation for answers that depend on changing data.
- Exclusion rules for personal, user-specific and time-sensitive questions.
- Monitoring of hit rate alongside answer quality, because a high hit rate can hide wrong answers.
The similarity scores on this page are illustrative values for a fixed set of examples. Nothing is computed live.
All Lab experiences→