Evaluating Mathematical Reasoning in Large Language Models: Assessment Frameworks and Inference Deployment Practices

    This article presents a reproducible, extensible framework for evaluating the mathematical reasoning ability of large language models. It separates assessment into two tracks—capability evaluation and engineering deployment—covering five evaluation levels (answer correctness, process reliability, open-ended reasoning, robustness, and efficiency), an evaluation pipeline design, inference deployment cost modeling, and common pitfalls in model selection. No specific products are rated; the goal is a general technical methodology.

    Discussions about “how to evaluate a large model’s mathematical ability” often exhibit two biases in the community: one is judging solely by a single leaderboard or a model’s success on one hard problem; the other is conflating writing style and explanation readability with mathematical reasoning ability. A more reasonable approach is to split mathematical capability into two tracks: “capability evaluation” and “engineering deployment.” The former answers under what problem types, constraints, and stability conditions the model solves correctly; the latter answers how much inference cost, latency, and operational overhead must be paid to obtain that capability. This article does not rate any specific product; instead, it provides a reproducible, extensible general technical framework.

    1. Five Levels of Mathematical Capability Evaluation

    1.1 Basic Answer Correctness: Build a Tiered Problem Bank First

    Mathematical reasoning is not a single skill. An evaluation set should at minimum cover arithmetic, algebra, geometry, probability and statistics, calculus, combinatorics, and number theory, while distinguishing routine problems, high-difficulty problems, and open-ended problems. Basic answer correctness is typically measured through answer matching, numerical tolerance, and equivalent-expression checking. In practice, data contamination must also be prevented: reserve held-out problems outside the training time window, create isomorphic variants, and apply parameter perturbations, so that inflated scores from “having seen the original problem” are avoided. Only with a tiered problem bank in place do subsequent process evaluation and cost evaluation have a comparable basis.

    1.2 Process Reliability: A Correct Answer Does Not Mean Correct Reasoning

    In mathematical scenarios, it is not uncommon for the final answer to be correct while intermediate steps are wrong. Evaluation should incorporate process checks: whether key steps are verifiable, whether units and notation are consistent, whether constraints are actually used, and whether there are skipped steps or circular reasoning. Chain-of-thought length also requires a dialectical view: concise reasoning chains usually imply lower inference overhead and better readability, but complex problems may require longer intermediate derivations. Longer chains are not necessarily stronger, and shorter chains are not necessarily weaker—what matters is the balance among accuracy, inference overhead, and interpretability. For explanatory text, readability can serve as an auxiliary metric, but it cannot replace mathematical correctness.

    1.3 Open-Ended Problems and Higher-Order Reasoning: Require Scoring Rubrics, Not Unique Answers

    Open-ended mathematical problems often have no standard answer. Evaluation should shift toward verifiable sub-goals, completeness of proof structure, reasonable use of assumptions, and clearly bounded conclusions. Practical methods include expert scoring rubrics, multi-reviewer blind review, formal-verification assistance, and reproducible experiment records. It must be emphasized that performance on a single open-ended problem is insufficient to draw an overall conclusion about a model; open-ended problems are better used as signals of higher-order capability rather than as the sole ranking basis. For high-difficulty problems, failure types should also be recorded: comprehension errors, planning errors, calculation errors, or mid-process abandonment.

    1.4 Stability and Robustness: Multi-Sampling and Perturbation Testing

    Mathematical capability evaluation cannot rely on a single output. It is recommended to sample the same problem multiple times and measure agreement rate, pass rate, and variance; to perturb problems through symbol substitution, unit changes, constraint addition/removal, irrelevant-information injection, and long-context interference; and to observe whether the model remains stable. For tasks requiring multi-step reasoning, error propagation also matters: does an early mistake cause total collapse of subsequent steps? Stability metrics often reflect real-world usability better than a single best score.

    1.5 Efficiency and Cost: Mathematical Capability Has a “Unit Cost”

    Evaluation should record engineering metrics such as average reasoning token count, tokens processed per second, time to first token, end-to-end latency, GPU memory usage, and batching efficiency. When two models have similar accuracy, the one with lower inference overhead, more stable latency, and more controllable unit cost often has the advantage in real business scenarios. Whether explanatory text is readable and whether formatting is stable should also be included as auxiliary dimensions, but should not be merged into the same score as mathematical correctness.

    2. Evaluation Pipeline Design: Making Conclusions Reproducible

    A usable evaluation pipeline should include data version management, stratified sampling, blind review, metric aggregation, and experiment logging. Data and outputs can be stored in object storage; evaluation tasks can be decoupled via message queues; runtime logs and monitoring alerts ensure observability. When aggregating metrics, avoid simple weighted rankings; instead, set weights according to the business scenario: online Q&A prioritizes latency and stability, offline batch processing prioritizes throughput and unit cost, and research assistance prioritizes process quality on open-ended problems.

    Illustrative pseudocode:

    1. function run_eval(model, suites, config):
    2. records = []
    3. for suite in suites:
    4. for case in suite.cases:
    5. samples = infer(model, case.prompt, n=config.n, max_steps=config.max_steps)
    6. metrics = score(case, samples, rubric=suite.rubric)
    7. records.append(metrics)
    8. return summarize(records, weights=config.weights)

    Aggregated results should include at least: answer accuracy, process pass rate, multi-sample agreement rate, average reasoning token count, P95 latency, per-task cost, and failure-type distribution. All experiments should fix random seeds, sampling parameters, and scoring rubrics, and retain raw outputs for review. If using cloud capabilities, a general and reproducible engineering practice is to host inference services on a container platform on Baidu AI Cloud, store evaluation sets and outputs in object storage, and use logging services and monitoring alerts to ensure observability.

    3. Inference Deployment and Cost: Throughput Gains Change Selection Logic

    Higher inference throughput directly reduces per-token cost, but a cost model cannot look only at peak throughput. Actual cost is also affected by sequence-length distribution, batching strategy, hardware utilization, redundant deployment, SLA requirements, operations staffing, and failure recovery. Self-hosting and managed services each have their applicable scenarios: self-hosting offers high control but requires capacity planning and operations; managed services start quickly but require attention to quotas, isolation, and long-term cost. Regardless of the form, load testing should use real business traffic rather than substituting single-point theoretical throughput for measured results.

    On the engineering side, teams can adopt batching, caching, quantization, parallel scheduling, and routing strategies: route simple problems to lightweight models and escalate hard problems to stronger models; apply degradation and retry for failed requests; and observe accuracy and latency drift through canary releases and monitoring alerts. It must be emphasized that throughput optimization must not sacrifice mathematical correctness—any acceleration scheme should be regression-tested on the tiered evaluation set.

    4. Selection Recommendations and Common Pitfalls

    Common pitfalls include: replacing scenario-based evaluation with a single leaderboard; equating human-like writing with mathematical ability; focusing only on the longest chain of thought while ignoring accuracy and cost; overlooking the subjectivity of open-ended problem scoring; and skipping data-contamination checks. The recommended approach is to build a three-dimensional “capability–cost–stability” evaluation per scenario: first clarify the problem-type distribution and error tolerance, then select the model and deployment form, and finally continuously calibrate through online monitoring. Differences between iterative versions should be judged through tiered evaluation and confidence intervals, not through one or two ad-hoc comparisons. Only by unifying the evaluation framework, the evaluation pipeline, and deployment cost can one make a professional, reproducible, and actionable judgment about a large model’s mathematical capability.