LLM Model Selection Methodology: Balancing Accuracy and Cost
This article presents a repeatable methodology for evaluating large language models when accuracy and cost must be balanced. It explains why vendor benchmarks and headline pricing are insufficient for selection decisions, defines a four-part metric system covering accuracy, response time, token consumption, and total cost, and walks through four patterns observed in a typical lightweight model iteration. It also covers how to compare models correctly by cost tier and offers practical guidance on tiered routing and cost governance.
1. Why Model Selection Gets Harder After Every Release
Model vendors now iterate faster than ever, and a single model family often ships several variants at once: a flagship, a lightweight version, and a preview build. Lightweight variants are typically marketed as delivering performance close to the flagship at a fraction of the cost, often with claims of beating the previous generation on public benchmarks. For developers, these claims are leads, not selection criteria, for three reasons:
- Public benchmark question distributions differ from real business traffic, so leaderboard rank and production quality are not linearly related.
- Vendor-published “cost advantages” usually compare unit price only, while the actual bill is determined by unit price and token consumption together.
- A newly released version often runs on unstable server capacity, so latency measurements taken early tend to be pessimistic.
What is needed instead is a self-built, repeatable evaluation pipeline that turns “feels stronger” into “stronger on which dimensions, and at what cost.”
2. Metrics: Four Dimensions, None Optional
A credible evaluation covers at least the following four metric categories, all measured on the same question set, with the same prompts and the same sampling parameters.
- Accuracy: broken down by domain rather than reported as a single total. Two models with identical overall scores can differ enormously in business fit.
- Response time: end-to-end elapsed time, separating time to first token from total completion time, with the test window noted.
- Token consumption: input and output tokens counted separately. Output tokens are usually the dominant cost driver in long-form generation.
- Total cost: normalized as cost per 1,000 calls so versions and tiers can be compared side by side.
A simplified evaluation record can look like this:
{"model_alias": "lightweight-preview","total_items": 15000,"accuracy": 0.715,"avg_latency_sec": 72,"avg_tokens": 2731,"cost_per_1k_calls_cny": 53.5,"by_domain": {"education": 0.635,"reasoning_math": 0.834,"finance": 0.61}}
3. Reading the Results: Four Patterns from a Typical Iteration
Comparing a lightweight preview build against the previous lightweight release (roughly 15,000 questions, Chinese-language scenarios) yields four general patterns.
First, overall capability can jump in a step change. Accuracy rose from about 60.6% to 71.5%, an improvement of nearly 11 percentage points, moving the model from well outside the top ranks into the top five. A gain of this size suggests the lightweight line is not simple parameter pruning but a systematic rework of training strategy and data mix.
Second, the weakest domains improved the most. Education capability climbed from about 36.0% to 63.5%, up 27.5 percentage points and close to doubling; reasoning and math rose about 15.9 percentage points to 83.4%; healthcare and mental health, finance, and other domains also posted double-digit gains. The pattern: the lowest-scoring domains tend to capture the largest marginal return, which correlates with high knowledge density and previously thin training coverage.
Third, latency can move in the opposite direction. Average elapsed time went from about 40 seconds to 72 seconds. A traffic surge and visible server-side queuing right after launch is a classic cold-start effect; real latency should be sampled repeatedly after load stabilizes, and percentiles should be retained rather than the mean alone.
Fourth, the cost increase compounds from two sources. Cost per 1,000 calls rose from about CNY 43.2 to CNY 53.5, roughly 23.8%; within that, the output unit price increased from about CNY 18.1 to about CNY 21.3 per million tokens, while average token consumption grew from 2,586 to 2,731 (about 5.6%). A higher unit price and more verbose output push the bill up at the same time, so an evaluation must separate the two.
4. Comparing Models the Right Way: Tier First, Then Rank
The most common mistake in cross-model comparison is ranking models from different cost tiers against each other. A sounder approach is to bucket models by cost per 1,000 calls first, then compare accuracy within each bucket. In the CNY 50–100 tier, for example, a lightweight preview build achieved 71.5% accuracy at about CNY 53.5, giving it the best value in that tier: lowest cost and highest accuracy. In higher tiers, flagship models generally retain the lead on complex reasoning and long-context tasks.
Note that such conclusions hold only for general-purpose Chinese-language scenarios and may differ markedly in other languages and specialized vertical domains. Leaderboards are therefore useful for narrowing the candidate set; the final decision rests on your own evaluation set.
5. Implementation: Tiered Selection and Cost Governance
- Build tiered routing. Classify requests by difficulty, sending simple question answering to lightweight models and complex reasoning or long documents to flagship models, which can substantially lower average cost.
- Constrain output length with prompts. Output tokens are a cost amplifier; specifying length and structure requirements often delivers more immediate savings than switching models.
- Cache and batch. Add semantic caching for frequent repeated questions, and use batch endpoints for offline jobs to smooth out peaks and troughs.
- Observe first. Wire up logging and monitoring with alerting, and build dashboards for latency percentiles, token distribution, and failure rates to enable continuous regression checks.
- Roll out gradually. Send a small share of traffic to a new version first, run it against the same evaluation set, and confirm no regression before full rollout.
If your organization already uses Baidu AI Cloud capabilities, this workflow can be pinned to its container platform and object storage, giving you versioned evaluation data, traceable model calls, and attributable cost, which turns model selection from a one-off judgment into a sustainable engineering practice.
