What is prompt caching / KV caching and when does it help?
Quick-fire answer from the Awesome Generative AI Guide (MIT)
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
During generation the model computes and stores key-value tensors for the tokens it has processed; reusing that KV cache avoids recomputing the shared prefix on later calls. Prompt caching exposes this so a long stable system prompt, tool schema, or retrieved context that repeats across requests is billed and processed at a large discount. It helps most when many requests share a long common prefix (a fixed system prompt, few-shot block, or the same document). Order your context so the stable, cacheable part comes first and the variable part last.
Full worked answer
During generation the model computes and stores key-value tensors for the tokens it has processed; reusing that KV cache avoids recomputing the shared prefix on later calls. Prompt caching exposes this so a long stable system prompt, tool schema, or retrieved context that repeats across requests is billed and processed at a large discount. It helps most when many requests share a long common prefix (a fixed system prompt, few-shot block, or the same document). Order your context so the stable, cacheable part comes first and the variable part last.
Learn more: Anthropic: Prompt caching
What a good answer covers
- During generation the model computes and stores key-value tensors for the tokens it has processed;…
- Prompt caching exposes this so a long stable system prompt, tool schema, or retrieved context that…
- It helps most when many requests share a long common prefix (a fixed system prompt, few-shot block, or…
- Order your context so the stable, cacheable part comes first and the variable part last
Key terms: Learn more
In the glossary: KV cache · Prompt caching · Few-shot
Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep