LLM Capability Benchmarking: Methodology and Engineering Practice

    This article explains how to correctly interpret LLM benchmark results and build a reproducible internal evaluation process. It covers how to read leaderboard scores, when tied rankings are statistically meaningful, stability metrics for agentic coding tasks (timeout rate, completion rate, retries), per-task cost calculation, hallucination evaluation methods, and how to turn evaluation findings into model selection and upgrade decisions.

    1. Prerequisites for Reading Leaderboard Numbers

    LLM benchmark leaderboards typically publish only aggregate scores, per-category scores, and cost figures. Selecting a model purely by rank is error-prone for three main reasons. First, scores are produced by a specific question set and scoring rule, and the scope of the question set determines what the score can actually tell you. Second, different evaluation organizations score differently—objective grading, human judgment, or model-based judgment. Third, model versions iterate quickly, and the same model may perform very differently across versions.

    Before citing leaderboard conclusions, readers should confirm three things: which capabilities the questions cover, how scoring is performed, and whether the evaluation process records timeouts, failures, and retries.

    2. The Logic Behind Tied Rankings

    When two models score very close to each other, the ranking order usually carries no statistical significance. Many evaluation rules define a tolerance—for example, score differences within a given threshold are treated as a tie. This threshold is part of the rule set, and there is no universal standard.

    When engineering teams cite a tied result, they should state the tolerance value used. To determine whether a gap is real, you can also look at the variance across multiple runs. If the score fluctuation of the same model across two runs approaches or exceeds the score gap, the ranking difference is not a sound basis for decision-making.

    3. Stability Metrics for Agentic Coding Tasks

    Agentic coding tasks test both code correctness and execution stability. Looking only at the pass rate misses an important class of problems: whether the model can return a result within the time limit. We recommend tracking the following metrics separately:

    • Timeout rate: the percentage of problems not completed within the time limit;
    • Completion rate: the proportion of runs in which all problems received valid output;
    • Retry count: how many times the same problem needed to be re-invoked.

    The timeout rate is calculated as: number of timed-out problems ÷ total number of problems × 100%. When the timeout rate is high, the real-world availability of an online service degrades even if per-problem accuracy is respectable. Therefore, model selection should compare pass rate and timeout rate together.

    4. How to Calculate Per-Task Cost

    Per-task cost is determined by the billable input and output token volumes and their respective unit prices. The calculation steps are:

    1. Count the input and output tokens for each problem;
    2. Convert them to cost using the respective unit prices, making sure price units are consistent—for example, normalized to per million tokens;
    3. Average the cost across all problems to get the mean per-task cost.

    Sample code:

    1. function cost_per_item(items, price_in, price_out):
    2. total = 0
    3. for item in items:
    4. total += item.input_tokens * price_in
    5. total += item.output_tokens * price_out
    6. return total / length(items)

    Cost reduction is calculated as: (old version per-task cost − new version per-task cost) ÷ old version per-task cost × 100%. This comparison must be based on the same question set and the same billing methodology. If the question set or billing rules differ, the reduction figure is not comparable.

    5. An Evaluation Approach for Hallucination Control

    Hallucination refers to model output that is inconsistent with facts or with the provided input. Evaluation can combine the following three methods:

    1. Factual Q&A: ask questions with clear ground-truth answers and measure the error rate;
    2. Source verification: require the model to cite its sources, then check item by item whether the sources actually exist and whether their content matches;
    3. Refusal ability: for questions beyond the model’s knowledge scope, observe whether it can explicitly state that it cannot determine an answer.

    A high score on a hallucination sub-category only means fewer hallucinations on that particular question set; it does not guarantee reliability across all business scenarios. Business systems should periodically sample and audit model outputs against their own knowledge bases and record typical error cases.

    6. Building a Reproducible Internal Evaluation Pipeline

    Public leaderboards work well as an initial screening tool, but teams still need an internal evaluation process as the final basis for decisions. The recommended practice is:

    1. Break down capability dimensions: based on business needs, split the evaluation into dimensions such as reasoning, coding, long-context processing, tool calling, and hallucination control;
    2. Maintain the question set independently: keep the internal question set separate from public benchmarks to avoid data contamination from question leakage;
    3. Fix evaluation parameters: standardize temperature, maximum output length, timeout limits, and retry policy so that different models are compared under identical conditions;
    4. Run multiple times and use statistics: run each model at least several times and record the mean and variance;
    5. Record cost in parallel: log token usage and cost for every run, producing conclusions along both performance and cost dimensions.

    7. Turning Evaluation Results into Engineering Decisions

    Model selection can proceed in the following order. First, filter candidate models that meet the required capability bar according to business priorities. Next, compare stability metrics, including timeout rate, completion rate, and variance. Finally, calculate the cost per unit task.

    For systems that run over the long term, selection should also account for compatibility and regression risks after version upgrades. After every model upgrade, rerun the evaluation on the internal question set to confirm that key capabilities have not regressed before deciding whether to switch.