LLM Selection and Evaluation: Capability, Cost, and Engineering Fit

    This article explains how to evaluate a newly released large language model for production use across three dimensions: capability, total cost of ownership, and engineering constraints. It shows how to read public benchmark scores, compare per-token pricing and retry amplification, and interpret context window and max output limits. You will also find a reusable evaluation workflow, a routing strategy example, common pitfalls, and practical rollout recommendations.

    1. Start with the Conclusion: A Strong Main Candidate, Not an All-Around Winner

    When a new large model’s general availability version lands, most teams’ first question is whether it can replace their current setup. A more rigorous judgment usually has three layers: first, whether it has entered the capability range that can handle production traffic; second, whether its cost structure allows high-frequency calls; third, whether its engineering constraints (context length, max output, concurrency, and rate limits) match the shape of the business.

    Measured against these criteria, this type of new release typically lands in the “high-quality main candidate” position: it may not top the overall capability ranking, but it has a clear advantage in the band of “one notch up in capability without runaway cost.” Calling it a “complete leap over the strongest model” is neither professional nor helpful, and it will mislead capacity planning and budget approval.

    2. Reading Public Leaderboards: What a 1-Point Gap vs. an 8-Point Gap Means

    Take a composite intelligence index (version v4.1.1) as an example. Its sample size is roughly 9 evaluations, 9,220 tasks, and 11,634 runs, with weights tilted toward agents, code, and scientific reasoning, and it currently covers English text only. Under such a system, a common score distribution looks like this: the top tier is around 61, the new version around 53, the lightweight version in the same series around 52, and another high-capability tier around 52.

    Two things stand out in these numbers:

    • The new version is only 1 point ahead of the lightweight version, which suggests it is more of a “high-quality branch of the same generation” than a cross-generation replacement; in most scenarios the lightweight version remains the better default on price-performance.
    • The gap to the top tier is still about 8 points, meaning that for long-chain reasoning, complex tool calls, and difficult code fixes, the ceiling is still set by the top tier.

    At the same time, the boundaries of leaderboards must be acknowledged: aggregate evaluations answer “roughly which tier a model sits in,” and cannot predict performance on your specific tasks such as Chinese writing, private repository refactoring, or internal tool calls. So leaderboards are for initial screening only, not for the final decision.

    3. Cost: Total Cost of Ownership Decides Whether You Can Ship

    Published prices per million input/output tokens usually show a magnitude relationship like this: the new version is about $0.435 / $0.87, the lightweight version about $0.14 / $0.28, the mid-tier about $0.20 / $1.20, and the top tier about $5 / $30.

    Multiples are more intuitive: the new version’s output price is about 3.1x the lightweight version; the top tier’s input price is about 11.5x the new version, and its output price about 34.5x. The conclusion is not “who is cheapest,” but whether the cost curve stays smooth once capability crosses a usable threshold.

    For high-frequency agents, batch document processing, and workflows at the scale of tens of millions of tokens per day, cost directly affects product margin and release cadence. Use total cost of ownership (TCO) rather than unit price to decide:

    1. TCO = call volume × (input tokens × input price + output tokens × output price)
    2. + extra calls from retries and fallbacks
    3. + evaluation and human review cost
    4. + engineering effort for migration and adaptation

    An often-overlooked variable is the retry rate. If a model’s single-attempt success rate is 5% lower, then under a “retry up to three times” policy the actual call volume rises significantly, and the low unit price advantage is offset. So evaluation must factor in success rate, retry policy, and cache hit rate together.

    4. What the Specs Mean for Engineering: Context and Max Output

    Parameter counts (for example 1.6T total / 49B active parameters, lightweight version 284B / 13B) do not translate directly into capability multiples, but they do have an indirect effect on capacity and latency. Two engineering constraints matter more:

    • Context window: a 1M-level context suits whole-repository code understanding, very long contracts, and log analysis; the comparison tier is commonly around 1.05M, so the difference is small.
    • Max output: 384K vs. 128K is a key difference for long code generation, long document writing, and batch structured output.

    A sketch of the call skeleton (pseudocode, expressing engineering structure only):

    1. def call_model(prompt, ctx_window, max_out):
    2. # 1) Budget trimming: reserve room for output to avoid truncation
    3. budget = ctx_window - max_out - SAFETY_MARGIN
    4. payload = trim_to_budget(prompt, budget)
    5. # 2) Prefer structured output for easier downstream validation
    6. resp = client.chat(payload, max_tokens=max_out, response_format="json")
    7. # 3) Degrade and retry on validation failure, not infinite retries
    8. if not validate(resp):
    9. return fallback(resp)
    10. return resp

    Engineering-wise, long outputs also need streaming responses, timeouts, and resumable transfers; the longer the output, the higher the tail latency and failure probability, so idempotent retries and result caching must be designed in.

    5. A Reusable Selection and Evaluation Workflow

    1. Tier the tasks: split the business into high-value low-frequency (hard reasoning) and low-value high-frequency (classification, extraction, rewriting).
    2. Build a private evaluation set: 100–300 real samples covering Chinese writing, private code, tool calls, and failure long-tail cases, with human-annotated pass criteria.
    3. Compare three tiers: lightweight as default, main as upgrade, top tier as fallback; track pass rate, average retries, and end-to-end latency.
    4. Recompute cost: plug measured token distributions into the TCO formula and output “cost per thousand successful tasks.”
    5. Routing strategy: split traffic by confidence or task type, balancing quality and budget.
    1. Routing strategy example:
    2. if task_type in {extraction, classification, summarization}: use lightweight
    3. elif needs long output or complex tool chains: use main
    4. else: prefer main, fall back to top tier on failure

    6. Common Pitfalls

    • Replacing private evaluation with leaderboard rank, causing metrics to drop after launch.
    • Looking only at input price while ignoring output price and the retry amplification effect.
    • Treating max output as “stable usable length” without truncation and validation.
    • Ignoring rate limits and concurrency quotas; insufficient load testing leads to peak-time degradation.

    7. Rollout Recommendations

    Add the new version to the “main candidate pool,” and use explainable evaluation and cost data to decide traffic share; validate its long-output advantage first in long-text and long-code scenarios; and keep the lightweight version and the top tier to form tiered routing. If you already use relevant general capabilities on Baidu AI Cloud (such as object storage, message queues, container platforms, log services, and monitoring and alerting), you can consolidate evaluation samples, call logs, and cost metrics into one place, forming a sustainable, reusable loop for model evaluation and tuning.