CCDV-F practice question 5 of 10
Your application uses the Messages API to handle multi-turn conversations. Each new turn resends the entire conversation history, and your token costs are growing as conversations get longer. You suspect there is a more efficient approach. How would you address this?
Full set: 95 questionsAnthropic's Prompt Caching feature is specifically designed to optimize costs and latency for requests that share a large, static common prefix, such as the history in multi-turn conversations. By caching the system instructions and previous conversation turns, the application only pays the lower cache-read token price for the historical context on subsequent turns, drastically reducing the overall input token costs without sacrificing any conversational fidelity or context.
Option B: The Batch API is designed for asynchronous, offline processing and is unsuitable for real-time, multi-turn user conversations.
Option C: Truncating the conversation to two messages destroys the historical context, severely degrading the model's ability to maintain a coherent multi-turn interaction.
Option D: Summarizing adds latency, consumes additional tokens for the summarization calls, and loses granular details compared to native prompt caching.
1. Anthropic Official Documentation, "Prompt Caching", Section: Optimizing Multi-turn Conversations.
2. Anthropic Official Documentation, "API Reference", Section: Caching Headers and Token Usage.
Keep practicing
Take the free CCDV-F practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCDV-F practice questions
- Question 1Your Claude application is deployed to development, staging, and production environments.…
- Question 2You are building a Claude application that needs to deliver model output to end users as …
- Question 3A teammate has asked you to explain why your Claude agent's tools include detailed descri…
- Question 4The team is debating whether to build a new capability as a custom tool or to use an exis…
- Question 6A teammate has asked how to extend Claude Code with a custom Skill that the team can invo…
- Question 7A teammate has asked you to explain the difference between context engineering and prompt…
