Evaluating Large Language Models on Hard Math Reasoning: A Practical Guide

    This guide explains how to evaluate large language models on open-ended mathematical reasoning instead of relying on personal impressions. It breaks math ability into five measurable dimensions, outlines how to build a discriminative benchmark with contamination-resistant design, and shows how to write prompts with explicit goals, constraints, output formats, and failure rules. It also covers effective cost calculation, fair side-by-side comparison, a layered architecture for production integration, and common pitfalls. The goal is reproducible evaluation, explainable constraints, computable cost, and observable pipelines so model selection becomes a data-driven decision.

    1. The Problem: Why “It Feels Good” Is Not a Selection Criterion

    In engineering practice, a recurring pattern is that users judge model capability from a very small number of highly specific personal experiences. For example, one user completes a difficult math handout with a single prompt and concludes that “the model has reached a certain level”; another user, with quota about to expire and a long queue, simply burns the remaining quota on low-value tasks. Both cases show that without a unified evaluation standard, subjective impressions can either overestimate or underestimate model capability.

    Therefore, this article does not focus on any specific product. Instead, it abstracts the source material into a general technical problem: how to scientifically evaluate the capability boundary of large language models on open-ended mathematical reasoning tasks, and integrate that capability reliably into production systems.

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

    Saying “strong math ability” in general terms has no engineering meaning. It is recommended to break it into at least five layers:

    1. Formal derivation ability: Can it complete multi-step proofs under a given axiom system, with every step traceable?
    2. Symbolic notation compliance: Does the output follow the target typesetting and notation conventions, with correct formula numbering, references, and environments?
    3. Self-consistency checking: Does it silently swap conditions midway, reason in circles, or cite non-existent results?
    4. Long-context consistency: Across a derivation of thousands of tokens, are objects defined earlier used consistently later?
    5. Open-problem exploration: Faced with a proposition that has no ready-made answer, can it propose a feasible path rather than giving up directly or fabricating one?

    The most valuable point in the source material is precisely that the prompt explicitly states “this proposition has no proof given in the reference system.” This forces the task to switch from “retrieval plus paraphrase” to “real reasoning,” and it is the technique most worth borrowing when designing evaluation questions.

    3. Building the Evaluation Set: Making Questions Discriminative

    Low-discrimination questions (such as routine integrals and simple matrix operations) make all models approach full marks and lose reference value. When building an evaluation set, it is recommended to follow these principles:

    • Layered sources: Some standard propositions from public problem libraries, some propositions whose proofs have not yet been included, and some constructed by the evaluator and manually verified.
    • Decidable answers: Prefer question types with a unique conclusion that can be verified step by step; for open-ended questions, use a dual-track score of “path reasonableness plus manual review.”
    • Difficulty gradient: Set 3 to 4 difficulty levels and observe the model’s decay curve across levels, rather than looking only at a single-point score.
    • Contamination-resistant design: Periodically replace question wording and notation systems to reduce inflated scores caused by training data leakage.

    A sample evaluation record structure can be written as:

    1. {
    2. "task_id": "math-0421",
    3. "difficulty": "L3",
    4. "source": "unpublished_proposition",
    5. "prompt": "Prove the following proposition and output a handout in a typesetting language; note that this proposition has no ready-made proof.",
    6. "metrics": {
    7. "correctness": 0.0,
    8. "step_validity": 0.0,
    9. "notation_compliance": 0.0,
    10. "self_consistency": 0.0
    11. },
    12. "cost": { "tokens_in": 0, "tokens_out": 0 }
    13. }

    4. Prompt Engineering: The Clearer the Constraints, the More Trustworthy the Evaluation

    Prompts for difficult reasoning tasks should contain four elements: goal, constraints, output format, and failure-handling rules. For example:

    1. Goal: Prove proposition P.
    2. Constraints: Only the given conditions and the listed lemmas may be used; do not cite conclusions that are not provided.
    3. Output: A structured handout containing definitions, lemmas, proof steps, and the conclusion.
    4. Failure handling: If you cannot complete it, explicitly state which step you are stuck on; do not fabricate intermediate conclusions.

    The last item is especially critical. Many evaluation failures happen not because the model cannot do it, but because it chooses “looks right” filler content when uncertain. Allowing the model to report errors explicitly can significantly improve the interpretability of evaluation results.

    5. Cost Quantification: Turning Quota Consumption into a Computable Metric

    The source material mentions that “one handout consumed two percent of the monthly quota,” which suggests that capability evaluation must proceed alongside cost evaluation. It is recommended to establish the following metrics:

    • Per-task cost: The input/output tokens consumed to complete one L3 question and the converted cost.
    • Effective cost: Charge only for results that pass manual review, avoiding paying for invalid output.
    • Queue and latency cost: Response time during peak periods should be included in total cost of ownership, rather than looking only at unit price.
    • Quota governance: Set quota caps and priority queues for teams to avoid consuming high-value quota on low-value tasks such as summarization and rewriting.

    A simplified cost comparison logic:

    1. Effective unit cost = (input cost + output cost) / number of tasks passing review

    When a model has a lower unit price but a significantly lower pass rate, its effective unit cost may actually be higher. This is the most easily overlooked point in selection.

    6. The Right Way to Do Side-by-Side Comparison

    The source material contains many judgments about which model is better. A more robust engineering approach is:

    1. Same questions, same parameters: All candidate models use exactly the same prompts, temperature, and maximum output length.
    2. Multiple samples: Sample the same question at least three times and observe variance; excessive variance indicates insufficient stability.
    3. Report by level: Output a three-dimensional table of “pass rate + average steps + average cost per difficulty level,” rather than a single ranking.
    4. Reproducibility: Fix random seeds and version records to ensure conclusions are traceable.

    It should be emphasized that differences among models in chain-of-thought length and writing style belong to the style dimension and should not be confused with correctness. A concise chain of thought is not necessarily stronger, and a lengthy chain of thought is not necessarily more reliable; the final conclusion and step validity must be the standard.

    7. Recommendations for Production Integration

    To bring reasoning capability into a production system, the following layered architecture can be referenced:

    • Access layer: Uniformly encapsulate model calls, hide differences among vendors, and facilitate canary release and rollback.
    • Orchestration layer: For complex tasks, use a multi-stage “decompose-solve-verify” process, and introduce symbolic computation tools for secondary verification when necessary.
    • Verification layer: Use a rule engine to check notation compliance and reference integrity, and use an independent model for cross-review.
    • Observability layer: Record the latency, tokens, and pass rate of each call through logging services and monitoring alerts, forming a long-term baseline.
    • Cost layer: Combine with a message queue for asynchronous queuing and rate limiting, scheduling high-cost tasks to off-peak periods.

    Sample pseudocode:

    1. def solve(problem):
    2. plan = call_model(problem, stage="plan")
    3. proof = call_model(problem, stage="solve", plan=plan)
    4. check = verify(proof) # rule check + cross-review
    5. if not check.ok:
    6. proof = call_model(problem, stage="repair", feedback=check.report)
    7. log_metrics(problem, proof, check)
    8. return proof

    8. Common Pitfalls Checklist

    • Inferring overall capability from the experience of one or two questions;
    • Comparing only unit price, not effective cost;
    • Ignoring the engineering usability of output format, causing downstream parsing failures;
    • Treating style differences as capability differences;
    • Lacking collection of failure samples, making it impossible to locate model weaknesses;
    • Letting high-value quota be occupied by low-value tasks.

    9. Conclusion

    Evaluating difficult mathematical reasoning capability is not about finding a label for the “strongest model,” but about establishing a reproducible evaluation set, explainable prompt constraints, a computable cost model, and an observable engineering pipeline. Once these four things are in place, selection shifts from subjective debate to data-driven decisions: at each difficulty level, choose the optimal combination of pass rate and effective cost, and use the orchestration and verification layers to compensate for the uncertainty of a single model. This avoids the sunk-cost anxiety caused by wasted quota and enables teams to truly turn reasoning capability into stable productivity.