Layered Evaluation and Model Selection for LLM Mathematical Reasoning

    Discussions of LLM math ability often end in a simple ranking of which model is "better." In engineering practice, that ranking is of limited use: math tasks vary widely in type, a correct final answer doesn't guarantee a reliable process, and a single sample doesn't reflect stable capability. This article breaks math ability into observable, reproducible, verifiable dimensions across five capability layers, introduces a process-aware metrics system, a contamination-resistant benchmark design, and a routing strategy for production model selection.

    Discussions of large model math capability often boil down to a simple ranking of who is “stronger” and who is “weaker.” From an engineering perspective, such rankings are of limited help for model selection: math tasks vary enormously in type, a correct final answer does not imply a reliable reasoning process, and a single sampling run does not represent stable capability. A more professional approach is to decompose “math ability” into observable, reproducible, and verifiable dimensions, then conduct layered evaluation and routing based on business scenarios.

    1. Why Math Ability Cannot Be Judged by a Single Leaderboard

    Mathematical reasoning spans at least several distinct levels: basic computation, multi-step algebraic derivation, geometric and probabilistic modeling, formal proof, and open-ended problem exploration. Each level demands different things from a model. Basic problems emphasize answer accuracy; multi-step problems emphasize whether intermediate steps are verifiable; proof problems emphasize logical closure and counterexample elimination; open problems require hypothesis generation, proof sketches, counterexample search, and a verification loop. Using a single problem set to produce one total score makes it easy to mistake “good at short-chain computation” for “good at long-chain proofs.”

    Math evaluation also faces data contamination, sampling randomness, error accumulation in long chains, and differences in tool usage. Public problems may have entered training data, inflating scores; temperature changes significantly affect the stability of multi-step reasoning; a single error in a long chain of thought can poison the final conclusion; and whether the model may call a calculator, symbolic computation engine, or verifier changes its apparent capability. Evaluation must therefore record not just results, but also the reasoning process, sampling configuration, and verification method.

    2. Building a Layered Capability Model

    We recommend dividing math capability into five layers:

    1. L1: Basic computation and formula application — arithmetic, unit conversion, formula substitution. Focus: accuracy and boundary-condition handling.
    2. L2: Multi-step reasoning and constraint satisfaction — algebraic manipulation, equation solving, probability and statistics. Focus: intermediate-step correctness, constraint-omission rate, and long-chain stability.
    3. L3: Formal proof and verification — proof structure, logical closure, counterexample elimination. Focus: formal-checker pass rate and the cost of human review.
    4. L4: Open mathematical problem exploration — hypothesis plausibility, proof-sketch quality, counterexample search, and verifiable conclusions. This layer should not be measured with ordinary multiple-choice questions; use scoring rubrics and expert blind review instead.
    5. L5: Engineering reliability — latency, cost, failure retries, output consistency, monitoring and alerting. This layer determines whether a model can enter a production system.

    With layering in place, selection is no longer about “topping the overall leaderboard,” but about answering: at which layer is the model good enough, at which layer does it need a human safety net, and at which layer must requests be routed to a stronger model.

    3. A Metrics System That Weighs Results and Process Equally

    A math evaluation should include at least the following metrics:

    • Answer accuracy / pass rate: a baseline metric, but insufficient on its own.
    • Process correctness: annotate step by step and measure the proportion of valid reasoning steps.
    • Verifiable-step ratio: the share of steps that can be checked by symbolic computation, unit tests, or a formal verifier.
    • Multi-sample consistency: the proportion of identical answers to the same problem across multiple temperatures, reflecting stability.
    • Redundant-step ratio: chain-of-thought length is not reasoning quality; count ineffective repetition and irrelevant detours.
    • Open-problem scoring: score along four dimensions — hypothesis plausibility, counterexample awareness, proof completeness, and verifiability.
    • Cost and latency: record input/output tokens, response time, retry counts, and human-review cost.
    • Expression quality: clarity of explanation and naturalness of writing should be evaluated separately from mathematical correctness.

    One point deserves emphasis: a longer, more elaborate chain of thought does not necessarily mean stronger reasoning. A long chain may contain more genuine exploration, or more redundancy. A concise chain whose steps are verifiable and whose conclusions are stable is often better suited for engineering deployment.

    4. Building a Contamination-Resistant Benchmark

    The benchmark should be sampled by layer, covering L1 through L4, and should include private problems, variants, and dynamically generated problems to reduce data-contamination risk. Each problem should ship with a reference answer, a reference solution process, a verification script, or a human scoring rubric. Open problems require double-blind review with an arbitration mechanism to avoid single-reviewer bias. The benchmark must be versioned: when the model is upgraded or the problem set changes, re-run regression rather than comparing new results against old scores.

    An illustrative evaluation workflow:

    1. def evaluate_math_capability(samples, model, verifier, temperatures=(0.0, 0.3, 0.7)):
    2. results = []
    3. for sample in samples:
    4. outputs = []
    5. for t in temperatures:
    6. output = model.generate(sample.prompt, temperature=t)
    7. check = verifier.check(sample, output)
    8. outputs.append({
    9. "temperature": t,
    10. "answer_correct": check.answer_correct,
    11. "step_score": check.step_score,
    12. "verifiable_ratio": check.verifiable_ratio,
    13. "tokens": output.token_count,
    14. "latency_ms": output.latency_ms
    15. })
    16. results.append({
    17. "sample_id": sample.id,
    18. "level": sample.level,
    19. "outputs": outputs,
    20. "consistency": compute_consistency(outputs)
    21. })
    22. return aggregate_by_level(results)

    This workflow emphasizes multi-temperature sampling, process verification, and per-layer aggregation, rather than collapsing everything into a single accuracy number.

    5. From Offline Evaluation to Online Model Selection

    After offline evaluation, resist concluding that “one model is comprehensively stronger.” A more reasonable approach is to compute layered scores weighted by business needs: basic Q&A can weight L1/L2 more heavily, proof assistance can weight L3, research exploration can weight L4, and production systems must incorporate L5 constraints on cost and latency. Then roll out gradually and run online A/B tests, monitoring accuracy, human-review rate, retry rate, and user feedback. For hard problems, adopt a routing strategy of “lightweight model preprocessing + strong-model review + verifier check + human spot checks”; for easy problems, avoid over-invoking expensive high-capability models.

    At the engineering stage, general-purpose cloud capabilities such as Baidu AI Cloud’s object storage, log service, and monitoring/alerting can host evaluation datasets, run logs, and metric dashboards, making evaluation results traceable, reproducible, and alertable.

    6. Common Pitfalls and Conclusion

    Common pitfalls include: substituting a single leaderboard for layered evaluation; equating long chains of thought with strong reasoning; looking only at final answers while ignoring the process; treating open-problem ability as absolute; ignoring sampling configuration and verification costs; and substituting brand names for technical dimensions. Professional evaluation should return to the task itself: define the math layer explicitly, define process metrics, build a contamination-resistant benchmark, introduce a verification loop, and continuously calibrate with online data. Only then can the vague question “is this model good at math?” be turned into a reproducible, verifiable, and deployable engineering decision.