How to Evaluate LLM Mathematical Reasoning: A Framework for Building a Reliable Benchmark

    This article explains how to build an in-house framework for evaluating the mathematical reasoning of large language models. It covers why subjective impressions are not reproducible, how to tier math tasks from computation to open-ended problems, why process scoring should be separated from final-answer scoring, how to measure stability and variance across repeated samples, why chain-of-thought length is not a capability metric, and how prompt and workflow controls plus evaluation-set governance keep results trustworthy over time. Readers will learn a repeatable, attributable method that can be updated as models iterate, instead of relying on a one-off ranking.

    1. Why “It Feels Stronger” Is Not a Technical Conclusion

    In discussions of model capability, the most common pattern is for an evaluator to rank models overall based on a subjective impression of a handful of problems. The issue with this is not whether the conclusion is right or wrong, but that it is not reproducible: problem difficulty is not tiered, scoring looks only at the final answer, sampling parameters are not fixed, and prompt templates are not unified. Any drift in a single variable can flip the ranking. The engineering approach is to decompose “model capability” into observable metrics and then measure them repeatedly with a fixed process.

    It is worth stressing that the relative position of different models on different tasks keeps changing as versions are iterated, so any static ranking quickly becomes outdated. For this reason, this article does not give any ordering of specific models. Instead, it presents a method for building your own evaluation system, so that readers can reach credible conclusions on their own business data.

    2. Tiering Math Tasks: From “Can Compute” to “Can Prove”

    The first step in evaluation is tiering the problems. At least four tiers are recommended:

    • L1 Calculation and simplification: symbolic operations and equation solving, mainly testing instruction following and format stability.
    • L2 Standard word problems: multi-step reasoning with clear patterns, testing completeness of steps.
    • L3 Competition-level problems: requiring auxiliary constructions and case analysis, testing search and backtracking ability.
    • L4 Open-ended math problems: where the conclusion is not unique or requires proposing and verifying a conjecture, testing long-range consistency and self-checking.

    L4 is the weak spot for most current models. The reason is not compute or parameter scale, but that open-ended problems lack an alignable “standard answer signal,” making it hard for the model to judge whether it has converged. When evaluating L4, you should introduce human review or verifiable intermediate lemmas rather than comparing only the final numeric value.

    3. Process Scoring: Don’t Let the Final Answer Hide Reasoning Flaws

    Looking only at answer accuracy systematically overestimates model capability, because there are cases of “guessing correctly” and “coincidental units/symbols.” A more robust approach is to separate process score from result score:

    1. # Illustration: two-dimensional scoring; weights can be tuned per business
    2. def score(sample, rubric):
    3. result_ok = verifier(sample.final_answer, sample.gold) # automatically verifiable
    4. step_score = rubric.average(
    5. correctness=sample.step_correctness, # whether each step holds
    6. completeness=sample.step_coverage, # whether necessary branches are covered
    7. redundancy=sample.step_redundancy # proportion of ineffective repetition
    8. )
    9. return 0.5 * result_ok + 0.5 * step_score

    The key to process scoring is that “each step can be judged independently.” It is recommended to require the model to output structured intermediate conclusions, making automatic or semi-automatic labeling easier:

    1. [Given] Known conditions and constraints
    2. [Lemma] Lemma/formula used in this step
    3. [Step] Derivation and substitution
    4. [Check] Dimensional analysis, boundaries, back-substitution of special cases
    5. [Answer] Final conclusion

    This structure also brings an engineering benefit: when the answer is wrong, you can directly locate whether the wrong lemma was chosen, a substitution error occurred, or a boundary was missed, refining “the model is no good” into a fixable prompt or process issue.

    4. Stability and Variance: A Single Evaluation Is Almost Meaningless

    Large model output is stochastic, and repeated sampling of the same problem may yield different paths. Evaluation must report a distribution rather than a single point:

    • Fix sampling parameters (temperature, max generation length, stop conditions) and record them;
    • Repeat each problem N times (N is recommended to be no less than 5), and compute pass rate and variance;
    • Introduce two kinds of metrics, pass@k and self-consistency: the former measures the upper bound of “a correct path exists,” while the latter measures “whether majority voting converges to the correct answer”;
    • Archive high-variance problems separately, as they are often where the capability boundary lies.

    Variance itself is valuable information. If a model has a low single-attempt accuracy but a high pass@k, it means the model has the capability but lacks self-checking; such models are well suited to being paired with an external verifier or multi-path sampling with voting.

    5. Reasoning Chain Length Is Not a Capability Metric

    A common misreading is to equate a longer chain of thought with stronger reasoning. A more accurate statement is that chain length correlates with problem complexity and is not monotonically related to accuracy. An overly long reasoning chain brings three risks: drift of intermediate conclusions, repeated self-negation, and loss of early constraints in a long context.

    It is recommended to record three quantities at the same time: average chain length, proportion of effective steps, and constraint retention rate (whether later steps still satisfy the initial conditions). When chain length increases while the proportion of effective steps drops, it usually means the model is doing inefficient search; at this point a better strategy is to tighten the prompt and provide intermediate check points, rather than continuing to allow free generation.

    6. Prompt and Process Control: Putting Uncertainty in a Cage

    At the application layer, four general techniques can significantly improve math task performance without relying on any specific product capability:

    1. Front-load constraints: write the domain, value range, and precision requirements at the very front and restate them.
    2. Step contract: require listing knowns and lemmas first, then deriving, and finally back-substituting to check.
    3. External verification: hand the computable parts to a general computation process or a self-written verification script for cross-checking.
    4. Multi-path voting: sample in parallel for high-value requests and filter results by consistency.

    An illustrative verification skeleton:

    1. def solve_with_check(prompt, model, verifier, k=5):
    2. candidates = [model(prompt) for _ in range(k)]
    3. valid = [c for c in candidates if verifier(c)]
    4. return max(valid, key=lambda c: c.step_score) if valid else None

    7. Evaluation Set Governance: Preventing Contamination and Overfitting

    A self-built evaluation set should meet three points: traceable problem sources, answers that can be verified automatically or semi-automatically, and periodic rotation. It is recommended to keep a portion of “private problems” out of any public corpus for long-term trend observation; at the same time, feed real business requests back as evaluation samples after de-identification, so that metrics align with online gains. If the enterprise side already has logging services and monitoring/alerting systems, the evaluation pipeline can be made into a scheduled job, continuously tracking pass rate, variance, and average chain length as observable metrics.

    8. Conclusion

    Comparing the math capability of models should return to engineering methods: tiered problem selection, dual scoring of process and result, repeated sampling to observe variance, distinguishing chain length from effectiveness, and using external verification as a backstop. Conclusions reached this way are reproducible and attributable, and can be continuously updated as models iterate, rather than staying at a one-off, impression-based ranking.