Choosing a Model
A model choice is a production decision, not a leaderboard lookup. The thing being chosen is a versioned served system: a particular model revision, provider or serving build, prompt, tools, settings, safety controls, and fallback behavior. A different prompt template or tool loop can change the result even when the weights stay fixed.
Start with a workload contract. It states which tasks matter, what counts as an accepted result, which hard constraints apply, and the limits for quality, cost, latency, availability, and operational risk. Then compare eligible candidates under the same contract. There is no universal winner; there is only a defensible choice for a declared workload and time period.
This chapter turns that idea into an operating procedure. The closed-to-open axis is one input, not the decision procedure: Chapter 73 explains how to inspect a release, while Chapter 47 explains what a public score can and cannot establish.
Choose the system, not the name
A family name such as “Model Pro” is too vague to reproduce. Record the exact candidate identity before testing it:
- provider and model ID, or artifact digest for downloaded weights;
- endpoint and region;
- prompt template and message formatting;
- tool schemas and tool-loop implementation;
- decoding and reasoning settings, including budgets and stopping rules;
- safety policy and content filters;
- cache, batch, router, and fallback policy; and
- rate and capacity limits used during the test.
Call this configuration . If any behavior-changing field changes, treat the result as a new candidate. A dated record matters even when an API exposes a fixed-looking name: service implementations, quotas, and terms can change outside the repository.
The emphasis on a whole system is not new. Liang and colleagues introduced HELM in 2022 and published it in 2023 to compare language models across scenarios and multiple metrics under standardized conditions (Liang et al. 2023). Mitchell and colleagues introduced model cards in 2019 so that intended uses, evaluation conditions, and limitations travel with a model release (Mitchell et al. 2019). The practical extension is simple: keep a card for the served configuration that your application actually calls.
The order in Figure 81.1 prevents an attractive score from hiding a legal, interface, or capacity failure. It also prevents a cheap but inadequate system from entering an economic comparison.
Gate eligibility before ranking
Write hard requirements as predicates. For candidate , one compact gate is
Here means the legal review permits the intended use; means service handling and retention satisfy policy; means deployment and processing locations are allowed; means required modalities, tools, and output forms work; and means the candidate can meet the required load and availability. Every factor is Boolean. Unknown does not pass. An unresolved item goes through an explicit exception process rather than becoming a low penalty in a weighted score. Eligibility is not a weighted score.
The gate should cover more than these five examples when the workload requires it: accessibility, safety controls, export restrictions, audit evidence, indemnity, data deletion, or an exit path can all be hard requirements.
“Open” is not enough information
Keep the artifacts and the permissions in separate columns. A release may provide weights without training data, training code, or a useful model card. A permissive code license attached to one repository does not automatically describe the terms for weights or data. A hosted service adds another contract covering data retention, training on customer data, regions, acceptable use, rate limits, deprecation, and support.
The Open Source Initiative's 2024 definition asks whether a system grants the freedoms to use, study, modify, and share, and whether the preferred form for modification includes the needed data information, code, and parameters (Open Source Initiative 2024). That is a much richer claim than “the weights can be downloaded.” Do not infer rights from the word open. Inspect each artifact, license, and service agreement that applies to the exact deployment. This is an engineering review framework, not legal advice.
Hosted, managed, and self-hosted are deployment choices
Artifact access and deployment are related but not identical. Downloadable weights can run on owned machines, rented accelerators, or a managed endpoint. A hosted API can be reached directly or through a cloud marketplace. Its service terms are distinct from an artifact license. Compare the actual alternatives available to the organization, including their capacity, staffing, security, and exit costs.
For a self-managed candidate, total parameters, precision, memory layout, and runtime support determine whether the artifact fits at all. Production-shaped load tests then determine capacity at the required tail latency and redundancy. Average tokens per second on an idle server is not a capacity plan. See Chapter 82 and Chapter 34 before accepting a hardware claim.
Use public evidence to discover candidates
Public benchmarks are useful for candidate discovery. They are weak grounds for a production decision unless their task, system, and measurement process match yours. HELM's scenario-and-metric framing is valuable precisely because it makes those choices visible (Liang et al. 2023).
Ask four questions about every published result:
- Construct match: does the benchmark measure the capability the product needs, or a convenient proxy?
- Harness match: are the prompt, tools, sampling, context, budget, and grader comparable to production?
- Uncertainty: are item counts, repeated runs, intervals, and close ranks reported well enough to support the claimed difference?
- Data provenance: when and how were tasks created, exposed, filtered, and scored?
Also identify the system being measured. An agent benchmark usually measures a model together with a scaffold, tools, retries, and budget. SWE-bench, for example, evaluates issue resolution in real repositories, not isolated code completion (Jimenez et al. 2024). LiveCodeBench continuously draws newer competition problems and covers several coding behaviors (Jain et al. 2024). These design choices address different questions; neither score transfers automatically to a private workload.
Human-preference boards answer yet another question. Chatbot Arena uses paired user preferences and a statistical ranking method (Chiang et al. 2024). That is evidence about aggregate preference under its traffic and interface, not direct proof of factual correctness, policy compliance, or tool reliability.
A suspicious public-to-private gap justifies investigation. It cannot prove contamination by itself: task mix, prompts, tools, budgets, graders, and chance can also create the gap. Record the possible explanations and run controlled tests instead of assigning a cause from one comparison.
Benchmark accuracy can mean performance on a fixed set or an estimate for a larger population of similar tasks. Those targets require explicit assumptions and can have different uncertainty. NIST's statistical treatment of language model evaluation makes that distinction concrete (Keller et al. 2026). In a selection review, state which target you mean. A rank without a target population and uncertainty interval is not yet a procurement fact.
Build the evaluation around the workload
The internal evaluation is the decision instrument. Freeze its contract before looking at final results:
- define workload strata, such as language, task type, difficulty, risk, and input size, with production weights;
- write the acceptance rule and primary quality measure;
- name the incumbent baseline and the smallest practically important change;
- separate tuning cases from a locked confirmation set;
- declare cost, latency, critical-failure, and availability limits; and
- choose a precision target and sample size plan.
Run every candidate on the same cases. Randomize execution across time when provider load may drift, and use repeated trials at production settings when generation is stochastic. Preserve the independent unit: several turns from one conversation or several attempts on one issue are clustered observations, not unrelated evidence.
For a challenger and baseline , define the paired result on independent case as
where and are scores produced under the frozen acceptance rule. Before running the comparison, choose a non-inferiority margin : the largest quality loss the team would accept for gains elsewhere. The challenger clears the quality gate only when the lower confidence interval for the workload-weighted mean difference is greater than . Require a lower bound above zero if the claim is superiority.
This is a decision rule, not a universal statistical recipe. Binary paired outcomes, rubric scores, clustered conversations, and repeated stochastic runs need different interval methods; Chapter 48 develops those choices. Pick sample size from the precision target, expected paired variance, cluster structure, and desired error rates. There is no defensible magic count. Inspect slice results and critical failures even when the aggregate passes.
Prefer executable or rule-based graders where they represent acceptance. When human judgment is necessary, blind the reviewer to candidate identity and randomize presentation order. When an LLM judge is necessary, pin its full configuration, validate it against human labels, measure judge disagreement, swap answer order, and adjudicate important conflicts. LLM judges can exhibit position bias (Wang et al. 2024); Chapter 50 and Chapter 52 cover the broader evaluation design.
A reviewable configuration might look like this:
# eval-contract.yaml: illustrative fields, not universal thresholds
workload: evals/support-confirmation-v8.jsonl
strata: [language, request_type, risk, input_size]
candidate_systems:
- config: systems/incumbent-2026-08-01.yaml
- config: systems/challenger-a-2026-08-01.yaml
primary_metric: accepted_result
comparison:
design: paired
repeats_per_case: 3
noninferiority_margin: declared-before-run
confidence_method: chosen-for-independent-unit
secondary_limits: [critical_failure_rate, cost_per_accepted_task, p95_latency]
release: [shadow, canary, rollback]
Compare total cost for accepted work
Token price is an input, not the economic result. Tokenizers, cache rules, reasoning tokens, output length, tool use, retries, and acceptance rates differ. Measure end-to-end cost per accepted task over the same accounting horizon and workload.
Here identifies a workload stratum and a repeated trial. Let be the production weight of stratum , the realized end-to-end cost of candidate , and equal one when the result is accepted and zero otherwise. Then
is undefined when the weighted accepted count is zero, which is the right warning. In this formula, the ledger behind should include input tokens, output tokens, cache writes and reads, tool calls, retries, network charges, human review, and expected incident cost. For self-managed serving it also includes accelerators, CPU and memory, storage, idle capacity, operations labor, on-call work, and software. Keep cost per attempt beside the accepted-task measure so a change in the denominator remains visible.
Measure client-side latency as well. Report first-token and end-to-end p50, p95, and p99 by workload stratum and offered load. Separate queueing, prefill, decoding, tools, and retries when diagnosing the result. A routing cascade can reduce average spend yet worsen the tail because escalated requests pay for multiple stages.
Hosted versus self-hosted crossover
For a quick sensitivity analysis, suppose two quality-equivalent alternatives meet the same service objective. Over one accounting period, write
where the subscript denotes hosted service, and
for self-hosted service. is accepted tasks in that period; and are fixed costs; and and are variable costs per accepted task. Use the same currency and the same accounting horizon for every term. When , the linear crossover is
A positive crossover exists only when the numerator and denominator imply . Otherwise there is no positive crossover in this linear range. Real systems add capacity steps, demand bursts, commitments, utilization, migration costs, and changing prices; model low, base, and high scenarios in Chapter 76. The shortcut is invalid when the alternatives are not quality-equivalent or miss different service objectives.
Select a frontier, not a score champion
After the hard gate and quality gate, place the survivors on a Pareto frontier. A candidate is dominated when another eligible candidate is at least as good on every decision-relevant measure and better on one. Remove it. The remaining trade-off may still require judgment: one team may pay more for a lower critical-failure bound, while another may accept slower responses for data residency.
Do not hide that judgment inside arbitrary normalized weights. Record the trade-off, owner, evidence, and expiry date. Research on learned cascades shows that routing can improve a measured cost-quality trade-off (Chen et al. 2023; Ong et al. 2024), but a router is itself a versioned system. Evaluate the policy end to end, including misroutes, verifier errors, duplicate work, fallback latency, and side effects.
Wire the decision so it stays true
Put provider-specific behavior behind a provider adapter when the application needs portability or centralized controls. A gateway, a routing and policy layer for model calls, is one design option for shared keys, budgets, observability, and routing. It also adds a dependency and cannot make providers semantically identical.
An OpenAI-compatible transport usually covers only a common subset. Tool semantics, structured output, tokenization, caching, streaming, multimodal inputs, reasoning controls, and error behavior can still differ. A policy-compatible fallback must satisfy the same data and regional rules, and its behavior must be validated by the same evaluation contract. Test ambiguous timeouts and action idempotency before enabling automatic failover. See Chapter 88 and Chapter 90.
Pin stable revisions where the provider or artifact supports them. Otherwise record the exact endpoint, region, configuration, and observation date, then run sentinel evaluations frequently. Store selected-model and route decisions with each trace so failures can be attributed to the system that handled them.
Promote through shadow traffic, then a small canary with automatic rollback. Monitor acceptance, critical failures, latency tails, spend, capacity, and provider errors by stratum. Define every re-evaluation trigger in advance: model or prompt change, price or terms change, new tool schema, workload drift, quality drift, repeated capacity failures, or the decision record's expiry date.
The output is a decision record: the workload contract, candidate identities, eligibility evidence, evaluation results with uncertainty, cost ledger, Pareto trade-off, rollout owner, rollback rule, and re-evaluation trigger. That record makes a model choice explainable today and replaceable tomorrow.
Further reading
Primary and archival sources for the framework and its limits.
- Liang et al., “Holistic Evaluation of Language Models” (A scenario-and-metric framework for evaluating model systems under standardized conditions), 2023. arXiv:2211.09110HELM defines language-model evaluation as a selection of scenarios, adaptations, and multiple metrics, and publishes prompts and completions to make comparisons inspectable.
- Mitchell et al., “Model Cards for Model Reporting” (A documentation format for intended uses, evaluation conditions, and limitations), 2019. arXiv:1810.03993Model cards report intended uses, evaluation conditions, limitations, and performance across relevant conditions and groups.
- Open Source Initiative, “The Open Source AI Definition, Version 1.0” (Defines the freedoms and preferred form for modifying an Open Source AI system), 2024. opensource.orgThe definition separates the freedoms to use, study, modify, and share from mere access to weights, and describes required data information, code, and parameters.
- Chiang et al., “Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference” (Methods and limitations of crowdsourced pairwise preference evaluation), 2024. proceedings.mlr.pressChatbot Arena collects paired user preferences and applies statistical ranking methods; its result describes preference under that platform's traffic and interface.
- Jimenez et al., “SWE-bench: Can Language Models Resolve Real-World GitHub Issues?” (A repository-level software-engineering task and executable evaluation harness), 2024. arXiv:2310.06770SWE-bench places a repository at a pre-fix commit, asks a system to resolve a real issue, and evaluates the resulting patch with executable tests.
- Jain et al., “LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code” (Continuously collected coding tasks with objective scoring and published dates), 2024. arXiv:2403.07974LiveCodeBench uses recently published competition problems and covers generation, execution, test-output prediction, and self-repair to reduce exposure and broaden coding evaluation.
- Keller et al., “Expanding the AI Evaluation Toolbox with Statistical Models” (Formalizes evaluation targets, assumptions, repeated trials, and uncertainty), 2026. nist.govNIST distinguishes accuracy on a fixed benchmark from generalized accuracy over related tasks and explains why evaluation assumptions determine valid uncertainty estimates.
- Wang et al., “Large Language Models are not Fair Evaluators” (Experimental evidence of position bias in model-based comparative judging), 2024. aclanthology.orgThe paper shows that changing response order can change an LLM judge's comparative verdict and evaluates a calibration procedure against human labels.
- Chen et al., “FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance” (Prompt adaptation, approximation, and cascades for measured cost-quality trade-offs), 2023. arXiv:2305.05176FrugalGPT studies model cascades and other strategies for reducing API cost while measuring resulting task performance rather than assuming a cheaper route is equivalent.
- Ong et al., “RouteLLM: Learning to Route LLMs with Preference Data” (Learns routing policies between stronger and weaker models from preference data), 2024. arXiv:2406.18665RouteLLM evaluates learned routers as policies that trade model quality against cost, making clear that routing behavior must be measured rather than assumed.
Comments
Log in to comment