LLM Selection and Evaluation: A Practical Guide for Production Workloads

    Choosing the right large language model is no longer just a procurement decision but an engineering one, especially when high call volumes turn small per-request costs into unsustainable bills. This guide breaks down a reusable evaluation framework covering accuracy, latency, token consumption, and cost, using a minor version upgrade of a Chinese LLM as a sample. It shows why aggregate scores can hide domain-level regressions, and offers a step-by-step implementation path from building a business-aligned test set to running canary rollouts and regression checks. Ideal for teams looking to replace expensive models without sacrificing quality in agent, coding, or knowledge-QA scenarios.

    1. Background: When Call Cost Becomes the First Barrier to Scale

    Once agent applications, coding assistants, and knowledge Q&A systems start rolling out in volume, most teams run into the same practical problem: a single call looks cheap, but multiply it by hundreds of thousands of daily calls and the bill quickly grows to an unmanageable level. The question “can we replace this with a cheaper model” stops being a procurement issue and becomes an engineering one.

    But replacement cannot be based on gut feeling. A model that looks impressive in a demo may fail at scale in a real business flow because of unstable instruction following, malformed tool-call formats, or long-context truncation. The right approach is to first build an evaluation system that is quantifiable, reproducible, and comparable across models, and only then discuss selection.

    This article uses a typical minor version upgrade of a Chinese LLM as a sample, abstracts its evaluation methodology, and presents it so teams can reuse it on their own business data.

    2. Four Core Dimensions of an Evaluation Framework

    A complete model evaluation should not only ask “is the answer correct.” It should cover at least the following four categories of metrics:

    Dimension Meaning Engineering Significance
    Accuracy Correct ratio on a labeled dataset Determines business usability and manual fallback cost
    Average latency End-to-end latency per call Determines interaction experience and concurrency capacity planning
    Token consumption Total input + output tokens per call Affects context budget and truncation strategy
    Overall cost Fee per 1,000 calls Maps directly to the monthly bill

    The key is joint analysis: a 2-percentage-point accuracy gain that doubles latency may be a negative optimization in real-time conversation scenarios; a 3% drop in token consumption combined with a 40% drop in latency improves both capacity and experience at the same time.

    3. Reading the Sample Data: The Real Gains of a Minor Upgrade

    On roughly 15,000 test questions, this version showed an overall accuracy of 68.7%, an average latency of 59 seconds, an average token consumption of 2,851, and a cost of 37.6 CNY per 1,000 calls.

    Compared with the previous version, four conclusions stand out:

    • Steady overall capability improvement: accuracy rose from 66.6% to 68.7%, and the overall ranking jumped from 20th to 10th, a notable advance within the same tier.
    • Major response speed optimization: average latency dropped from 98 seconds to 59 seconds, a reduction of about 39.8%. This is the most engineering-valuable item in this upgrade and directly determines whether long-chain agent tasks can be deployed.
    • Small resource efficiency gain: token consumption fell from 2,944 to 2,851, a reduction of about 3.2%, indicating lower output redundancy.
    • Cost declined accordingly: the fee per 1,000 calls dropped from 38.8 CNY to 37.6 CNY, a reduction of about 3.1%, delivering better value at an unchanged unit price.

    The vendor highlighted improvements including expanding the context window from 128K to 200K, stronger adaptation for coding scenarios, support for tool calls during reasoning, and writing styles closer to human preferences. These are capability claims that need to be cross-validated with evaluation data.

    4. Breakdown by Domain: Averages Hide Real Divergence

    Looking only at the total score is misleading. Broken down by domain, clear imbalances appear:

    • Law and administrative affairs: 72.7% → 80.3%, up 7.6 percentage points, the biggest highlight;
    • Education: 41.2% → 46.9%, up 5.7 percentage points, but the absolute level remains low;
    • Healthcare and mental health: up 3.7 percentage points to 77.6%;
    • Reasoning and math: up 3.6 percentage points to 65.8%;
    • Finance: up 0.8 percentage points to 77.7%;
    • Language and instruction following: 66.2% → 64.6%, down 1.6 percentage points;
    • Agent and tool calling: 72.7% → 69.9%, down 2.8 percentage points.

    The last group is especially worth noting: it contrasts with the vendor’s claim of “enhanced agent capabilities.” A reasonable explanation is a capability trade-off—after expanding the context window and strengthening the reasoning chain, the model tends to produce longer reasoning on complex tasks, which dilutes strict adherence to output formats and call protocols.

    The engineering takeaway is direct: do not make selection decisions based on the total score; decide based on the two or three domains that matter most to your business. If your scenario is tool-intensive agent orchestration, you must separately construct metrics such as tool-call accuracy, parameter structure validity, and multi-turn state retention.

    5. A Reusable Evaluation Implementation Path

    1. Build a business-aligned evaluation set

    Sample real requests from production logs, use stratified sampling by business share, and keep the size between a few thousand and tens of thousands of questions. Questions need standard answers and scoring rules; subjective questions use human or strong-model cross review.

    2. Fix evaluation environment variables

    Unify temperature, maximum output length, system prompt, and retry strategy, and log input/output token details for every call to avoid incomparable data across batches.

    3. Aggregate in layers instead of reporting only averages

    Illustrative aggregation logic:

    1. def summarize(records):
    2. overall = {
    3. "accuracy": mean(r.correct for r in records),
    4. "latency_p95": percentile([r.latency for r in records], 95),
    5. "tokens_avg": mean(r.in_tokens + r.out_tokens for r in records),
    6. }
    7. by_domain = {}
    8. for domain in {r.domain for r in records}:
    9. subset = [r for r in records if r.domain == domain]
    10. by_domain[domain] = {
    11. "accuracy": mean(r.correct for r in subset),
    12. "count": len(subset),
    13. }
    14. return overall, by_domain

    Always look at P95 latency as well; averages hide long-tail timeouts.

    4. Build a cost model

    1. Monthly cost ≈ (daily calls × 30 / 1000) × cost per 1,000 calls

    Convert accuracy into a “manual review rate” and factor quality loss into total cost; only then can you fairly compare low-price and high-price models.

    5. Canary and regression

    Before a new version goes live, run a small-traffic canary first, keep a fixed regression set, and rerun it on every vendor-side version change to prevent silent capability regressions.

    6. Deployment Recommendations

    If your team is cost-sensitive and tasks are mainly Chinese office work, legal, and financial Q&A, this type of Chinese model is already a viable replacement. If complex agent orchestration and strict structured output are core, keep a dual-model router: use a cost-effective model on the main path, and automatically escalate to a stronger model for retry when format validation fails or confidence is low. Also connect the evaluation pipeline to continuous integration, and use logging services plus monitoring and alerting to observe real online quality, turning selection from a one-time decision into a continuously operated capability.