Prompt caching cut one agent's prompt costs by 73% without changing its rules

A developer describes a small recipe agent whose prompt was reworked in four steps while the model, rules, and wording stayed the same. The original design placed a constantly changing date at the top, so the cache wrote every prompt but never read one back, making the test evening costlier than having no cache. Moving the date to the user message and placing per-person details after the shared instructions let later messages reuse most of their prompt. The author also found that the tool list, which differed by subscription plan, blocked cache reuse, and fixed it by sending the same list to everyone and enforcing plan limits separately. Across the evening, the prompts ended up 73% cheaper, and the whole test cost less than a cent.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in