7/16
Part 3 of 6 · Route and batchLearn and do

A small model answers first, and only the hard questions go on

Most of the shop's questions are about order status and return windows, and a small model can answer them. Some aren't. One way to handle both: Haiku answers every question first, a check decides whether its answer is good enough, and the rest go on to Sonnet. Both models read the shared prompt from their caches.

small_first adds up that bill for a month of requests.

haiku_hit = cached_cost(HAIKU, 1800, 60, 250, True)
sonnet_hit = cached_cost(SONNET, 1800, 60, 250, True)
for sent_on in (0.1, 0.2, 0.5):
    print(f"{sent_on:.0%} sent on to Sonnet: ${small_first(haiku_hit, sonnet_hit, sent_on, 3_600_000):,.0f} a month")
print(f"all on Sonnet: ${sonnet_hit * 3_600_000:,.0f} a month")
print(f"it costs as much as Sonnet alone at {1 - haiku_hit / sonnet_hit:.0%} sent on")
Predict

Every request pays for Haiku, and the ones sent on pay for Sonnet too. With 20% sent on, what's the bill, against $10,080 for Sonnet alone?

Pick one to see what it prints.
Pick an answer above to see the rest