LLM Math Reasoning Evaluation: Read Leaderboard Gaps Before Model Selection

    Model selection should not rely on an overall leaderboard alone. This article explains how to evaluate models across math reasoning, code engineering, and agent collaboration, why headline open-source models trade wins and losses in engineering-heavy tasks, where gaps to top closed-source models appear, and how to build a layered private evaluation system with practical safeguards for API errors, answer extraction, sandboxed code tests, and routing monitoring.

    Model selection should not rely on an overall leaderboard alone. Evaluate models by at least three dimensions: math reasoning, code engineering, and agent collaboration. The data below comes from a public paraphrase of a comprehensive evaluation report. The original report did not provide model names, leaderboard version, or test date. Verify against the original report before use.

    1. Among leading open-source models: wins and losses are mixed, with differences concentrated in engineering scenarios

    In a comprehensive leaderboard covering 34 evaluation dimensions, one Chinese open-source model compared with another open-source model at the same level achieved 27 wins and 7 losses. This shows that leading open-source models are very close in capability, and leadership in a single dimension is unlikely to represent the overall level.

    The 7 losses were mainly concentrated in engineering-heavy scenarios, including automated testing benchmarks, backend development simulations, and specific infrastructure test sets. These tasks require the model to understand complex business logic and generate code or configuration files with strict formats. One wrong character in the format can invalidate the entire result.

    Among the wins, the terminal operation benchmark scored 44.4 versus 42.3, and the 3D modeling task scored 37.1 versus 32.3, leading by about 2.1 points and 4.8 points respectively. The gaps are not large, and random variation from a single run could offset such an advantage. Readers should therefore treat these results as reference points, not as a basis for model selection.

    For developers, the conclusion is direct: open-source models are already usable for routine code generation and daily engineering assistance, but on long-chain, low-tolerance professional tasks, different models perform noticeably differently. High benchmark scores do not equal good business results. Fine-grained validation on your own tasks is required.

    2. Comparison with top closed-source models: the gap is mainly in math and complex reasoning

    In the same report, this Chinese open-source model won only 6 of the 34 evaluations and lost 28. This gap is much larger than when it was compared with open-source models at the same level.

    Most of the 6 winning tests were institution-developed evaluation sets, such as enterprise knowledge base question answering and search for specific daily-life scenarios. Only a few were public code engineering benchmarks. On the public code benchmark, the scores were 78.9 versus 78.8, almost tied. A 0.1-point difference in a single evaluation is not enough to draw a conclusion; multiple runs and reported variance are needed before comparison.

    The report’s conclusions can be summarized in three points. Table 1 lists the meaning of each category.

    Table 1: Main manifestations of the gap

    Scenario Observed phenomenon Implication for model selection
    Math and multi-step logical deduction The closed-source model is more stable on unseen advanced math problems and multi-step derivations For financial calculations and precise derivation tasks, validate closed-source models first on a private set
    Specific business scenarios The open-source model performs well on custom closed test sets Scores on custom sets may come from targeted optimization and do not necessarily represent general capability
    Agent collaboration The closed-source model is more accurate in multi-turn tool calls and task decomposition Multi-step Agent workflows require separate testing of tool-call success rates

    The report attributes the math gap to differences in parameter scale and alignment techniques, but it does not provide public evidence such as ablation experiments. Readers should treat this explanation as a hypothesis.

    3. Build your own evaluation system

    Relying only on public leaderboards for model selection can easily lead to “high benchmark scores but poor business performance.” A more reliable approach is to build evaluation sets relevant to the business and manage them in layers.

    Table 2 presents one layered approach. Teams should set passing thresholds based on business error tolerance, and it is recommended to use the current model in use as the baseline.

    Table 2: Layered evaluation plan

    Layer Sample source Main metrics Manual review ratio
    Basic capability layer Public math and code benchmarks, such as MATH, GSM8K, and their variants Accuracy, split by question type Sample 5% to check whether answer extraction is incorrect
    Business scenario layer Drawn from de-identified historical enterprise data, with sample versions recorded Business metrics, such as field accuracy and proper-noun recognition rate Sample 10%, with blind scoring by domain experts
    Adversarial and boundary layer Long-tail questions, adversarial prompts, and questions beyond the knowledge scope Hallucination rate and reasonable refusal rate Full review of high-risk outputs

    The sample size at each layer should be sufficient to support comparison results. When comparing the accuracy of two models, use Bootstrap or Wilson intervals to estimate uncertainty. When intervals overlap, you should not claim that one model is better.

    The following code shows the main workflow. It only illustrates the main evaluation steps. Before running it, you need to implement functions such as build_cot_prompt, extract_final_answer, validate_answer, and _http_post.

    1. import time
    2. def call_model_api(endpoint, prompt, timeout=60, retries=3):
    3. # Timeout and exponential backoff retry; return None on failure and log the error
    4. for attempt in range(retries):
    5. try:
    6. return _http_post(endpoint, prompt, timeout=timeout) # implemented by the team
    7. except TimeoutError:
    8. time.sleep(2 ** attempt)
    9. return None
    10. def run_evaluation_pipeline(model_endpoint, test_dataset, dataset_version):
    11. results = []
    12. for case in test_dataset:
    13. prompt = build_cot_prompt(case["question"])
    14. response = call_model_api(model_endpoint, prompt)
    15. if response is None:
    16. results.append({"case_id": case["id"], "status": "api_error"})
    17. continue
    18. answer = extract_final_answer(response) # parse the final answer from the response
    19. is_correct = validate_answer(answer, case["expected_answer"])
    20. results.append({
    21. "case_id": case["id"],
    22. "status": "ok",
    23. "is_correct": is_correct,
    24. })
    25. scored = [r for r in results if r["status"] == "ok"]
    26. accuracy = sum(r["is_correct"] for r in scored) / len(scored) if scored else None
    27. return {"dataset_version": dataset_version, "accuracy": accuracy, "details": results}

    For math problems, compare answers numerically rather than comparing strings directly. For code problems, run unit tests on model-generated code in an isolated sandbox; do not execute model output directly on the evaluation machine. Samples with api_error should be counted separately and should not simply be treated as errors. Otherwise, the model’s true capability will be underestimated, and network problems will be confused with model problems.

    4. Considerations for model selection and deployment

    Route by error tolerance first. For scenarios with extremely low error tolerance, such as financial risk-control calculations and core business code, validate on a private evaluation set first. Before validation passes, prefer top closed-source models or fine-tuning based on them. For low-risk scenarios such as general question answering, copy generation, and initial code drafts, consider Chinese open-source models after the private set meets the threshold set by the team. The cost advantage of open-source solutions must be calculated using your own inference and operations bills; do not directly apply other teams’ data.

    The routing layer needs monitoring. A unified API gateway can distribute traffic by request type and complexity. The router itself is a classifier and can make mistakes. Record the misrouting rate and periodically spot-check it with a private set. Cross-model routing also requires monitoring.