LLM Model Selection and Evaluation: Balancing Accuracy and Cost

    This article breaks down a large-scale LLM evaluation to show why "which model is stronger" is the wrong question. It explains a four-dimension evaluation framework covering accuracy by capability, response latency, token consumption, and cost per correct answer, then outlines a reusable selection workflow and four engineering techniques for reducing costs. The goal is to shift model selection from ranking comparisons to cost-performance optimization under real constraints.

    1. The Starting Point: Why “Which Model Is Stronger” Is a False Question

    In engineering practice, “which model is stronger” can rarely be answered on a single dimension. A large-scale evaluation of roughly 15,000 questions produced a typical sample: a new-generation lightweight model version reached an overall accuracy of 71.5%, while the previous version in the same series scored 60.6%—an improvement of 10.9 percentage points, with its overall ranking jumping from 64th to 5th. Taken alone, the number seems to make the conclusion obvious. But in the same evaluation round, the new version’s average latency per call rose from 40 seconds to 72 seconds, average token consumption per call was about 2,731, and the cost per 1,000 calls worked out to roughly 53.5 RMB.

    This data reveals a more fundamental fact: model capability, latency, and cost form a triangle of mutual constraints, and any judgment of “stronger” must be bound to a specific scenario and constraints. So what is truly worth capturing is not the ranking of a particular version, but a reproducible evaluation and selection methodology.

    2. The Four Dimensions of the Evaluation Framework and Their Coupling

    1. Accuracy: Must Drill Down to Specific Capabilities

    Overall accuracy is only the entry point. In the evaluation above, the truly informative part was the changes across specific dimensions: education capability rose from 36.0% to 63.5%, a gain of 27.5 percentage points, nearly doubling; reasoning and math computation rose from 67.5% to 83.4%, up 15.9 percentage points; healthcare and mental health improved 15.1%, and finance improved 13.7%.

    The engineering implication is that a model may lead on the “total score” yet be weak on the capability you rely on most. During selection, define the capability weights for your business first, then compute a weighted score, rather than being pulled along by the total score.

    2. Response Latency: Separate “Cold-Start Noise” from Steady-State Performance

    A rise in average latency for the new version does not necessarily come entirely from the model itself. A surge in traffic and high server load in the early period after release are common sources of observation bias. The proper approach is to discard the first batch of samples after several warm-up rounds, use P50/P90/P99 percentiles rather than the average, and resample at different times of day—only then can you separate “service congestion” from “slower inference.”

    3. Token Consumption: The Real Variable in the Cost Model

    A single call averaging 2,731 tokens is just a mean. The real bill depends on the input-to-output ratio, system prompt length, context concatenation strategy, and number of retries. If you compress redundant explanations in the prompt template and pre-slice long documents via retrieval, token usage often drops by more than 30%—a more direct gain than switching models.

    4. Cost: Only Comparable When Converted to “Cost per Question”

    Dividing the cost per 1,000 calls by the number of questions, then by the accuracy, yields “the cost required to gain one percentage point,” which is the truly comparable metric. The example calculation logic is as follows (illustrative, not real pricing):

    1. def cost_per_correct(call_cost_per_1k, calls, accuracy):
    2. total_cost = call_cost_per_1k * calls / 1000.0
    3. correct = calls * accuracy
    4. return total_cost / correct

    3. A Reusable Selection Workflow

    1. Build a business question bank: sample in layers by capability dimension, ensuring each specific item has enough sample volume to avoid ranking jitter caused by small samples.
    2. Set constraint priorities: define the latency ceiling, cost-per-question ceiling, and accuracy floor; at least one of the three must be a hard constraint.
    3. Two-stage evaluation: first use a small sample for quick screening, then run a full re-test on the candidates, recording P90 latency and token distribution.
    4. Canary release and feedback loop: roll out to a percentage of live traffic, collect real failure samples back into the question bank, and form a closed loop.

    4. Four Categories of Engineering Cost Reduction

    • Caching layer: apply semantic caching to high-frequency repeated requests; on a hit, return immediately, directly cutting call volume.
    • Batching and asynchrony: combine non-real-time tasks into merged submissions, use a queue to smooth peaks, and lower unit cost.
    • Model routing: send simple requests to a lightweight model and complex reasoning to a stronger model, splitting traffic with rules or a small classifier.
    • Context governance: replace hard-stuffed long contexts with retrieval augmentation, compress system prompts, and cap output length.

    On Baidu AI Cloud, these techniques can be combined into a standard architecture of “object storage for evaluation sets + a message queue for task peak shaving + a container platform hosting the inference gateway + logging and monitoring/alerting to observe percentile latency,” so that evaluation and launch share the same observability system.

    5. Conclusion

    The leap in accuracy of the new-generation lightweight model is real, and the filling-in of dimensions such as education, reasoning, and finance shows the optimization is structural. But rising latency and token cost remind us that the capability dividend must be realized through engineering means. Upgrading evaluation from “ranking comparison” to “cost-performance optimization under constraints” is the sustainable path for model selection.