Evaluating Foundation Models Against Task Requirements
This lesson explains how to turn requirements into criteria, shortlist models that meet hard constraints and evaluate the shortlist on your own data, since no single model is best for every task.
Learning outcomes
After completing this lesson, you will be able to:
- Apply hard constraints such as modality and context window.
- Compare candidates on quality, latency, throughput and cost.
- Evaluate the shortlist with the playground and evaluation jobs.
Hard constraints
Some requirements eliminate models outright. The model must support the needed modality (for example, image input for document photos), the context window must fit the longest prompt plus response, the model must support required languages, it must be available in the required Regions (or through a compliant cross-Region profile), and if customisation is planned, it must support fine-tuning or distillation. Features such as tool use, structured output and prompt caching may also be required.
Hard constraints first
Performance criteria
Among the models that meet the hard constraints, such as modality, context length and Region, candidates are compared on four criteria. Quality on the task is measured by accuracy, faithfulness to sources and adherence to the required format. Latency includes the time to the first token and the total response time. Throughput limits determine whether the model can handle the expected request volume. Cost per request follows from the expected input and output tokens and the model's prices.
Public benchmarks give a rough guide to quality, but results on the organisation's own prompts and data are what matter, because benchmark tasks rarely match a specific use case.
Evaluating on your data
Use the Bedrock playground for quick side-by-side comparisons, then run Bedrock model evaluation jobs on a representative prompt dataset: automatic metrics for tasks with reference answers, LLM-as-a-judge metrics for qualities such as correctness and helpfulness, and human evaluation for subjective or high-stakes outputs. Choose the smallest, cheapest model that meets the quality bar. The following table shows a selection scorecard.
| Criterion | How to measure |
|---|---|
| Meets modality, context, language, Region | Model documentation (pass or fail) |
| Task quality | Bedrock evaluation job on your prompts |
| Latency | Time to first token and total time in tests |
| Cost per request | Average input and output tokens x prices |
| Customization support | Model documentation |
The following diagram shows the order in which candidate models are eliminated when selecting a model for contract review.

Select a model with evidence
Selecting a contract-review model
A legal team needs clause extraction from contracts of up to 150 pages (about 90,000 tokens), in English and German, with responses in JSON, at under USD 0.05 per contract.
- Eliminate models with context windows below about 100,000 tokens and without German support.
- Run an evaluation job on 200 annotated contracts with an LLM judge for extraction correctness and a JSON validity check.
- Compute cost from measured tokens: about 90,000 input and 2,000 output tokens per contract.
Two models pass quality; the cheaper one costs within the budget, so it is selected. The most capable model scored only 1% higher at four times the cost, which the requirements do not justify.
What should be done first when comparing foundation models?
Show answer
Eliminate models that fail hard constraints, such as context window, language or Region.
Exam Tips
Remember for the exam
- Eliminate models that fail hard constraints first.
- Long documents need a large context window.
- Compare shortlisted models with Bedrock evaluation jobs on your own prompts.
- Estimate cost from measured input and output tokens.
- Choose the smallest model that meets the quality bar.