CH 04 · Tokens, Context Windows, and the Quadratic Problem · 12/13
Read as one pageConnecting to the bigger picture
Chapter 3 built the prompt; this chapter measures it and explains why it cannot grow forever. Chapter 5 attacks the problem from both sides: caching to tame the cost curve, and compaction to stay under the window ceiling. The estimate_tokens and CostModel you wrote here become the capstone's budget meter, the thing Chapter 12 wires into a real kill switch.
Finished this idea?
Your learning progress stays in this browser.