Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Model routing per task complexity beats prompt trimming because it changes the per token price tier rather than nibbling at token count.
Imagine you have a team of engineers and you send every task to the most senior one. Of course your wage bill is high. The fix is not to ask the senior to type fewer words. The fix is to send the simple tickets to a junior who costs a fraction as much and only escalate the hard ones. LLM apps work the same way. Routing simple tasks like classification or extraction to a cheap, fast model and reserving the flagship for tasks that genuinely need it cuts the bill by half or more, long before you start arguing over which word in the system prompt to delete.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: price as the dominant multiplier + routing as the first lever + prompt caching second + trimming third + how to keep quality stable across tiers.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Starting cost work by trimming the system prompt token by token, when the dominant multiplier is the per token price of the flagship model you are still sending every request to.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.