LLM Model Selection: A Practical Guide to Two-Tier Architecture and Cost Control
This article explains why a two-tier LLM architecture has become a common default in production systems, where the most capable model is often the most expensive and slowest while the cheapest, fastest model struggles with complex reasoning. It presents a four-dimension evaluation framework (task success rate, cost per task, latency and throughput, controllability), a three-tier positioning model, an expected-cost formula that accounts for retries, and a routing and fallback design with code examples. It also covers observability, tuning order, and a deployment checklist, showing how to align model selection with task value and cost structure.
1. Background: Why the Two-Tier Model Is Becoming the Default Architecture
Once large language models enter production systems, teams commonly run into a structural conflict: the most capable models tend to have the highest unit price and the slowest response, while the cheapest and fastest models struggle to handle complex reasoning tasks. Early on, many projects relied on a “single model for everything” strategy. The result was either rapidly inflating bills or sacrificing task success rates to save money.
A more pragmatic approach has gradually taken shape: split models into two tiers. The first tier handles the ceiling-pushing tasks that demand peak capability, such as long-chain scientific reasoning, complex industrial simulation, cross-system refactoring, and hard-to-diagnose defect localization. The second tier handles high-frequency everyday calls, such as routine code generation, structured extraction, ticket classification, and the tool-calling loops of an AI Agent. The scenario described in the source material is exactly this: a single release introduced both a reloaded flagship and an all-around workhorse. The flagship captured most of the attention, but the model actually suited to the default option was the cheaper, faster one sitting next to it—its gap to the flagship was minimal on public coding benchmarks, while its task cost was only about one-fifth that of the flagship.
The engineering implication of this phenomenon matters more than the parameters themselves: the marginal return on capability is decaying quickly, while the marginal impact of cost accumulates linearly. So the core selection question is not “which model is the strongest,” but “on which tasks is the capability difference worth paying several times the cost.”
2. A Tiered Evaluation Framework: Four Dimensions, Not a Single Benchmark
Looking only at a composite intelligence index is easy to misjudge. A four-dimension matrix is recommended for tiering:
- Task success rate: the first-pass rate on your own business dataset, not a public leaderboard score. Leaderboards are a necessary reference, but their distribution differs greatly from real traffic.
- Cost per task: measured as “completing one business task,” not as price per million tokens. The former is what aligns with the budget.
- Latency and throughput: time to first token determines the interactive experience, and end-to-end duration determines whether an Agent loop can converge.
- Controllability: stability of structured output, instruction following, information retention in long contexts, and the risk of refusals or overreach.
A sample evaluation record structure can be written as:
from dataclasses import dataclass@dataclassclass ModelProfile:name: strtier: int # 1=frontier tier, 2=workhorse tier, 3=high-frequency execution tiersuccess_rate: float # first-pass rate on your own business datasetcost_per_task: float # expected cost to complete a single taskp95_latency_ms: intjson_valid_rate: float # structured output compliance ratedef choose(profile_list, task):if task.requires_deep_reasoning:pool = [p for p in profile_list if p.tier == 1]elif task.qps > 50:pool = [p for p in profile_list if p.tier == 3]else:pool = [p for p in profile_list if p.tier == 2]return max(pool, key=lambda p: p.success_rate / p.cost_per_task)
The key point is to make “whether deep reasoning is required” and “call frequency” explicit criteria, rather than leaving developers to pick by feel each time.
3. Three-Tier Positioning: Spend the Budget on the Right Tier
A common industry tiering can be abstracted into three layers, with price decreasing and capability adjusting accordingly by tier (the following are generic tier characteristics and do not point to any specific product):
- Frontier tier: aimed at extreme research and heavy-duty problem solving, with the highest input and output unit prices, suited to low-frequency, high-value tasks that can tolerate longer waits.
- Workhorse tier: aimed at everyday development and production, with a unit price about one-quarter to one-fifth of the frontier tier. The capability gap is not significant on most engineering tasks, making it the best candidate for the default option.
- High-frequency execution tier: aimed at an Agent’s batch tool calls, routing decisions, and format conversion, with the lowest unit price. Combined with small-model-level solutions, it can further reduce marginal cost.
A counterintuitive but important conclusion is that the benchmark ranking between tiers does not match the “business return ranking.” When the gap between the second tier and the first tier is smaller than the task’s own tolerance for error, choosing the first tier merely converts budget into insurance with extremely low marginal return. Conversely, in scenarios like cross-system refactoring where the cost of errors is extremely high, the premium of the first tier is justified.
4. Cost Model: Use Expected Cost Instead of Unit-Price Comparison
Let the first-pass rate of a task be s, the retry limit after failure be n, and the cost of a single call be c. The expected cost is approximately:
E[cost] = c * (1 + (1-s) + (1-s)^2 + ... + (1-s)^n)
This formula explains a common trap: if a cheap model has a low pass rate, retries can push the cost up, even beyond that of an expensive model. So the “one-fifth cost” claim only holds under the premise of an equal pass rate. In engineering, you should measure s separately for each type of task and then substitute it back into the calculation, rather than following the marketing narrative.
Non-call costs must also be counted: the human intervention caused by queue waiting, the labor cost of failed tasks entering a manual queue, and the downstream re-run cost caused by unparseable output. These often account for a considerable share of total cost.
5. Routing and Fallback: Putting the Two Tiers into Code
A three-layer structure is recommended: an entry classifier, a main execution model, and a fallback and degradation chain.
def run(task):plan = router(task) # tier-3 small model judges intent and difficultyif plan.difficulty >= 0.8:return retry(frontier_model, task, n=2)result = retry(main_model, task, n=2)if not validator(result):result = retry(frontier_model, task, n=1) # escalation fallbackreturn resultdef retry(model, task, n):for i in range(n):r = model(task)if validator(r):return rtask = task.with_feedback(r) # feed the failure reason back inreturn fallback_default(task)
There are three design points. First, the difficulty judgment itself must be low-cost; otherwise the routing overhead eats up the savings. Second, the escalation fallback must have a cap to avoid cost spiraling out of control. Third, the validator must be independent of the generation model—ideally based on rules, type constraints, or unit tests, rather than having the model evaluate itself.
6. Observability and Continuous Tuning
Without measurement there is no optimization. At a minimum, you need to collect: pass rate by model, retry count distribution, end-to-end latency percentiles, cost per task, and clustering of failure reasons. Tagging by business scenario to build dashboards and configuring monitoring alerts for abnormal fluctuations is recommended. Logs and distributed tracing should be collected in a unified way, making it easy to trace back whether a given failure was a model capability problem or a prompt and context problem.
The recommended tuning order is: first fix prompts and context construction, then change tiered routing, and only then consider swapping models. In practice, many conclusions that “the model is not good enough” ultimately trace back to missing context or unclear output constraints.
7. Deployment Checklist
- Have you replaced public leaderboards with your own business dataset as the decision basis;
- Do you budget by “cost per task” rather than unit price;
- Is the default option set to the second tier, with explicit escalation available for demanding scenarios;
- Is there an independent validator and a retry cap;
- Do you have monitoring alerts and a cost dashboard by model and by scenario;
- Have you reserved a lower-cost tier, caching, and batch processing capability for the high-frequency execution layer.
8. Conclusion
The real value of a two-tier release is not that there is one more powerful flagship, but that it turns “capability that is strong enough” into a default option that can be called frequently. For developers, this is a reminder at the architecture level: model selection should be subordinate to task value and cost structure, using tiering, routing, validation, and observability to keep the capability ceiling within controllable engineering boundaries. If an organization wants to implement a similar architecture on Baidu AI Cloud, it can directly use a combination of general-purpose capabilities—a container platform to host inference services, a message queue for peak shaving, object storage to hold corpora and artifacts, and log services with monitoring alerts to support the measurement loop—thereby preserving freedom of selection without being locked into a single model.
