Skip to content

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.

Choose a question

← Looser: more reuse, more wrong answersStricter: fewer mistakes, more misses →

Already in the cache

  • “How do I reset my password?”Cached 3 hours ago · valid for 7 days
  • “What’s the pound to euro exchange rate?”Cached 26 hours ago · valid for 1 hour · expired

Question → cache decision → answer source

Exact match

  1. Question“I’ve forgotten my password. How can I change it?”
  2. User context: passedA general question: the same answer can apply to anyone.
  3. Exact match: failedThe wording differs from every cached question, so exact matching finds nothing.
  4. 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

  1. Question“I’ve forgotten my password. How can I change it?”
  2. User context: passedA general question: the same answer can apply to anyone.
  3. Similarity: passedSimilarity 0.92 ≥ threshold 0.90 (illustrative score).
  4. Freshness: passedCached 3 hours ago; valid for 7 days.
  5. 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