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 questions
Answer options
A: Use prompt caching to reuse the static portions of the conversation context across turns instead of paying for them at the normal input-token rate on every request the application sends. Correct answer
B: Switch to the Batch API for every turn so the per-call cost is reduced, treating the batch as the team's primary cost-control mechanism for multi-turn work.
C: Truncate every conversation to the last two messages so that token usage stays low and costs remain predictable across the application's normal operation.
D: Summarize each conversation after every turn and replace the full history with the summary on the next request, reducing token count at the cost of fidelity.
Correct Answer:
A. Use prompt caching to reuse the static portions of the conversation context across turns instead of paying for them at the normal input-token rate on every request the application sends.
Explanation

Anthropic'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.

Why Incorrect

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.

References

1. Anthropic Official Documentation, "Prompt Caching", Section: Optimizing Multi-turn Conversations.

2. Anthropic Official Documentation, "API Reference", Section: Caching Headers and Token Usage.

Scroll to Top