AI by Hand ✍️

AI by Hand ✍️

Quadratic Cost

Adding Up the Turns

Prof. Tom Yeh's avatar
Prof. Tom Yeh
Aug 19, 2026
∙ Paid

Library › Context Problems

  1. The Context Window

  2. Window Occupancy

  3. Growth per Turn

  4. Remaining Space

  5. Turn Budget

  6. Retrieval Footprint

  7. Retrieval per Turn

  8. Search Rounds

  9. Window Sizing

  10. Truncation

  11. Compaction

  12. The Compaction Bill

  13. Compacted Retrieval

  14. The Compaction Threshold

  15. Verbatim Tail

  16. Stateless API

  17. Retrieval Cost

  18. Context Tax

  19. Quadratic Cost

  20. Cost Forecast

Adding four numbers is easy. Adding a hundred is not, and a conversation does not stop at four. The input goes up by the same step every turn, and a run of numbers like that has an equation: multiply the number of turns by the next number up, halve it, then scale by the step. Work the small case by hand first, then check the equation against what you got. Two numbers decide the total: k, what one turn adds, and n, how many turns there have been. k is fixed by the agent, so shortening its answers drops every total, while n is the conversation itself, and because it appears twice, doubling it does not double the total.

Paid members: the worksheet and its printable PDF are below ↓

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2026 Tom Yeh · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture