TapinYour learning

Complex · Where behavior comes from, and what it takes to run

Stable first, changing last

Most of each order request is the same every time: instructions, tool descriptions and handbook rules. Only the shelf count at the end changes. Prompt caching keeps the worked-through start of a request, so a repeat reads only the new end. Any change near the top breaks the match for everything after it. So put what stays the same first, and what changes last.

Video coming

Example

Maple Mart order request Breaks the match Today is Saturday 14:02 <- changes, at the top instructions, tool descriptions, handbook rules Keeps the match instructions, tool descriptions, handbook rules Today is Saturday 14:02 <- changes, at the end milk, 3 cases left

Try it Yourself

Milo’s request starts with the time of day. Where should that line go? Type top or end.

Exercise

How does Milo know the kept start is working?

Project: Plan one weekly job at Maple Mart
Project: Wire Maple Mart’s reorder agent, from the tool to the gateway
Project: Make Maple Mart’s order agent production-ready