Your application needs to maintain a consistent persona for Claude across all user sessions. The persona definition is 3,000 tokens and never changes. The system also includes dynamic user context injected per-request. What API design minimizes token costs while maintaining persona consistency?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — d is correct because prompt caching is the correct API mechanism for static, reused content like a persona definition. By placing the persona in the system prompt and marking it with a cache control breakpoint, the first call writes the cache (billed at base input rate) and all subsequent calls read from cache at approximately 10% of the input token cost.
Full explanation below image
Full Explanation
D is correct because prompt caching is the correct API mechanism for static, reused content like a persona definition. By placing the persona in the system prompt and marking it with a cache control breakpoint, the first call writes the cache (billed at base input rate) and all subsequent calls read from cache at approximately 10% of the input token cost. For high-volume deployments, this provides ~90% cost reduction on the persona prefix. The dynamic user context is injected after the cached prefix and is billed normally. A is wrong because user-turn messages are not automatically cached by default — prompt caching requires explicit cache control breakpoint configuration, and system prompts are the appropriate location for persona definitions (not user turns). C is wrong because Anthropic does not offer a self-service fine-tuning API for Claude models that would allow baking persona definitions into model weights; this feature does not exist as described. B is wrong because abbreviations and shorthand in a persona definition would likely change Claude's behavior in subtle ways (tone, vocabulary, consistency) and the manual compression effort is not justified when prompt caching provides a more effective and reversible cost reduction.