How to Evaluate Large Language Model Math Reasoning: Methods and Best Practices

    This article outlines a structured, reproducible approach to evaluating the mathematical reasoning of large language models. It explains why informal model rankings are unreliable, breaks math capability into four layers, and covers evaluation set design, controlled prompting and decoding, dual-track scoring of answers and reasoning, and common pitfalls. The goal is to support scenario-based model selection with traceable, regression-friendly evaluation pipelines.

    1. Why “Which Model Is Better?” Is Hard to Answer

    In engineering practice, teams often need to answer a deceptively simple question: which type of model should we choose for difficult math tasks? Original discussions tend to produce subjective rankings, ordering models into tiers by “advanced math ability,” claiming that only a few can handle open-ended math problems, and noting that the rest differ in chain-of-thought length and naturalness of expression. Such observations are not worthless, but they expose a common problem: the conclusions depend heavily on the evaluator’s own problem set, prompting style, decoding parameters, and grading criteria. They lack reproducibility and therefore cannot be used directly for selection decisions.

    The difficulty is compounded by the fact that “math ability” is itself a composite concept. It includes at least:

    • Correctness of arithmetic and symbolic manipulation;
    • Accuracy on standard problem types (competition problems, textbook exercises);
    • Exploration ability on open-ended problems that have no single canonical answer and require constructing a proof strategy or proposing conjectures;
    • Stability over long reasoning chains, meaning no drift or self-contradiction across multi-step derivations;
    • Expressiveness and verifiability, meaning whether the output is easy for humans to review.

    Without first decomposing the target capability, evaluation results degrade into a vague sense of “seems stronger.” This article turns that vague judgment into a structured process.

    2. Capability Layers: A Comparable Coordinate System

    Divide the evaluation targets by capability level rather than producing a single overall ranking.

    Layer 1 is deterministic computation and process execution. These tasks have unique answers and explicit steps, and mainly test whether the model errs on long expressions, unit conversions, or boundary conditions.

    Layer 2 is solving standard hard problems. Problems come from public question banks or textbooks and have standard solutions, testing whether the model can find the correct path within a limited number of steps.

    Layer 3 is open-ended and constructive problems, for example “construct an object satisfying a given property and prove its optimality” or “determine whether a proposition is true and justify the answer.” Such problems have no ready-made template, distinguish models most clearly, and are the capability dimension that drew the most attention in the original discussion.

    Layer 4 is reasoning process quality, including whether the chain of thought is concise, whether there is redundant backtracking, and whether circular reasoning appears. Note that a longer chain of thought does not mean stronger ability; verbosity often signals low search efficiency and more noise, while being too brief may omit key case analysis. The ideal state is length matched to problem complexity.

    3. Building the Evaluation Set: Making Problems Discriminative

    The quality of the evaluation set determines how credible the conclusions are. Follow four principles when building it.

    First, stratified sampling. Each capability layer needs enough samples. Avoid concentrating all problems on simple computation, which makes high-scoring models indistinguishable (ceiling effect), or on extremely hard problems, which pushes all models close to zero (floor effect).

    Second, contamination resistance. Prefer problems created after the evaluation cutoff date, or apply equivalent transformations (changing values, swapping conditions, rephrasing the narrative) to reduce inflated scores caused by memorization.

    Third, decidable answers. Prepare a standard answer, reference key points, or an executable checking method for each problem. For proof problems, at minimum prepare a checklist such as “whether the key lemma appears” and “whether there is a logical gap.”

    Fourth, difficulty labeling. Use the average time or accuracy of human solvers as a difficulty reference, which makes it easier to report results by difficulty band later.

    A sample data structure:

    1. {
    2. "id": "math-open-0421",
    3. "layer": "open_constructive",
    4. "difficulty": 4,
    5. "prompt": "Construct an object satisfying the given constraints and prove its optimality.",
    6. "reference_points": ["existence of construction", "upper bound proof", "matching lower bound"],
    7. "checker": "rubric_v2"
    8. }

    4. Prompting and Decoding: Control Variables First

    Many conclusions of the form “model A is worse than model B” actually stem from different invocation settings. To make evaluation meaningful, fix the following variables:

    • Prompt template: whether it includes instructions such as “reason step by step” or “give the final answer”;
    • Whether the model is allowed to self-check and backtrack;
    • Randomness parameters such as temperature and nucleus sampling;
    • Maximum output length, so that truncation does not cause incomplete reasoning to be misjudged as weak ability;
    • Retry strategy: single sampling, or multiple samples with majority selection.

    The pseudocode below shows a minimal controllable evaluation loop:

    1. def run_eval(model_client, dataset, cfg):
    2. results = []
    3. for item in dataset:
    4. prompt = build_prompt(item, cfg.template)
    5. answers = []
    6. for _ in range(cfg.samples):
    7. resp = model_client.generate(
    8. prompt,
    9. temperature=cfg.temperature,
    10. max_tokens=cfg.max_tokens,
    11. )
    12. answers.append(extract_final(resp))
    13. pred = majority_vote(answers) if cfg.vote else answers[0]
    14. results.append({
    15. "id": item.id,
    16. "layer": item.layer,
    17. "score": grade(pred, item),
    18. })
    19. return aggregate(results)

    Keep in mind that majority voting over multiple samples significantly raises scores but also raises cost. If production traffic allows only a single call, the evaluation should stay close to the single-call scenario; otherwise the conclusions will not transfer.

    5. Scoring: Both Correct Results and Sound Reasoning

    Use a dual-track scoring scheme.

    The result track relies on automated checking: compare answers for numerical problems, perform symbolic equivalence checks for expression problems, and verify constraint satisfaction for set or construction problems.

    The process track uses a rule-based rubric, scored by a reviewer model or by humans against key points, such as whether premises are stated explicitly, whether boundary cases are covered, whether circular reasoning occurs, and whether key steps can be verified independently. To reduce reviewer bias, use “average of multiple reviewers” and report a consistency metric.

    A simplified aggregation logic:

    1. def aggregate(rows):
    2. out = {}
    3. for layer in {r["layer"] for r in rows}:
    4. sub = [r["score"] for r in rows if r["layer"] == layer]
    5. out[layer] = sum(sub) / len(sub)
    6. out["overall"] = sum(out[k] for k in out if k != "overall") / len(out)
    7. return out

    The final report should not give only a single overall score. It should provide per-layer scores, curves by difficulty band, and a distribution of failure types, so it can support the decision of “which model to use in which scenario.”

    6. Common Pitfalls and Engineering Recommendations

    Pitfall 1: replacing scenario matching with an overall ranking. Open-ended construction, standard problem solving, and long-chain stability place different demands on models, so selection should follow the business problem type.

    Pitfall 2: treating chain-of-thought length as a capability metric. Length only reflects the search path and must be read together with accuracy and redundancy.

    Pitfall 3: ignoring cost and latency. Higher capability often comes with higher latency and compute consumption, so engineering requires trade-offs among accuracy, response time, and invocation cost, with continuous observation of production behavior through monitoring, alerting, and logging services.

    Pitfall 4: treating a one-off evaluation as final. Both models and prompting strategies evolve, so evaluation should be built as a pipeline, with container platforms and object storage used to fix datasets and versions, keeping results traceable and regression-friendly.

    The implementation path can be summarized as: first define the target capability layers, then build a contamination-resistant, decidable, stratified evaluation set, fix the prompting and decoding variables, apply dual-track scoring of results and process, and finally select models by scenario rather than by an overall leaderboard, integrating evaluation into continuous integration. Only conclusions produced this way have engineering reproducibility and decision-making value.