Evaluating Large Language Model Math Reasoning: A Reproducible Framework and Practice

    This article presents a reproducible framework for evaluating the math reasoning ability of large language models. Instead of relying on a single leaderboard, it breaks math capability into four measurable layers, explains how to build evaluation sets with difficulty balance and contamination safeguards, and shows how to track reasoning path complexity. It also covers scoring consistency, inference budget and resource strategies, and common pitfalls, helping developers produce comparable and repeatable evaluation results across self-developed, open-source, or cloud-hosted models.

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

    When people discuss the math ability of large language models, the most common phenomenon is conflicting evaluation results: the same set of models can rank completely differently across different problem sets, prompting strategies, and sampling counts. The intuitive judgment from the original discussion—that one model can only handle open-ended math problems while others cannot catch up—is actually hard to reproduce in engineering practice, because it lacks three key elements: problem distribution, scoring criteria, and inference budget constraints.

    A more professional approach is therefore not to give an overall ranking, but to build a reproducible evaluation framework that breaks “ability” into observable dimensions. This article abstracts away specific products and discusses only the general methodology, which applies to horizontal comparison of any self-developed model, open-source model, or cloud-hosted model service.

    2. Capability Layers: Breaking “Math Ability” into Measurable Dimensions

    A vague notion of “strong at math” has no engineering value. It is recommended to break it into at least four layers:

    1. Formal computation layer: arithmetic, algebraic transformation, and equation solving, measuring accuracy and format stability.
    2. Multi-step deduction layer: requires 5–20 reasoning steps, measuring whether intermediate steps are self-consistent.
    3. Open-ended problem layer: problems have no single standard answer and require constructive proofs, counterexamples, or modeling, measuring the usability and rigor of conclusions.
    4. Long-context and tool collaboration layer: problems are embedded in long documents, tables, or code repositories, measuring retrieval and localization as well as tool-call correctness.

    Only after layering can we explain “why a model scores full marks on closed-form problems but loses points on open-ended ones.” This is not mysticism, but a difference in training objectives and inference budget allocation.

    3. Building the Evaluation Set: Difficulty, Distribution, and Contamination Protection

    The quality of the evaluation set determines the upper limit of the conclusions. In practice, it is recommended to:

    • Difficulty ratio: configure easy/medium/hard at 3:5:2 to avoid a floor effect caused by all-hard problems.
    • Problem type coverage: allocate a certain proportion to proof, computation, modeling, and counterexample problems.
    • Data contamination protection: use recently self-created problems, parameter-randomized problems, and variant problems with “same structure, different values.”
    • Answer decidability: annotate each problem with its judging method (exact match, symbolic equivalence, human review, unit test).

    A sample problem structure can be written as:

    1. {
    2. "id": "math-0421",
    3. "layer": "open_ended",
    4. "prompt": "A constructive problem under given constraints...",
    5. "judge": "human_review",
    6. "rubric": ["correctness of conclusion", "self-consistency of derivation", "clarity of expression"],
    7. "budget_tokens": 8000
    8. }

    The budget_tokens field is ignored by many evaluations: without an inference budget, you are comparing “who is more willing to spend compute” rather than “who can compute better.”

    4. Chain-of-Thought Complexity: An Underrated Observation Metric

    The original discussion mentioned that “one type of model has the longest and most complex chain of thought, while another is more concise and more like human writing.” This actually points to a quantifiable metric: reasoning path length and branch complexity. It can be characterized by three quantities:

    • Average number of reasoning steps: the number of effective reasoning units in the chain of thought;
    • Backtracking rate: the proportion of occurrences of “rechecking/changing approach”;
    • Conclusion convergence: the variance of the final answer across different samplings.

    Empirically, more steps do not equal higher accuracy. Excessive steps are often accompanied by a rising backtracking rate, meaning the model consumes budget in self-doubt. In engineering, what is more worth attention is the accuracy per unit budget, i.e., the pass rate under a fixed token budget, which is closer to real business needs than unconstrained comparison.

    5. Scoring and Consistency: Making Conclusions Stand Up

    Subjective problems must solve the scoring consistency problem. A three-part approach is recommended:

    1. Rule-based judgment first: whatever can be judged by symbolic equivalence or unit tests should never be handed to subjective review.
    2. Double-blind cross review: open-ended problems require at least two reviewers, and disputed problems go to arbitration.
    3. Consistency metrics: use Cohen’s Kappa or a simple agreement rate to monitor reviewer drift.

    Sample pseudocode:

    1. def evaluate(model, dataset, budget):
    2. results = []
    3. for item in dataset:
    4. out = model.generate(item.prompt, max_tokens=budget)
    5. score = judge(item, out) # rule-based or review
    6. results.append((item.id, score, out.step_count))
    7. return aggregate(results) # weighted summary by layer

    Note that aggregate must be weighted by layer rather than a global average, otherwise easy problems will dilute the signal from hard ones.

    6. Inference Budget and Resource Strategy: Credits and Queuing Are Real Constraints

    The original discussion mentioned “membership credits not used up, serious queuing, and setting a certain model to burn off credits.” Behind this is a very real engineering problem: inference resources are limited and need budgeting. When building or purchasing model services, it is recommended to:

    • Establish a budget quota: allocate tokens or call counts by business line, with daily/weekly caps;
    • Tiered routing: simple requests go to small-parameter models, hard problems go to high-inference-budget channels;
    • Caching and reuse: cache results for repeated problems to reduce repeated inference overhead;
    • Asynchronous processing and queuing: throttle and queue during peak hours to avoid synchronous-call avalanches;
    • Observability: use logging services and monitoring alerts to track call volume, failure rate, and queue duration.

    On the cloud, object storage is typically available to store evaluation sets, message queues to smooth task peaks, container platforms to host inference services, and logging and monitoring systems for observability. These are general capability categories and do not point to any specific vendor.

    7. Common Pitfalls and Conclusion

    Finally, three pitfalls are emphasized: first, using a single leaderboard to replace scenario-based evaluation; second, comparing ability without setting an inference budget; third, treating chain-of-thought length as proof of ability. A more robust way to express conclusions is: “Under problem type X, budget Y, and scoring criteria Z, model A’s pass rate is what, and what is the confidence interval.”

    For developers, the truly actionable path is: first layer, then build the set, fix the budget, unify scoring, and continuously regress. This way, no matter how the underlying models iterate, your evaluation system can stably output comparable, reproducible, and decision-ready conclusions, rather than staying in impression-based ranking disputes.