Prompt caching
An LLM optimization technique that reduces response costs and latency by caching and reusing the repeating prefix of a prompt.
Detailed explanation
Why it matters when choosing tools
For services that repeatedly send the same long context (such as system instructions or manuals), prompt caching dramatically reduces costs and improves response speeds. Operational costs depend heavily on whether the tool or API supports caching, how much control you have over what to cache, and the cache retention time and discount rates.
What to look for when choosing a tool
- Does it support prompt caching, and can you specify what to cache?
- Are the cost discount rates and latency reductions on cache hits clear?
- Does the cache retention time align with your usage patterns?
- Are the retention and access policies for cached sensitive data secure?
Real-world example
For a customer support chatbot that sends a multi-page product manual with every query, caching the manual section significantly reduces processing costs and speeds up response times starting from the second question. This is because only the user's message, which changes each time, needs to be processed anew.