# Semantic caching

> Semantic caching: Returning a stored answer when a new query's embedding is similar enough to a stored query's, above a threshold. Raises the hit rate…

Canonical: https://llmdojo.dev/glossary/semantic-caching

Also called semantic cache.

Returning a stored answer when a new query's embedding is similar enough to a stored query's, above a threshold. Raises the hit rate, but can return the answer to a different question.

Learn it in the lesson: [Semantic caching and wrong hits](https://llmdojo.dev/learn/inference-optimization/caching-repeated-work/semantic-caching) (Inference and Model Optimization · Caching Repeated Work: Prompts, Prefixes and Answers).

## Related
- [Prompt caching](https://llmdojo.dev/glossary/prompt-caching)
- [Exact caching](https://llmdojo.dev/glossary/exact-caching)
- [Glossary of every term](https://llmdojo.dev/glossary)
