Loading lesson…
KV-cache locality: the prefix must survive
DetailedOverviewQuizFlashcard
KV-cache locality: the prefix must survive
Repair lab (Module 7, L7.4): a simulated provider bills the longest shared prefix on the same tier at a cached fraction (illustration). Three layout habits zero the cache -- a varying token at the head, nondeterministic tool-result order, and retries that switch tiers. Starter: 0.0 percent hit, $6.0720 total, $0.1518/turn, LOCALITY FAIL. Fix all three: 95.5 percent hit, $0.0254/turn, $1.0176 total (~6.0x). The harness must stay correct at zero hit rate; caching only changes price. In-memory only; no provider call.
This Harness Engineering lesson is part of a paid plan. Sign in with a plan that includes this course to read it.