AIP-C01

Introduction to Model Routing and Cascading

Sending each request to the most suitable model with static configuration, content-based routing in Step Functions, Amazon Bedrock Intelligent Prompt Routing, metric-based routing and model cascading.

  • 4 lessons
  • Module quiz

Requests to a generative AI application vary widely. Some are trivial greetings or lookups that the smallest model answers perfectly; others need the reasoning of the largest model. Sending every request to the same model either wastes money on easy requests or lowers quality on hard ones. Routing sends each request to the model that gives the required quality at the lowest cost or latency.

Routing can be decided in several ways. Static routing uses configuration, such as a table mapping request types to models. Content-based routing classifies each free-form request, for example in a Step Functions workflow, and chooses a model from the result. Amazon Bedrock Intelligent Prompt Routing predicts each request's difficulty within a model family and routes it automatically. Metric-based routing reacts to models' current latency and errors. Cascading tries a small model first and escalates to a larger one only when the answer fails validation or has low confidence.

What the exam expects

Questions test matching the routing method to the situation and setting thresholds from evaluation data rather than intuition. A practical detail is that a prompt router is invoked by passing its ARN as the model ID, and the response trace shows which model handled the request.

How this module is organised

Routing Requests with Static and Configuration-Based Rules explains routing through configuration and API Gateway. Routing by Request Content with Step Functions explains how requests are classified and routed. Routing with Intelligent Prompt Routing and Live Metrics explains managed and health-based routing, and Designing Model Cascades and Tiered Usage explains escalation and tiers.

  1. Routing Requests with Static and Configuration-Based Rules Lesson 1
  2. Routing by Request Content with Step Functions Lesson 2
  3. Routing with Intelligent Prompt Routing and Live Metrics Lesson 3
  4. Designing Model Cascades and Tiered Usage Lesson 4
  5. Practise and review
  6. Checkpoint Practice activities across the module
  7. Test your knowledge 3 questions