How to Evaluate and Choose LLMs for Mathematical Reasoning

    This article explains why ranking large language models by math ability is difficult, then presents a practical evaluation methodology: splitting math capability into four measurable layers, fixing reproducible scoring criteria, interpreting chain-of-thought length through effective reasoning density, designing context- and tool-aware test sets, and converting results into a weighted scorecard for model selection. It also lists common evaluation pitfalls and deployment practices such as verification loops and gray routing. Readers will learn how to answer which model to use, in which scenario, and at what cost without relying on any single leaderboard.

    1. Background: Why “Which Model Is Better” Is Hard to Answer in One Sentence

    In real projects, teams often need to answer a deceptively simple question: is a given large language model actually good at mathematical reasoning? The original discussion was full of side-by-side comparisons and subjective rankings. The real value of those discussions is not the conclusions themselves, but the fact they expose: math ability is a multi-dimensional concept that includes arithmetic precision, symbolic manipulation, multi-step planning, problem modeling, and result verification. Different models perform inconsistently across these sub-abilities.

    A more rigorous approach is therefore not to ask “who is first,” but to reframe the question: in my business scenario, which capability carries the most weight, and how do I select the most suitable model or model combination under fixed budget and latency constraints? The methodology below applies to general-purpose LLM services, including the various options accessible through general model service categories on Baidu AI Cloud.

    2. Capability Layers: Breaking “Math Ability” into Measurable Sub-Items

    Split evaluation tasks into four layers and weight them progressively:

    1. Basic arithmetic and numerical precision: multi-digit operations, unit conversion, percentage and interest calculations. The focus is whether low-level arithmetic errors occur.
    2. Single-step transformation: solving equations, inequalities, factorization, simple differentiation and integration. The focus is whether steps are reproducible.
    3. Multi-step planning: word problems, travel and work-rate problems, combinatorial counting. The focus is whether the goal stays stable across a long chain.
    4. Open-ended modeling: real problems with vague conditions that require setting your own assumptions. The focus is whether assumptions are reasonable and whether boundaries are discussed.

    Most teams fail because they treat subjective impressions from the fourth layer as an overall conclusion. Once you separate the layers, you will find some models are stable at layer three but overconfident at layer four, while others sustain longer chains yet make avoidable mistakes at layer one.

    3. Scoring Criteria: Turning Subjective Feelings into Reproducible Metrics

    The biggest problem with subjective ranking is that it cannot be reproduced. Fix at least the following criteria:

    • Final answer accuracy (judged by numerical tolerance, not string matching);
    • Process score (whether key intermediate quantities appear, scorable with a checklist);
    • Self-consistency (whether contradictory conclusions appear);
    • Verification behavior (whether the model proactively checks dimensions, extreme values, or substitutes results back);
    • Cost metrics (average input and output size, average number of retries, end-to-end latency).

    A skeleton scoring script is shown below; the point is to make tolerances and key points explicit:

    1. def grade(answer: str, ref_value: float, key_points: list[str]) -> dict:
    2. ok_value = abs(parse_number(answer) - ref_value) <= 1e-6 * max(1.0, abs(ref_value))
    3. hit = sum(1 for p in key_points if p in answer)
    4. return {
    5. "value_ok": ok_value,
    6. "process_score": hit / max(1, len(key_points)),
    7. "self_consistent": "in summary" in answer and "contradiction" not in answer,
    8. }

    4. Chain Length Is Not Capability: How to Interpret “Longer Chains”

    The original discussion noted clear differences in chain-of-thought length across models. What matters more in engineering is “effective reasoning density,” meaning the accuracy gain per unit of output length. Overly long chains usually carry two risks: latency and cost rise linearly, and errors accumulate along the chain, producing results that drift further off as computation continues.

    Plot a curve with average output length on the horizontal axis and accuracy on the vertical axis, and look for the inflection point. If a model’s accuracy stops improving after that point while cost keeps rising, compress the chain through prompt constraints, stepwise verification, or tool calls instead of blindly pursuing longer reasoning.

    5. Context and Tool Constraints: Evaluation Design Close to Real Business

    Real business is rarely pure text question answering, so the evaluation set should include the following perturbations:

    • Data provided as tables or logs, requiring conditions to be extracted;
    • Problems containing redundant information, testing resistance to distraction;
    • Tasks requiring external computation or retrieval, testing whether the model knows when to use a tool;
    • Tasks requiring structured output, testing format compliance and field completeness.

    The general engineering practice is to hand deterministic computation to programs and semantic understanding and modeling to the model. For example, add a verification loop on the server side:

    1. Model drafts output -> rules parse key quantities -> program recomputes -> if inconsistent, feed a hint back -> model revises

    This loop significantly reduces low-level arithmetic errors and makes evaluation results more stable.

    6. Selection Decisions: From Leaderboards to a Weighted Scorecard

    Convert layered results into a scorecard weighted by business priorities. Example weights (adjustable in practice): basic precision 0.2, single-step transformation 0.2, multi-step planning 0.3, open-ended modeling 0.2, cost and latency 0.1. The value of a scorecard is explainability: when stakeholders question a conclusion, you can point to the specific item that lowered the total.

    For deployment, a common approach is gray release and traffic splitting through a unified model service interface, routing high-difficulty requests to a stronger reasoning configuration and high-frequency simple requests to a low-cost configuration. Meanwhile, use logging services and monitoring and alerting systems to record each request’s input size, output length, retry count, and verdict, forming an evaluation baseline that supports continuous regression.

    7. Common Pitfalls

    • Drawing overall conclusions from a small number of samples, with large sample bias;
    • Comparing only final answers while ignoring process and self-consistency;
    • Overlooking differences in prompts and decoding parameters, mistaking configuration differences for model differences;
    • Leaving the evaluation set unchanged for a long time, causing data leakage and overfitting;
    • Looking only at accuracy and not at latency and cost, making the model unusable after launch.

    8. Implementation Advice and Conclusion

    Evaluating mathematical reasoning ability is essentially converting vague impressions into reproducible, regression-friendly, explainable engineering metrics. Teams should first complete capability layering and fix the scoring criteria, then build a perturbation-rich evaluation set with automated loop verification, and finally use a weighted scorecard plus gray routing for selection. If running on Baidu AI Cloud, you can combine general model services, object storage for evaluation sets, and logging and monitoring systems for long-term regression, so that without depending on any single leaderboard you can steadily answer the three questions that truly matter: which model to use, in which scenario, and whether the cost is acceptable.