Simple definition#
Model selection is choosing which LLM (or which mix of LLMs) serves each use case, based on quality for the task, cost, latency, data-protection requirements and operational fit. In an enterprise it is not a one-time choice: models change every few months, so the architecture must make swapping cheap.
Why it matters#
The difference between models on your task can be large, and price per token varies by more than 50× between the smallest and largest models. Picking the biggest model for everything wastes money; picking the cheapest for everything fails on hard tasks.
The selection criteria#
| Criterion | Questions to ask |
|---|---|
| Task quality | How does it score on our evaluation set? Reasoning, extraction accuracy, code, tool use, multilingual? |
| Cost | Price per million input/output tokens; caching and batch discounts; total cost at projected volume. |
| Latency | TTFT and tokens/s at our prompt sizes; is streaming supported? |
| Context window | Fits our largest realistic prompt with headroom? |
| Capabilities | Tool calling, structured outputs, vision, audio, reasoning mode, embeddings. |
| Data protection | Data retention, training-on-your-data terms, regional hosting, certifications (SOC 2, ISO 27001), private networking. |
| Deployment | Provider API, your cloud (Bedrock, Azure, Vertex), or self-hosted? |
| Licence | For open-weight models: commercial use allowed? usage restrictions? |
| Safety | Refusal behaviour, jailbreak resistance, content filters. |
| Vendor and roadmap | Deprecation policy, SLAs, support, financial stability. |
Model tiers#
flowchart LR
subgraph T1["Frontier / reasoning models"]
A["Complex reasoning, planning,<br/>agentic coding, hard analysis"]
end
subgraph T2["Mid-tier models"]
B["Most RAG, chat, summarisation,<br/>tool use at scale"]
end
subgraph T3["Small models, SLMs"]
C["Classification, routing, extraction,<br/>guardrails, on-device, high volume"]
end
subgraph T4["Specialised models"]
D["Embeddings, rerankers,<br/>speech, vision, code"]
end
T1 ---|"higher quality, cost, latency"| T2 ---|"lower cost, faster"| T3
Proprietary vs open-weight#
| Proprietary (API) | Open-weight (self-host or managed) | |
|---|---|---|
| Examples | Claude, GPT, Gemini families | Llama, Mistral, Qwen, Gemma, DeepSeek families |
| Peak quality | Usually highest | Close behind, especially at mid-tier |
| Operations | None — pay per token | You run GPUs, scaling, patching (unless a cloud hosts it) |
| Data control | Contractual (retention, region) | Full — data never leaves your environment |
| Customisation | Prompting; some offer fine-tuning | Full fine-tuning, LoRA, quantization |
| Cost profile | Variable, scales with usage | Fixed GPU cost; cheaper at high steady volume |
| Lock-in | API differences between vendors | Low for the model, but you own the platform |
Note: “open-weight” means the weights are downloadable; licences differ and are not always open source in the OSI sense.
Benchmarks: useful, but not sufficient#
Public benchmarks (MMLU-style knowledge tests, GPQA for hard science, SWE-bench for coding, tool-use and agent benchmarks, LMArena-style human preference rankings) are good for shortlisting. They are poor for deciding, because:
- They may not resemble your task, documents or language.
- Models can be over-optimised for popular benchmarks (“contamination”).
- They ignore your latency, cost and data constraints.
The decision must come from your own evaluation set: 50–500 representative inputs with expected outputs or grading criteria, scored automatically and spot-checked by experts. See RAG evaluation for the methods.
A repeatable selection process#
flowchart LR
A["1 · Define use case<br/>and success metrics"] --> B["2 · Hard filters<br/>data residency, licence,<br/>capabilities, context"]
B --> C["3 · Shortlist 3–5 models<br/>benchmarks, cost tier"]
C --> D["4 · Evaluate on own dataset<br/>quality, latency, cost"]
D --> E["5 · Weighted scoring<br/>+ risk review"]
E --> F["6 · Decide primary<br/>and fallback model"]
F --> G["7 · Re-evaluate on<br/>every new model release"]
G --> C
Weighted scoring example — customer-support RAG assistant
| Criterion (weight) | Model A frontier | Model B mid-tier | Model C open-weight 70B |
|---|---|---|---|
| Answer quality on eval set (40%) | 9 | 8 | 7 |
| Cost at volume (20%) | 4 | 8 | 7 |
| Latency (15%) | 6 | 8 | 7 |
| Data protection fit (15%) | 7 | 7 | 10 |
| Operational effort (10%) | 9 | 9 | 4 |
| Weighted total | 7.25 | 7.95 | 7.15 |
Model B wins for this use case. A legal-analysis use case with different weights might pick Model A.
Model routing and cascades#
You rarely need one model for everything. An AI gateway or router sends each request to the cheapest model that can handle it.
flowchart TB
Q["Request"] --> R{"Router<br/>rules or small classifier"}
R -->|"simple: FAQ, classification"| S["Small model"]
R -->|"standard"| M["Mid-tier model"]
R -->|"complex reasoning"| L["Frontier / reasoning model"]
S --> V{"Confidence or<br/>validation OK?"}
V -->|"No: escalate"| M
V -->|"Yes"| OUT["Response"]
M --> OUT
L --> OUT
- Routing — classify the request first, then choose a model.
- Cascade — try the cheap model first; escalate if validation or confidence fails.
- Fallback — on provider outage or rate limit, switch to an equivalent model from another provider.
Routing commonly cuts cost by 40–70% when most traffic is simple.
Avoiding lock-in#
- Call models through an abstraction: Spring AI’s
ChatModel, or an AI gateway with an OpenAI-compatible API. - Keep prompts, evaluation sets and tool definitions model-agnostic and in version control.
- Store embeddings with the embedding model name and version; changing the embedding model means re-indexing.
- Re-run the evaluation suite before switching models — prompts often need adjustment.
Selecting under deployment constraints#
Where a model may run narrows the choice before any quality comparison. Apply the deployment filter as step 2 of the process above.
| Deployment target | What it does to the shortlist |
|---|---|
| Public API | Full range; filter on data terms (retention, training, region) |
| Cloud-managed in your tenancy | Only models in that cloud’s catalogue and region; features (tool use, caching, batch) can lag the provider’s own API |
| Sovereign cloud | Narrower catalogue, often older versions; check roadmap commitments |
| On-premise | Open-weight models, or vendors’ licensed on-prem offerings; size bounded by GPU memory (see GPU memory estimate) |
| Air-gapped | Open-weight only, imported and evaluated offline; plan an update cadence |
| Edge / device | Small quantized models, typically 1–8B parameters |
Three further checks matter in enterprise selection:
- Model lifecycle: deprecation notice periods and version pinning. Regulated firms must re-validate on every material change, so a model that changes often costs more to own.
- Weight ownership: whether you can keep and run the model if the vendor relationship ends. See model-weight ownership.
- Total cost of ownership: tokens or GPUs plus evaluation, validation, operations and switching cost — not price per token alone.
For a worked example of these ideas on one model family — tiers, effort levels, routing and fallbacks — see Claude models and model selection.
For the full decision guide, see On-premise and hybrid deployment; for an industry example, see Hybrid AI in financial services.
Common mistakes#
Review questions#
How would you choose an LLM for a new enterprise use case? Define the task and success metrics; apply hard filters (data residency, licence, required capabilities, context size); shortlist a few models using benchmarks and price; evaluate them on our own dataset for quality, latency and cost; score with weights agreed with the business; choose a primary and fallback; and re-evaluate when new models appear.
Open-weight or proprietary? Proprietary APIs give the best quality and zero operations; open-weight gives full data control, customisation and lower cost at high steady volume. Many enterprises use proprietary models through their cloud provider for most work and open-weight models for sensitive or very high-volume tasks.
What is model routing and why use it? Sending each request to the cheapest model capable of handling it, using rules or a classifier, sometimes with escalation on low confidence. It cuts cost and latency without hurting quality on hard requests.
How does the deployment target change model selection? It is a hard filter: cloud tenancy limits you to that catalogue and region, on-premise and air-gapped to open-weight or licensed models that fit your GPUs, edge to small quantized models. Quality comparison happens only among what the target allows.
Why are public benchmarks not enough? They do not reflect your data, task or constraints, can be contaminated, and ignore cost and latency. Use them to shortlist and your own evaluation set to decide.
How do you avoid vendor lock-in? Abstraction layer or gateway, model-agnostic prompts and tool schemas, an evaluation suite to qualify replacements quickly, and a tested fallback provider.
Summary#
- Select per use case, on task quality, cost, latency, data protection and operational fit.
- Shortlist with benchmarks; decide with your own evaluation set and weighted scoring.
- Use tiers: frontier for hard reasoning, mid-tier for most work, small models for high-volume simple tasks.
- Route and cascade to save cost; keep a fallback model; abstract the provider.
- Apply deployment, lifecycle and weight-ownership constraints before comparing quality.
References#
- Chen, Zaharia, Zou, FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance, 2023.
- Ong et al., RouteLLM: Learning to Route LLMs with Preference Data, 2024.