How to Evaluate and Choose an LLM: A Practical Guide with 200K Context Benchmark Data

    Choosing a general-purpose LLM on a limited budget is an engineering problem, not a branding one. Using public benchmark data from a model version upgrade as a sample, this article lays out a transferable evaluation and selection methodology: how to design a metric system across four dimensions, where the real boundaries of long context lie, the pitfalls of evaluating agents and tool calls, how to convert latency and cost, and how to cut spend with tiered routing and caching. It also includes a reproducible test harness and scoring strategy.

    When “we can’t afford the flagship model” becomes the norm, picking the right general-purpose LLM within a limited budget turns into an engineering problem rather than a branding one. This article uses public benchmark data from a single version upgrade of a general-purpose LLM as a sample, and abstracts from it a transferable methodology for evaluation and selection. It covers metric system design, the real boundaries of long-context capability, the evaluation traps around agents and tool calls, latency and cost conversion, and cost-reduction techniques such as tiered routing and caching.

    1. Why Selection Is Hard: It Is a Multi-Objective Trade-Off

    Many teams start by looking at leaderboard rankings, but a leaderboard only answers “who is smarter,” not “who fits my workload.” The real constraints are usually fourfold: quality must clear a business threshold, latency must feel acceptable in interactive use, the context window must hold your business material, and the per-call cost must survive your call volume. These four goals conflict with each other, and any version upgrade may raise accuracy while pushing up latency or token consumption. Evaluation therefore has to run across multiple dimensions at the same time.

    The sample reflects a typical upgrade scenario: a new version of a general-purpose LLM expanded its context window from 128K to 200K tokens, and claimed improvements in coding-tool integration, tool calling during reasoning, search-style agents, and writing style. Measured overall accuracy rose from 66.6% to 68.7%, ranking moved from 20th to 10th, average elapsed time dropped from 98 seconds to 59 seconds (about 39.8%), average tokens per call fell from 2944 to 2851, and cost per thousand calls declined from 38.8 CNY to 37.6 CNY. The value of these numbers is not the figures themselves, but that they demonstrate how “is this upgrade worth switching to” should be quantified.

    2. Metric System: Four Dimensions and Nine Capability Slices

    Fix your metrics into four categories so results stay comparable across versions:

    • Quality: overall accuracy plus per-domain accuracy. An overall score is easily diluted by high-frequency domains, so it must be broken down into fine-grained slices. The sample covers nine slices, including law and public administration, education, finance, healthcare and mental health, reasoning and math, language and instruction following, and agent and tool calling.
    • Efficiency: record both P50 and P95 for average elapsed time; a mean hides the long tail.
    • Resources: count input and output tokens separately, and distinguish “effective output” from “repeated output.”
    • Cost: use “cost per thousand calls” as the common unit, so it can be multiplied directly by your business call volume.

    The per-domain results in the sample are instructive: law and public administration rose from 72.7% to 80.3% (+7.6 percentage points), education from 41.2% to 46.9%, healthcare and mental health reached 77.6%, reasoning and math reached 65.8%, and finance reached 77.7%. Meanwhile, language and instruction following fell from 66.2% to 64.6%, and agent and tool calling fell from 72.7% to 69.9%. This is a reminder that a vendor’s headline claim of “agent improvements” may conflict with results on your own question set, usually because your toolchain, prompts, and calling protocol differ from the vendor’s demo environment. Evaluation conclusions must be bound to your own scenario rather than copied from marketing language.

    3. A Reproducible Evaluation Setup: Same Prompts, Fixed Parameters, Two Runs

    For trustworthy conclusions, the engineering key is controlling variables: the same question set, the same temperature and max output length, the same timeout and retry policy, the same concurrency, with two runs per version and the stable value taken. Example code:

    1. import time, json
    2. from concurrent.futures import ThreadPoolExecutor
    3. def call_model(client, prompt, max_tokens=2048, timeout=120):
    4. t0 = time.perf_counter()
    5. resp = client.chat.completions.create(
    6. model=MODEL_NAME, # injected via config for easy version switching
    7. messages=[{"role": "user", "content": prompt}],
    8. max_tokens=max_tokens,
    9. temperature=0.0, # disable randomness during evaluation
    10. timeout=timeout,
    11. )
    12. return {
    13. "elapsed": time.perf_counter() - t0,
    14. "usage": resp.usage.total_tokens,
    15. "text": resp.choices[0].message.content,
    16. }
    17. def run_suite(dataset, workers=8):
    18. with ThreadPoolExecutor(max_workers=workers) as pool:
    19. rows = list(pool.map(lambda d: call_model(CLIENT, d["prompt"]), dataset))
    20. total = len(rows)
    21. acc = sum(r["correct"] for r in rows) / total # correct is filled in by the scorer
    22. return {
    23. "samples": total,
    24. "accuracy": round(acc * 100, 1),
    25. "avg_latency_s": round(sum(r["elapsed"] for r in rows) / total, 1),
    26. "avg_tokens": round(sum(r["usage"] for r in rows) / total),
    27. }

    For scoring, a two-layer strategy of “rules first, model as fallback” is recommended: questions with reference answers go through exact match or numeric tolerance, open-ended questions are scored by another model for key-point coverage, and the scorer itself should be sampled for human review, so scoring error is not mistaken for model difference.

    4. The Real Boundary of Long Context

    A 200K window does not mean “you can stuff a whole book in.” In engineering terms, long context should be split into three independent tests: “needle in a haystack” recall with the key information at the beginning, middle, and end; the ability to choose between conflicting information across multiple documents; and the latency and cost amplification factor under long inputs. A practical rule is to keep around 20% headroom for output and system prompts, and to structurally compress very long material first (extract heading hierarchy, tables, and key passages), which both saves money and reduces the accuracy drop caused by attention dilution.

    5. What to Measure for Agents and Tool Calls

    For tool-calling scenarios, do not only check “did it get the final answer right”; also look at process metrics: tool selection accuracy, parameter structure validity rate, number of calling rounds, number of ineffective retries, and whether mid-reasoning tool calls succeed. The evaluation set should cover abnormal branches such as missing parameters, nonexistent tools, and self-correction after an error response, since these are the main sources of production failures.

    6. Four Cost-Reduction Levers: Routing, Caching, Compression, Batching

    Once accuracy clears the bar, the room for cost optimization is often larger than the gain from switching models:

    1. Tiered routing: send simple intents to a lightweight model, and escalate to the flagship only for complex reasoning;
    2. Semantic caching: reuse vector-retrieved answers for high-frequency repeated questions, with a usually substantial hit rate;
    3. Context compression: deduplicate, summarize, and keep only relevant fragments to cut input tokens directly;
    4. Batching and asynchrony: run offline jobs off-peak to improve throughput and smooth the billing curve.

    In practice, these capabilities can be built on general cloud services from Baidu AI Cloud, for example using a container platform to host evaluation and inference services, object storage to archive question sets and results, and logging plus monitoring and alerting to track latency tails and failure rates, so the evaluation pipeline itself gains observability and repeatability.

    7. Conclusion

    Whether to switch after a version upgrade depends on your per-domain scores and cost curve, not on the overall leaderboard position. Fix your question set, parameters, scoring, and statistical conventions, then run a single two-run comparison for each new version, and you get explainable decision input at the lowest trial-and-error cost. When the budget is tight, use routing and caching to bring cost down first, and then consider reserving the strongest general-purpose model capability for a few high-value scenarios.