Lesson 2 of 3 Selecting Foundation Models

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.

Select all that apply

Hard constraints first

Exam skills 2.1.1

Identify the requirements that remove models from the list before quality is compared.

Log in to try this activity Interactive activities are free with an account.

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.

CriterionHow to measure
Meets modality, context, language, RegionModel documentation (pass or fail)
Task qualityBedrock evaluation job on your prompts
LatencyTime to first token and total time in tests
Cost per requestAverage input and output tokens x prices
Customization supportModel documentation

The following diagram shows the order in which candidate models are eliminated when selecting a model for contract review.

Selecting the contract-review model. Hard constraints come first: a context window of about 100,000 tokens and German support. An evaluation job on 200 annotated contracts, with an LLM judge and a JSON validity check, then leaves two models, and measured token counts show which fits the USD 0.05 budget. The top scorer was only 1% better at four times the cost.
The scenario is illustrative.
Put in order

Select a model with evidence

Exam skills 2.1.1 · 2.3.6

Arrange the steps for selecting a foundation model.

Log in to try this activity Interactive activities are free with an account.
Worked example

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.

Check yourself

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.