Concepts / Model Selection Criteria

Model Selection Criteria

Model quality must be weighed against latency and cost, and the firmest requirements should be fixed first and used to filter candidates before softer goals are compared.

  • Programming

When a Strong Model Still Fails

A model can produce excellent answers and still be a poor fit. If users wait so long that they give up, or each request costs more than the product can support, raw answer quality is not enough. Model selection means weighing three forces together: the quality of the output, the time users wait, and the cost of serving the model. The right balance depends on what the application needs.

Output qualityCandidate modelLatencyCostevaluateevaluateevaluate
Why can a candidate that is strong on one objective still be a poor overall fit? This conceptual comparison shows the objectives to weigh together; it does not place measured models on a performance chart.

Pareto optimization is the study of optimizing several objectives at once. For model selection, its practical lesson is to make trade-offs explicit: decide which objectives are requirements and which are preferences. A model may be worth choosing even if it is weaker on one dimension, provided it meets the application's firm needs and gains enough on another dimension, such as response speed or cost. There is not necessarily one model that wins on every objective.

Filter Before You Compare

Start by separating firm requirements from softer goals. A firm requirement is a pass-or-fail filter: remove any candidate that cannot meet it. Then compare the remaining candidates against preferences such as better quality, lower latency, or lower cost. This order matters because a strong score on one dimension should not excuse failure on something the application cannot give up.

Candidate modelsCheck firmrequirementsFailed candidatesCompare softer goalsSelected modelEligible candidatesfailspasses
In what order do hard requirements and preferences narrow the candidate set? First eliminate candidates that fail firm requirements, then compare the survivors on softer goals.

The exact order of exploration can vary during development. With prompt engineering, a team might first try the strongest available model to check whether the task is feasible, then test smaller models to see whether they are good enough. When testing fine-tuning, a team might start with a small model to test its code cheaply, then move toward the largest model that fits its hardware constraints. These experiments inform selection, but the final choice still needs to meet the application's firm requirements.

Measure the Wait a User Experiences

Latency is not just one number. Different metrics describe different parts of a request, so choose the metric that matches what the application needs to protect. A streaming chat interface may care about when the first words appear; a batch report generator may care more about when the complete response is ready.

Request submittedPrompt and settings sentFirst tokenTime to first tokenOutput tokensTime per token; timebetween tokensResponse completeTime per query
Which part of the wait does each metric describe? The request progresses from submission to first output, through token generation, and finally to a completed response.
MetricWhat it describesWhen it may matter
Time to first tokenThe wait until the first token appearsA streaming interface where users benefit from seeing output begin
Time per tokenThe time associated with generating output tokensWhen the pace of token generation matters
Time between tokensThe intervals between successive output tokensWhen users experience the response as a stream
Time per queryThe time for the request as a wholeA batch task where the completed response is the important endpoint

Latency metrics describe different portions of the user's wait.

Latency depends on more than the model itself. The prompt and sampling settings affect it, and autoregressive models generate output one token at a time. As a result, longer outputs generally take longer to finish. Concise prompting, a stopping condition, and other optimization techniques can reduce the latency users observe.

Trace the Cost of a Request

For a model API, the provider usually charges according to the tokens sent to the model and the tokens returned. Both the input prompt and the generated output contribute to the bill, so reducing unnecessary tokens in either part is a common way to control API cost.

Input promptInput tokensTotal token usageAPI costGenerated responseOutput tokenscontributescontributesaffects
Which parts of a request contribute to token-based API charges? The input prompt and generated output both count toward the total tokens billed.
Worked example

Compare two token-reduction options

A fictional application uses a model API. Its team can either shorten the prompt or ask for a more concise response. Which choice can reduce the token-based charge?

  1. 1
    Identify the billable parts

    The input prompt and the output response both contribute tokens to API cost.

  2. 2
    Trace each option

    Shortening the prompt reduces input tokens. Asking for a concise answer can reduce output tokens.

  3. 3
    Apply the selection lens

    Either option can reduce the token count being sent or returned, though the team should also check that the change still meets its quality requirements.

Result

Both options can reduce API cost by reducing token usage. This example is illustrative; it does not assign token counts or prices.

Model APIInput and outputtokensUsage-based billSelf-hosted modelComputeHigher usageCan lower cost per tokencharges fordrivesmain expensefixed spending can be spread as usage grows
What changes when a team uses an API rather than running its own model? An API bill follows token usage, while self-hosting is driven mainly by compute and its economics change with scale.

Self-hosting changes the cost driver: the main expense is compute, or the machines running the model, apart from engineering costs. Once a cluster is in place, compute spending is largely fixed. If usage grows while that spending stays the same, the cost per token can fall. At lower usage, the same fixed compute can make the per-token cost much higher. By contrast, API cost per token stays fairly steady as volume grows, so the total bill rises with usage. The API must also be able to handle the required volume.

Turn Priorities into a Model Choice

A criteria table makes model comparisons more disciplined. For each dimension, record the metric, the benchmark or test conditions, the hard requirement, and the ideal target. The benchmark matters because two models can appear different simply because they were tested on different sets. If factual consistency matters, it can be added as another criterion with an appropriate measurement method and benchmark.

DimensionMetricBenchmark or test conditionsHard requirementIdeal target
QualityApplication-relevant quality measureThe same selected benchmark for each candidateMinimum acceptable resultPreferred result
LatencyMetric matched to the user experienceThe same request and measurement conditionsMaximum acceptable waitPreferred wait
CostCost under the intended delivery approachThe same usage assumptionsMaximum affordable costPreferred cost

A reusable criteria-table structure. Set the metrics, benchmarks, thresholds, and targets for the application rather than treating these generic entries as measured results.

Worked example

Apply the filter, then compare

Suppose a fictional application has three candidate models. Candidate A fails a firm latency requirement. Candidates B and C pass it. B better matches the ideal quality target, while C better matches the ideal cost target. What should the team do?

  1. 1
    Filter on the firm requirement

    Remove A because it fails the latency requirement. Its performance on another dimension cannot make it eligible if that requirement is non-negotiable.

  2. 2
    Compare the survivors

    Compare B and C against the softer quality and cost goals, using consistent benchmarks and test conditions.

  3. 3
    Choose for the application

    Decide whether B's quality advantage or C's cost advantage matters more for the application's priorities, while confirming both still satisfy every firm requirement.

Result

The process does not produce a universal winner: it first excludes candidates that fail firm requirements, then selects among eligible candidates according to the application's softer priorities. The candidate outcomes in this example are fictional.

  • Common mistake

    Choosing by quality alone.

    What it looks like

    Selecting the strongest quality result without checking the wait users experience or the cost of serving it.

    Why it fails

    A model can be impractical if it is too slow or too expensive for the application.

    Do this instead

    Compare quality, latency, and cost, and identify which are firm requirements.

  • Common mistake

    Letting a preference excuse a failed requirement.

    What it looks like

    Keeping a candidate that misses the application's maximum acceptable wait because it performs well on quality.

    Why it fails

    A firm requirement is a filter, not a preference to trade away.

    Do this instead

    Remove candidates that fail firm requirements before ranking the survivors.

  • Common mistake

    Comparing results from different benchmarks as if they were directly equivalent.

    Why it fails

    Different test sets can make model comparisons look different.

    Do this instead

    Use consistent benchmarks and measurement conditions for each candidate.

  • Common mistake

    Assuming API or self-hosted costs remain the better choice at every usage level.

    Why it fails

    API bills grow with usage, while self-hosted compute spending is largely fixed once a cluster is in place; the cost per token can shift as volume changes.

    Do this instead

    Reconsider the delivery choice as usage changes, and check that an API can handle the required volume.

MEDIUM

A team is comparing models for a streaming chat application. It has a firm maximum wait for the first visible output, a firm spending limit, and a softer preference for the highest possible answer quality. Describe the criteria-table entries the team should prepare and the order in which it should use them to choose a model.

Hints
  • Choose a latency metric that reflects when the first visible output appears, and make test conditions consistent across candidates.
  • Mark the wait and spending limits as hard requirements if the team cannot give them up.
  • Filter candidates that fail either hard requirement before comparing the quality of the survivors.

Key Takeaways

  • Evaluate output quality together with latency and cost; a model that excels on only one dimension may still be a poor fit.
  • Use latency metrics that match the part of the wait your application needs to protect, and remember that prompt choices and output length affect latency.
  • For an API, both input and output tokens contribute to cost. For self-hosting, compute is the main expense and scale can change the cost per token.
  • Write down metrics, benchmarks, hard requirements, and ideal targets; filter on firm requirements before comparing softer goals.
  • Revisit the model and delivery choice as application needs and usage change.

More concepts starting with M