LLM Selection Guide: Understanding Chinese Capability Benchmarks and Cost Metrics
This guide explores how to effectively evaluate and select large language models (LLMs) by looking beyond benchmark total scores. It covers interpreting score differences, analyzing timeout rates for agent programming tasks, categorizing hallucination metrics, calculating true per-task costs based on token usage, and setting up a reproducible internal evaluation process. By following this framework, technical teams can make data-driven decisions that align with their specific business requirements and budgets.
1. Why Benchmark Total Scores Cannot Directly Determine Model Selection
Public benchmarks typically provide an overall score for quick comparisons. However, this composite score is a weighted result of multiple sub-task scores, with weights determined by the evaluators, which may not align with your actual business workloads. A model that scores high on general Q&A might perform mediocrely on long codebase comprehension, structured output, or multi-turn tool calling.
Therefore, when reading benchmarks, you should first answer three questions:
- What types of tasks does the evaluation dataset cover, and do they overlap with your business needs?
- How are the weights for each sub-category calculated, and is this information public?
- Do the runtime conditions during evaluation (timeout thresholds, retry strategies, context length) closely match your production environment?
Only by clarifying these three points does the total score hold reference value.
2. Score Differences and Ties: How to Judge if the Gap is Real
Many evaluations segment scores. For example, rules might stipulate that results within a certain range are considered a tie. This practice aims to prevent interpreting statistical noise as capability differences.
To determine whether a score difference is meaningful, consider the following points:
- Does the evaluation run multiple times and provide a fluctuation range? Scores from a single run can fluctuate by several points due to random sampling and network jitter.
- Is the number of test questions sufficient? With a small question bank, the results of just one or two questions can cause noticeable score jumps.
- Are the score differences compared within the same evaluation version? Scores across different versions or question banks cannot be directly subtracted.
In practice, it is recommended to treat score differences larger than the evaluation’s own fluctuation range as valid differences. Other cases can be categorized into the same tier, with final decisions made by combining cost and latency factors.
3. Agent Programming Scenarios: Timeout Rate Matters More Than Average Score
Programming-related agent tasks typically involve multiple steps: reading files, generating patches, running tests, and fixing errors based on reports. If any step gets stuck, the entire task fails. Therefore, the timeout rate is a key metric for engineering usability and often reflects the real-world experience better than the average score.
Take a hypothetical test as an example (numbers are for demonstration only): A model times out on 40 out of 100 questions. The average score might look acceptable, but only 60 tasks yield deliverable results. This means the timeout rate directly determines the success rate of your automated pipeline.
When evaluating agent programming capabilities, it is recommended to track the following metrics:
- Task completion rate: The proportion of tasks that end normally and produce executable results.
- Timeout rate: The proportion of tasks that do not finish within the set time limit. The time limit should align with the real constraints of your CI or development tools.
- First-time pass rate: The proportion of tests that pass on the first attempt without human intervention.
- Average rounds: The number of interactions required to achieve the correct result. More rounds mean higher latency and cost.
Setting the timeout threshold requires caution. A threshold that is too short will penalize models with deeper reasoning capabilities, while one that is too long will mask slow response issues. It is recommended to test two or three different thresholds under the same hardware and network conditions to observe the stability of the results.
4. Hallucination Control: Replacing Total Scores with Sub-metrics
Hallucinations refer to model outputs that are inconsistent with facts or input materials. In scenarios such as Q&A, summarization, and code comment generation, hallucinations can directly lead to incorrect decisions.
Hallucination evaluation can be broken down into three categories:
- Factuality hallucinations: Fabricating non-existent data, names, version numbers, or interfaces.
- Faithfulness hallucinations: Adding information not present in the source text during summarization or rewriting.
- Reasoning hallucinations: Logical intermediate steps but conclusions that contradict the premises.
Evaluations should design questions for these three categories separately and track the error rate for each. If your business focuses primarily on document Q&A, the weight of faithfulness hallucinations should be higher than that of factuality hallucinations. Additionally, requiring the model to output “I don’t know” or flag uncertainty when unsure is an effective way to mitigate risks.
5. Cost Per Task: Calculating Based on Real Token Consumption
The cost per task is the expense generated by a model during a single task. It is determined by input tokens, output tokens, and unit pricing. When calculating, note the following points:
- Agent tasks require multiple model calls, so total token consumption is typically much higher than a single Q&A interaction.
- The unit price for output tokens is generally higher than for input tokens; long outputs will significantly drive up costs.
- Failed and timed-out tasks are still billed. These should be included in the total cost and then divided by the number of effectively completed tasks to get the true unit cost.
The calculation formula is as follows:
Cost per task = (Σ input tokens × input unit price + Σ output tokens × output unit price) ÷ total number of evaluation tasks
Below is a sample code snippet to calculate the average cost per task for an evaluation:
def cost_per_task(records, price_in, price_out):"""records: List of task records, containing input_tokens and output_tokens fieldsprice_in / price_out: Price per million tokens, determined by your service contract or quote"""total = 0.0for r in records:total += r["input_tokens"] * price_in / 1_000_000total += r["output_tokens"] * price_out / 1_000_000return total / len(records)
The unit prices in the code should be taken from your actual billing plan. Prices may vary at different times and usage tiers, so cost data should be annotated with the statistical date.
6. Building a Reproducible Internal Evaluation Pipeline
Public benchmarks are suitable for initial screening, but final selection requires internal evaluation based on your own data. A reproducible pipeline typically includes the following steps:
- Build a question bank: Extract samples from real tickets, code repositories, or documents, anonymize them, and ensure they cover major business scenarios.
- Fix runtime conditions: Standardize temperature, context length, timeout thresholds, and retry counts.
- Multiple runs: Run each model at least three times and record the mean and standard deviation.
- Sub-metric scoring: Record metrics separately by task completion rate, timeout rate, hallucination rate, and cost.
- Version management: Save the versions of the question bank, evaluation scripts, and models for future re-testing.
Below is a structural example of an evaluation framework:
def evaluate(model_client, tasks, timeout_s, runs=3):results = []for run_id in range(runs):for task in tasks:record = {"run": run_id, "task_id": task["id"]}try:output = model_client.generate(task["prompt"], timeout=timeout_s)record["status"] = "ok"record["output"] = output.textrecord["input_tokens"] = output.usage.input_tokensrecord["output_tokens"] = output.usage.output_tokensexcept TimeoutError:record["status"] = "timeout"results.append(record)return results
Here, model_client is your unified wrapper interface that shields the differences between various services. The advantage of this approach is that when replacing a model, you only need to change the client implementation, while the question bank and scoring logic remain unchanged.
7. Model Selection Decision Framework
After completing the internal evaluation, you can make decisions in the following order:
- Step 1: Filter out models that do not meet hard requirements, such as insufficient context length, lack of support for required output formats, or failure to meet data compliance standards.
- Step 2: Compare task completion rates and timeout rates to eliminate options with significantly lower usability.
- Step 3: Compare hallucination rates and determine acceptable thresholds based on business risks.
- Step 4: Calculate the cost per task and end-to-end latency to finalize the solution within your budget.
It is important to note that the weights of different factors vary greatly across businesses. Customer-facing Q&A services prioritize hallucination control, while internal code automation prioritizes timeout rate and cost. These weights should be jointly determined by the business owner and the technical team and documented in the evaluation report.
8. Implementation Checklist
- Use public benchmarks only for initial screening; rely on internal evaluation for final conclusions.
- Treat score differences as valid only if they exceed the evaluation’s own fluctuation range.
- For agent tasks, simultaneously record completion rate, timeout rate, and average rounds.
- Track hallucinations separately across factuality, faithfulness, and reasoning categories.
- Ensure cost per task includes fees for failed and timed-out tasks, and annotate the pricing date.
- Save all evaluation question banks, scripts, and model versions to support re-testing.
