April 2026
Intermediate
395 pages
13h 22m
English
Prompt caching is a new approach developed by Anthropic and is provided currently only as a beta feature. Recall that passing a complete document to the LLM with every request is inefficient. While still true, Anthropic has developed an approach that addresses this problem. Figure 6.9 shows how the concept of prompt caching works.
Figure 6.9 Prompt Caching
With prompt caching, the user sends a request to the LLM. In this request, the user passes the query together with the complete document. Wait, what? Didn’t we just say that sending the complete is extremely inefficient?
Yes, but the user also tells the model ...
Read now
Unlock full access