Building with AILesson 75 of 80

Module 8 · Cost, latency and running it in production

Routing and cascades: paying the high price only where it is needed

In this lesson

  • 9 min read
  • 8 reading sections
  • Knowledge check
  • Lesson 5 of 10 in this chapter

This chapter’s goalProduce a cost and latency budget for an AI feature at a stated scale, defend each line of it with a measurement, and operate the feature through a provider outage, a model deprecation and a tenfold traffic increase without an unplanned bill or an unplanned outage.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 9Free · no account needed
Lesson steps

The shape of real traffic

Look at a week of requests to any assistant and most of them are simple: a factual question with a clear answer in the corpus, a greeting, a request to rephrase something. A small fraction are hard: multi-step reasoning, an ambiguous question, a long document, a tool sequence. The frontier model earns its price on the hard fraction and wastes it on the rest. Routing is sending each request to the cheapest model that handles it, and it is the largest cost lever after the batch window in most products.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Python, from Zero, for AI exam.

Stuck on something?Ask Sayali, your AI tutor

How to cite: Addaly (2026) ‘Routing and cascades: paying the high price only where it is needed’, in Building with AI. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/building-with-ai/routing-and-cascades (Accessed: 27 November 2026).