An application frequently generates the same type of report (daily sales summary) with only the data changing each time. Which optimization strategy would MOST reduce API costs?
Select an answer to reveal the explanation.
Short Explanation
When the prompt structure stays the same and only the data changes, you cache the static system prompt and report template, so you only pay full price for the variable data tokens.
Full Explanation
Prompt caching is designed exactly for this scenario. The system prompt and report template remain constant while only the sales data changes. By caching the static prefix, subsequent calls pay cache read prices, which are significantly cheaper than full input token prices, for the cached portion and only full input prices for the new data. This can reduce input token costs by 50-90% for such use patterns. Using a higher temperature to generate more diverse reports doesn't reduce costs and would make reports inconsistent. Generating all future reports in a single API call is impossible because you can't batch-generate reports for future unknown data. Using Claude Opus for all reports would increase costs dramatically.