Practice free →
HomeClaudeaifoundationsmany_shot_in_context_learning › KV caching is used in many-shot experiments to

KV caching is used in many-shot experiments to

AConvert exemplars into a vector database
BReduce the inference cost per prompt
CIncrease the maximum context window size
DAvoid retraining the model between rounds
Answer & Solution
Correct answer: B. Reduce the inference cost per prompt
KV caching reuses key/value tensors from prior tokens so a long shared prefix (the many-shot exemplars) is computed once. This makes the inference cost of many-shot regimes manageable.
Solve this in the app — Claude practice & 24k+ MCQs →
Related questions