LLM Inference Model Selection: A Scenario-Based Practical Guide
Choosing the right LLM for production is harder than fine-tuning one, because model capability is multi-dimensional while business needs usually touch only one or two dimensions. This guide breaks down three common scenario types—divergent, rigorous reasoning, and batch execution—and shows how to build a quantifiable evaluation framework across effect, performance, cost, and engineering layers. It also covers throughput and cost optimizations such as prefix caching, batching, tiered routing, streaming output, and result caching, plus quality safeguards for reasoning tasks and a deployment checklist.
1. Background: Why Choosing a Model Is Harder Than Tuning One
In real engineering work, teams often get stuck in an awkward position: they spend a lot of time comparing the overall capability rankings of different LLMs, yet still cannot answer “which one should my business actually use?” The reason is simple—model capability is a multi-dimensional vector, while business requirements usually fall on only one or two of those dimensions. A model that leads in open-ended mathematical reasoning may be completely unusable for a high-concurrency structured extraction task because of first-token latency and per-unit price; conversely, an ultra-fast lightweight model may “look like it finished” on tasks requiring long chains of rigorous derivation, but actually be wrong.
So the right approach is not to look for the “strongest model,” but to build a reusable, scenario-based evaluation framework: first decompose the task characteristics, then determine the key metrics, and finally validate with quantifiable benchmarks.
2. Three Typical Scenario Types and Their Capability Requirements
Abstracting the usage experiences in the original text yields three high-frequency scenario types:
Divergent scenarios (brainstorming, creative ideation, solution enumeration)
The focus is breadth of ideas and naturalness of expression. Requirements on factual precision are relatively loose, but sensitivity to response speed and interaction smoothness is high. These scenarios often need rapid multi-turn iteration, and a single output does not have to be perfect.Rigorous reasoning scenarios (mathematical proofs, code refactoring, complex logic validation)
The focus is self-consistency of long-chain reasoning, format compliance (such as structured document output), and the ability to handle problems with “no ready-made answer.” These scenarios have a high cost per call but low call frequency, and can tolerate longer latency.Batch execution scenarios (information extraction, classification and tagging, templated generation, AI Agent tool calls)
The focus is throughput per unit time, concurrency stability, and cost per task. The task logic itself is not complex, but the call volume is huge, so speed advantages are amplified many times over.
A common judgment mistake is to evaluate the third type of scenario using the experience from the first type and conclude that “they’re all about the same.” In reality, when the throughput gap reaches several times, the overall pipeline cost, queue waiting time, and user experience change qualitatively.
3. Building a Quantifiable Evaluation Metric System
It is recommended to split evaluation into four layers of metrics to avoid making decisions based on subjective impressions alone:
- Effect layer: task accuracy, format compliance rate, long-context consistency, refusal and hallucination rate.
- Performance layer: time to first token (TTFT), output tokens per second (TPS), end-to-end completion time.
- Cost layer: cost per thousand tasks = input token unit price × average input length + output token unit price × average output length, then multiplied by a retry factor.
- Engineering layer: concurrency throttling strategy, failure retry mechanism, and completeness of observability (logs, metrics, tracing).
A skeleton of an illustrative evaluation script is shown below; the key point is to compare “effect” and “performance” in the same table:
# Pseudocode: scenario-based benchmark evaluation frameworkcases = load_cases("my_task_set.jsonl") # each entry contains input, expected output, scoring functiondef evaluate(candidate, cases):rows = []for c in cases:t0 = time.perf_counter()out = candidate.generate(c.input)latency = time.perf_counter() - t0rows.append({"score": c.score(out), # effect layer"latency": latency, # performance layer"tokens": count_tokens(out), # cost layer"format_ok": check_format(out) # engineering layer})return summarize(rows) # output P50/P95 latency, average score, cost per task
4. Performance and Cost: The Underestimated Decisive Factors
In batch execution scenarios, inference throughput often matters more than “a slightly higher spot on the leaderboard.” Suppose two models have similar effect but their throughput differs by several times; then under the same concurrency budget, the higher-throughput option can serve several times the request volume, or achieve the same SLA with fewer resources. This is also why many teams ultimately choose the “good enough effect, faster speed” option.
Further optimization space comes from the engineering side rather than the model side:
- Prefix caching: place system prompts, fixed templates, and long document prefixes in reusable positions to reduce repeated computation.
- Batching and concurrency orchestration: aggregate small requests into batches to improve hardware utilization.
- Tiered routing: use a lightweight model for simple requests, and escalate only difficult requests to a strong reasoning model.
- Streaming output: improve the interactive experience and reduce perceived latency.
- Result caching and deduplication: directly hit the cache for high-frequency repeated questions.
A typical tiered routing logic can be expressed like this:
def route(req):if req.complexity == "simple" and req.max_latency_ms < 800:return fast_model # batch, extraction, classificationif req.need_rigorous_reasoning:return reasoning_model # proofs, refactoring, complex validationreturn default_model
It is worth emphasizing that self-hosting and calling a managed service are two different paths: the former requires evaluating compute resource pools, batch scheduling, and operations costs, while the latter focuses more on throttling, billing, and stability. Both should be compared based on the same set of metrics, rather than vaguely saying “which one is more cost-effective.”
5. Quality Assurance for Rigorous Reasoning Scenarios
For tasks like proofs and complex code generation, you cannot just look at whether “the output looks right.” It is recommended to introduce triple validation:
- Executable validation: code-type outputs go through compilation, unit tests, and static checks; structured documents go through format validators.
- Cross-validation: have a second model, or the same model with a different prompt, recompute, and compare whether the conclusions are consistent.
- Manual spot checks: keep a manual review step for high-risk conclusions, and record failed samples for the regression test set.
At the same time, design prompt constraints well, for example by specifying the output format, requiring step-by-step reasoning, prohibiting citing non-existent conclusions, and requiring the model to explicitly state assumptions when information is insufficient.
6. Deployment Checklist
- Are you evaluating with real business samples rather than public leaderboards?
- Are you recording all three types of metrics—effect, latency, and cost—at the same time?
- Have you set up failure retry and fallback strategies?
- Have you implemented cache reuse for prompts and document prefixes?
- Have you built a regression set to prevent effect regression caused by model or prompt changes?
- Have you desensitized sensitive data and enforced permission isolation?
7. Conclusion
The essence of model selection is to turn “vague impressions of strong and weak” into “measurable engineering decisions.” First decompose requirements by scenario, then run benchmark tests with unified metrics, and finally drive down costs through caching, batching, and tiered routing—this process guarantees more stable long-term deployment results than chasing a single ranking.
