Balancing Foundation Model Quality, Latency and Cost
This lesson explains the Bedrock features that shift the balance between answer quality, response time and token cost, and how to match them to requirements.
Learning outcomes
After completing this lesson, you will be able to:
- Use smaller models and routing for simple tasks.
- Apply prompt caching and response optimisations.
- Choose service tiers and capacity options.
Model size and routing
Larger models usually reason better but respond more slowly and cost more per token. Using a smaller model for simple tasks is the most effective saving. Intelligent prompt routing sends each request to one of the models in a family, choosing the smaller model when it predicts similar quality, which lowers average cost and latency. Distillation creates a small model that imitates a large one for a specific use case.
Right-size the model
Prompt and response optimisations
Several techniques reduce the cost and latency of foundation model requests without changing the model. Prompt caching stores a repeated prompt prefix, such as a long system prompt, a reference document or tool definitions, so later requests read it from the cache at a reduced price and with lower latency. Shorter prompts, fewer retrieved chunks in RAG and limits on output length reduce both cost and latency, because every token is processed and charged.
Streaming, with the ConverseStream API, returns tokens as they are generated. It does not shorten the total generation time, but users see the first words within a second, which greatly improves the perceived latency of chat interfaces.
The following diagram shows the prompt, the routing and the perceived latency of an assistant that answers questions about a 40,000-token policy manual, after changes to cut its cost and latency.

Service tiers and capacity options
Bedrock offers service tiers selected per request. Standard is the default. Priority gives faster responses for latency-critical work at a premium price. Flex gives a discount for work that can tolerate lower priority, such as evaluations and background summarisation. Reserved capacity guarantees tokens-per-minute for 1 or 3 months, overflowing to Standard. Latency-optimized inference is available for selected models, batch inference processes large JSONL files at a lower price, and Provisioned Throughput buys dedicated model units, which is also how some custom models are served.
The following table summarises the options.
| Goal | Feature |
|---|---|
| Lower cost for mixed simple and complex requests | Intelligent prompt routing, smaller model |
| Lower cost and latency for repeated long context | Prompt caching |
| Faster perceived response in chat | Streaming |
| Fastest responses for critical traffic | Priority tier, latency-optimized inference |
| Cheaper non-urgent requests | Flex tier, batch inference |
| Guaranteed throughput | Reserved tier or Provisioned Throughput |
Choose the tier
A document Q&A assistant
An assistant answers questions about a 60-page policy manual that is included in every prompt (40,000 tokens). Responses take 9 seconds and cost is high. Most questions are simple.
Change Effect
Prompt caching on the manual prefix Cached input tokens billed at a reduced rate; faster time to first token
Intelligent prompt routing (same family) Simple questions served by the smaller model
ConverseStream in the UI First words appear in about 1 second
Max tokens 400 Caps long answersTogether these changes cut cost and perceived latency sharply without lowering quality on complex questions. Switching everything to the smallest model would have been cheaper still, but it failed the complex questions in evaluation.
Which feature sends simple requests to a cheaper model and hard ones to a stronger one?
Show answer
Intelligent prompt routing.
Exam Tips
Remember for the exam
- Same long prefix in many requests: prompt caching.
- Mixed request difficulty: intelligent prompt routing.
- Chat responsiveness: streaming.
- Latency-critical requests: Priority tier; non-urgent: Flex tier or batch inference.
- Guaranteed capacity: Reserved tier or Provisioned Throughput.