Lesson 2 of 4 Deploying Foundation Models in Foundry

Selecting Models for Use Cases

This lesson explains the criteria for selecting a foundation model, how model families and sizes differ, how benchmarks are used, and why your own evaluation decides.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the criteria for model selection.
  • Explain when a small model is sufficient.
  • Describe the role of leaderboards and benchmarks.
  • Describe when a model router helps.

Selection criteria

There is no best model, only a best model for a task under a set of constraints. The criteria below narrow the choice before any testing starts.

CriterionQuestions to ask
Task fitChat, reasoning, extraction, classification, code, embeddings, image or speech?
QualityHow well does it perform on tasks like ours, and on our data?
CostPrice per input and output token, and token use per request (reasoning models use more).
LatencyTime to first token and tokens per second, against the user experience target.
Context windowCan it hold the prompt, retrieved documents and conversation history?
Modalities and featuresImage input, structured outputs, tool calling, streaming.
AvailabilityRegions and deployment types where it can be deployed, and quota.
LifecycleIs it generally available, and when is it scheduled for deprecation and retirement?
ComplianceData residency, terms of use, content safety behaviour.

Model families and sizes

Within a family, smaller models trade some quality for lower cost and latency. For many production tasks, such as classifying tickets, extracting fields or routing requests, a small model such as gpt-5-nano or gpt-5-mini performs almost as well as a large one at a fraction of the price. Large models suit complex instructions, nuanced writing and difficult reasoning. Reasoning models spend extra tokens thinking before answering, which improves accuracy on multistep problems but increases latency and cost, and their reasoning effort can often be set.

Embedding models, such as text-embedding-3-small and text-embedding-3-large, are chosen on different criteria: retrieval quality on your documents, vector dimensions and cost, which the RAG optimization modules cover.

Benchmarks and leaderboards

The Foundry model leaderboards compare models on public benchmarks for quality, safety, estimated cost and throughput, and let you chart trade-offs, such as quality against cost, to see which models sit on the efficient frontier. Model cards add benchmark results for each model.

Benchmarks are a shortlist, not a decision. Public benchmark questions differ from your users' questions, may have leaked into training data, and do not reflect your prompts, retrieval or output format. A model that leads a reasoning benchmark may be slower and costlier than needed for extraction.

Deciding with your own evaluation

The decision rests on an evaluation of each shortlisted model on a representative test dataset, with the application's own prompts and settings, scored with the same evaluators. Quality metrics are weighed against cost per request and latency.

  1. Shortlist

    Two to four candidates from leaderboards, model cards and constraints.

  2. Deploy for testing

    Small deployments of each candidate in a development resource.

  3. Run the evaluation

    The same dataset, prompts and evaluators against each deployment.

  4. Compare

    Quality scores, pass rates, cost per 1,000 requests and P95 latency.

  5. Decide and record

    Choose, document the reasons, and keep the evaluation for future comparisons.

Foundry also offers a model router, a deployable model that chooses an underlying model for each request based on its complexity, sending simple prompts to small models and complex ones to larger models. It can lower cost for mixed workloads, at the price of less predictable behaviour per request.

Worked example

Choosing on evidence

A team builds a feature that extracts invoice fields into JSON. Leaderboards favour a large reasoning model. A test on 300 invoices shows the reasoning model at 97.8 percent field accuracy, gpt-5-mini at 97.1 percent, and gpt-5-nano at 89 percent. The reasoning model costs about 12 times as much per invoice as gpt-5-mini and is four times slower. The product owner accepts any model above 96 percent.

Choose gpt-5-mini: it meets the 96 percent requirement on the team's own data at a fraction of the cost and latency of the reasoning model. Record the evaluation, and rerun it when new model versions appear or the invoice formats change.

The reasoning model is better but not by a margin that the requirement values. gpt-5-nano is cheapest but fails the accuracy requirement. Choosing from the leaderboard alone ignores the team's measured results.

Check yourself

A leaderboard ranks one model highest for reasoning. Why should it not decide the choice alone?

Show answer

Leaderboards use public benchmarks that may not resemble your task or data. Use them to shortlist, then compare candidates with your own evaluation on representative data, together with cost and latency.

Exam Tips

Remember for the exam

  • Weigh task fit, quality, cost, latency, context, features, availability, lifecycle and compliance.
  • Small models are often good enough for extraction, classification and routing.
  • Leaderboards shortlist; your own evaluation on representative data decides.
  • A model router can choose a model per request for mixed workloads.