LLM Selection and Evaluation: A Practical Methodology Guide

    Choosing the right large language model under budget pressure requires more than vendor benchmarks. This guide explains how to translate marketing claims into engineering metrics, apply a four-dimension evaluation framework covering quality, latency, efficiency, and cost, and read version-to-version comparisons correctly. It also outlines how to build a reproducible evaluation set, common pitfalls to avoid, and engineering-side optimizations to control cost without sacrificing quality.

    LLM Selection and Evaluation: A Practical Methodology Guide

    1. The Problem: Selection Under Cost Pressure

    When API spend becomes a line item that cannot be ignored, many teams face a dilemma. Sticking with a premium model compresses margins; switching to a cheaper model risks a drop in output quality and higher rework costs. Questions like “We can’t afford the overseas flagship model anymore — how does this new domestic release compare? Has anyone benchmarked it?” are common on social platforms. What they really reveal is not brand preference but the lack of a reproducible evaluation method.

    Release announcements usually focus on a few dimensions: the context window expanding from 128K to 200K tokens, improved code generation, tool calling during reasoning, writing style closer to human preferences, roughly 40% faster responses, and an overall ranking moving from 20th to 10th. These numbers are informative, but they answer “did the model get stronger?” rather than “is it worth it for my business?” Only a self-built evaluation set can answer the latter.

    2. Translating Vendor Metrics into Engineering Metrics

    There is a systematic mismatch between vendor metrics and engineering metrics, and each claim needs to be unpacked:

    • 200K context window: This determines how much code or documentation can be injected in a single call, but effective context is affected by mid-context recall decay — the advertised length is not the usable length.
    • Ranking jump: A relative position that depends on the composition of the benchmark and concurrent changes among competitors; it says nothing about absolute usability.
    • 40% faster responses: Distinguish time to first token (TTFT) from total completion time. Interactive applications are more sensitive to the former; batch jobs care about the latter.
    • Tool calling and agent capabilities: What matters in production is the validity rate of function-call argument structures and the completion rate of multi-turn tasks, not single-turn question-answering accuracy.

    The conclusion is straightforward: any selection decision should rest on a self-built evaluation set tailored to your business.

    3. A Four-Dimension Evaluation Framework

    Take a public benchmark of a new model version on roughly 15,000 questions: 68.7% accuracy, 59s average time per call, 2,851 tokens consumed per call on average, and RMB 37.6 per thousand calls. From this, four orthogonal dimensions can be abstracted:

    1. Quality: per-domain accuracy, not a single aggregate score;
    2. Latency: average time plus tail percentiles (P95/P99);
    3. Efficiency: tokens consumed per call, split into input and output;
    4. Cost: cost per call = token unit price × average token volume.

    These four constrain one another. Speed gains often come from more aggressive output truncation or shorter chains of thought, which can push accuracy down. Lower token consumption saves money but may also reduce reasoning depth. Evaluation must therefore look at all four at once — focusing on any single one leads to the wrong conclusion.

    4. How to Read a Version-to-Version Comparison

    The public data for this version versus the previous one: accuracy 66.6% → 68.7% (+2.1 points), time 98s → 59s (about -39.8%), tokens 2,944 → 2,851 (about -3.2%), cost per thousand calls RMB 38.8 → 37.6 (about -3.1%).

    By domain: law and public administration 72.7% → 80.3% (+7.6), education 41.2% → 46.9% (+5.7), healthcare and mental health +3.7 to 77.6%, reasoning and math +3.6 to 65.8%, finance +0.8 to 77.7%; while language and instruction following 66.2% → 64.6% (-1.6) and agents and tool calling 72.7% → 69.9% (-2.8%).

    Three methodological takeaways:

    • The aggregate score hides structural change. The 2.1-point overall gain is a weighted result of large gains in several domains and declines in two — a contrast with the officially emphasized agent improvements, showing that optimization involves scenario trade-offs.
    • The cost drop comes mainly from latency, not unit price. With the unit price unchanged, the 3.1% drop in cost per thousand calls moves in step with the 3.2% drop in tokens; the speed improvement benefits experience and throughput, not the bill.
    • Low-scoring domains are where the upside lies. Sub-50% accuracy in education means those scenarios still need human review or retrieval augmentation.

    5. Designing a Reproducible Evaluation Set

    1. # Example: stratified sampling + domain labels + repeated runs averaged
    2. cases = load_cases() # each item has prompt, domain label, reference answer
    3. sample = stratified_sample(cases, key="domain", ratio=0.15)
    4. def run(model_client, sample, repeats=3):
    5. records = []
    6. for c in sample:
    7. for _ in range(repeats): # cancel out sampling randomness
    8. r = model_client.call(c.prompt, temperature=0.2)
    9. records.append({
    10. "domain": c.domain,
    11. "correct": judge(r.text, c.answer),
    12. "latency": r.latency,
    13. "tokens": r.usage.total_tokens,
    14. })
    15. return aggregate(records) # output accuracy/latency/tokens per domain

    Design points: domain-stratified sampling prevents the long tail from being drowned out; a fixed low temperature plus repeated calls keeps variance down; log input and output tokens separately; report both the mean and P95 for latency.

    6. Common Pitfalls

    • Drawing conclusions from a few hundred questions, where the confidence interval is too wide to support a decision;
    • Measuring only accuracy while ignoring the experience damage that 59s-level latency causes in interactive scenarios;
    • Comparing unit prices directly while ignoring the real bill deviation caused by token consumption differences;
    • Overlooking regressions in instruction following and tool calling, which cause agent workflows to break frequently after launch;
    • An evaluation set whose distribution does not match production traffic, so the conclusions do not transfer.

    7. Engineering-Side Optimizations

    If evaluation shows a model meets your accuracy bar but costs too much, try these in order: trim prompts and redundant context; use retrieval augmentation instead of injecting very long context; add semantic caching to reuse frequent Q&A; route simple intents to a smaller model and fall back to the large model for complex tasks; constrain structured output to cut wasted tokens; combine streaming responses with monitoring, alerting, and logging to locate long-tail requests. If you run inference on your own cluster, container-platform autoscaling and batch scheduling can improve throughput.

    8. Conclusion

    The version upgrade delivers a modest accuracy gain, a nearly 40% drop in latency, and a slight token reduction — together an iteration that prioritizes experience with a small cost decrease. But the divergence across domains is a reminder that there is no universal best choice. Turning evaluation into a reproducible engineering process — stratified sampling, four-dimension metrics, repeated runs, per-domain attribution — is the reliable way to handle both cost pressure and quality anxiety. General-purpose model services from platforms such as Baidu AI Cloud, along with foundational capabilities like monitoring and logging, can serve as the runtime foundation for this process.