Routing with Intelligent Prompt Routing and Live Metrics
This lesson covers Amazon Bedrock Intelligent Prompt Routing, which predicts response quality to choose a model, and metric-based routing from live measurements of latency, errors and cost.
Learning outcomes
After completing this lesson, you will be able to:
- Configure a prompt router and its quality threshold.
- Route by live operational metrics.
Amazon Bedrock Intelligent Prompt Routing
Intelligent Prompt Routing uses a prompt router that, for each request, predicts the response quality of each model in its configuration and sends the request to the model expected to give the best combination of quality and cost. Default prompt routers are provided for model families such as Anthropic Claude, Meta Llama and Amazon Nova; configured routers let you choose two models in a family, a fallback model and a response quality difference threshold: the router chooses the cheaper model unless the larger model is predicted to be better by more than that threshold.
Applications invoke the router's ARN as the modelId in Converse or InvokeModel, and the response trace shows which model handled the request. It suits chat and question-answering traffic with a mix of simple and complex requests, with no classifier to build or maintain.
r = brt.converse(
modelId="arn:aws:bedrock:us-east-1:111122223333:default-prompt-router/amazon.nova:1",
messages=[{"role": "user", "content": [{"text": question}]}],
)
print(r["trace"]["promptRouter"]["invokedModelId"]) # which model actually answeredThe following diagram shows a configured prompt router choosing between a smaller and a larger model for each prompt.

Intelligent Prompt Routing
Metric-based routing
Metric-based routing chooses models from live operational data: the routing layer reads recent latency percentiles, error and throttle rates and cost per request from CloudWatch or its own counters, and shifts traffic away from a model whose latency or errors exceed thresholds, or toward the cheapest model that currently meets the service level. Quality metrics from continuous evaluation can also feed routing, for example demoting a model whose judge scores dropped after a provider update.
Weighted routing splits traffic by percentage, which supports A/B tests and gradual migrations. The weights live in AppConfig and change automatically through alarms and Lambda functions, or manually. The following table compares the routing approaches.
| Approach | Decides by | Maintenance |
|---|---|---|
| Static configuration | Request type | Low |
| Content-based (classifier) | Request content | Classifier upkeep |
| Intelligent Prompt Routing | Predicted quality versus cost within a family | Managed by Bedrock |
| Metric-based | Live latency, errors, cost, quality | Metrics pipeline and thresholds |
| Weighted split | Percentages | Configuration changes |
Reducing cost with the least effort
A chat assistant uses a large Nova model for every question. Analysis shows that about 60% of questions are simple. The team wants to reduce cost without building or maintaining a classifier.
A configured Intelligent Prompt Router with a smaller and a larger Nova model and an appropriate response quality difference sends simple prompts to the smaller model automatically. The application only changes the modelId to the router ARN, and the trace shows the routing decisions for monitoring.
How does an application use Intelligent Prompt Routing?
Show answer
It invokes a prompt router ARN as the model ID, and the router picks a model in the family for each request.
Exam Tips
Remember for the exam
- Intelligent Prompt Routing: invoke a prompt router ARN; it picks a model in the family per request.
- Response quality difference controls when the larger model is chosen.
- Metric-based routing shifts traffic on latency, errors, cost or quality.
- Weighted routing in AppConfig supports A/B tests and gradual migration.