Large Language Model Selection: Balancing Accuracy and Cost

    This article breaks down how to evaluate large language models for production use by balancing accuracy, latency, token consumption, and cost per thousand calls. Using a public Chinese benchmark dataset as a sample, it shows why "which model is stronger" is an ill-posed question without constraints, how lightweight model iterations deliver structural rather than uniform gains, and why latency and cost often move in opposite directions. It also outlines a reusable evaluation methodology and practical engineering patterns—tiered routing, caching, batching, observability, and a simple cost model—to turn benchmark results into architecture decisions.

    1. Background: Why “Which Model Is Stronger” Is the Wrong Question

    When teams integrate a large language model into a product, the most common question is “which model is the strongest.” From an engineering perspective, this question lacks constraints. Model capability, response latency, and cost per call form a triangle of competing forces, and any conclusion drawn without a specific scenario rarely translates into something actionable. A more practical framing is: given a minimum accuracy threshold, a maximum latency limit, and a monthly budget, which class of models is a viable solution.

    Recently, a cloud vendor released a preview version of a lightweight model, describing it as delivering near-usable capability at a fraction of the cost of the flagship version in the same series, while surpassing the previous generation on some public benchmarks. This kind of information is useful as a reference for selection, but it is not enough to support a decision, because it omits three critical quantities: accuracy under a real business distribution, end-to-end latency, and cost per call. This article uses a set of public Chinese evaluation data as a sample to abstract the general pattern of lightweight model iteration and to provide a reusable evaluation plan.

    2. Evaluation Framework: Four Metrics and One Methodology

    2.1 Four Core Metrics

    • Accuracy: the proportion of correct answers across multi-domain questions, reflecting the capability ceiling.
    • Average latency: the end-to-end wait time for a single call, which directly affects interaction experience and timeout rates.
    • Average token consumption: the combined input and output tokens per call, an intermediate variable for cost.
    • Cost per thousand calls: determined jointly by output price and token consumption, and the final basis for budget accounting.

    It is worth emphasizing that these four are not independent. Accuracy improvements usually come with longer reasoning chains, so token consumption and latency rise together. As a result, “cost reduction” and “efficiency gains” tend to show up as a drop in token unit price rather than an absolute drop in latency.

    2.2 Sample Data

    A preview version of a lightweight model performed as follows on roughly 15,000 questions: 71.5% accuracy, 72 seconds average latency, 2,731 average tokens, and a cost of about CNY 53.5 per thousand calls. The previous generation in the same positioning scored 60.6% accuracy with 40 seconds average latency. Between the two generations, accuracy improved by 10.9 percentage points and ranking jumped from 64th to 5th, while latency increased by about 32 seconds.

    2.3 Methodology Essentials

    The evaluation set must closely match the real business distribution; public benchmarks are only suitable for initial horizontal screening. The recommended approach is to sample 500–2,000 business questions from production logs, annotate standard answers, fix the temperature parameter and maximum output length, invoke calls serially within the same batch to rule out concurrency interference, and repeat each metric at least three times and take the median to avoid long-tail noise contaminating the conclusions.

    3. Interpreting the Results: Three Notable Signals

    First, the capability jump is structural rather than a uniform lift. In the education sub-domain, accuracy rose from 36.0% to 63.5%, an increase of 27.5 percentage points that nearly doubled; reasoning and math computation rose from 67.5% to 83.4%, up 15.9 percentage points; healthcare and mental health improved by 15.1%, and finance by 13.7%. This shows that the main gains of the new lightweight model come from closing reasoning and knowledge gaps, not from synchronized improvement across all domains.

    Second, the magnitude of gap-closing determines business usability. Education was previously a clear weak spot, and only after it was addressed did that scenario become viable for launch. This suggests that selection should prioritize the historical score in the target domain rather than the overall ranking.

    Third, latency and cost move in opposite directions. The 80% increase in latency indicates the model is doing more internal reasoning computation, and token consumption rises accordingly. If the cost per thousand calls is still significantly lower than the flagship version, it means the drop in unit price outweighs the token growth—and that is the real reason the “cost reduction” conclusion holds.

    4. Engineering Implementation: Turning Evaluation Results into Architecture Decisions

    4.1 Tiered Routing

    Split requests by difficulty: simple requests go to the lightweight model, and complex requests escalate to the flagship model. Illustrative logic:

    1. def route(prompt, meta):
    2. # Coarse-grained difficulty classification based on business signals
    3. if meta["domain"] in SIMPLE_DOMAINS or len(prompt) < 200:
    4. return LIGHT_MODEL
    5. if needs_deep_reasoning(prompt):
    6. return FLAGSHIP_MODEL
    7. return LIGHT_MODEL

    The key to routing is that the decision signal must be cheap—rules, keywords, or a small classification model can do the job—so routing itself does not become a new latency bottleneck.

    4.2 Caching and Batching

    Build a semantic cache for high-frequency repeated questions and return hits directly; for offline tasks, use batch asynchronous calls to move long latency off the user path. Together, these two typically deliver a several-fold improvement in effective throughput without sacrificing accuracy.

    4.3 Observability

    Feed accuracy, latency, token consumption, and failure rate into a logging service and monitoring alerts, tagged by model version to form time series that are comparable across versions. Without this baseline, no model upgrade can be validated for its benefits.

    4.4 Cost Model

    Use a simplified formula to project the budget:

    1. Monthly cost ≈ daily calls × 30 × (average tokens / 1000) × price per 1K tokens

    Plugging in measured token counts and unit prices lets you compare monthly spend across options and set degradation thresholds accordingly.

    5. Conclusion and Recommendations

    The new generation of the lightweight model has reached a near-usable range in accuracy, with clear gap-closing in weak domains, but the rise in latency is a cost that must be accepted. The recommended path is to first validate on a business set whether the target domain score clears the launch threshold, then control cost and latency with tiered routing and caching, and finally use a monitoring baseline for continuous regression. If you need managed model services along with supporting infrastructure such as object storage, message queues, and container platforms, Baidu AI Cloud can provide general-purpose capabilities; refer to the official documentation for specific specifications and pricing.