Stable prefix and caching
A section of the "Prompting and context" topic. The questions check an understanding of practice, not memory of specific library APIs. After each answer comes a review: why the correct option is right, what is wrong with each incorrect one and which chapter to read.
Quiz difficulty Formats: one correct option, several correct options, the faulty line, sorting into groups
Quiz 1.4Stable prefix and cachingStart practice Practice has no timer and a review after every answer.
01
What we check
- A stable context prefix and the KV cache
- What resets the prefix cache
- The line that breaks the cache
- What is recomputed when the prefix changes
- Harmful context management tricks
- KV cache and prompt cache
- How to update the state line
02
Where to read
- Li, AI Agents in Depthsec. 2.3 · sec. 2.3.2 · sec. 2.3.3 · sec. 2.6.4
- Huyen, AI Engineeringch. 9