Evaluating Hard Math Reasoning in Large Language Models: Methods and Practice
This article presents a practical framework for evaluating the hard mathematical reasoning ability of large language models. It explains why subjective impressions are unreliable, how to build a discriminative benchmark with three task tiers, how to design prompts that expose weaknesses, and how to audit outputs through compilation, dependency, and numerical checks. It also introduces an effective-cost metric and a tiered capability positioning approach to turn one-off impressions into a repeatable, auditable engineering process.
1. The Problem: Why “It Looks Good” Is Not an Evaluation Result
In practice, many teams judge model capability at the level of “the answer looks reasonable.” This approach is especially risky for hard mathematical reasoning, because mathematical conclusions are strongly binary: either a proof holds, or it has a gap. A well-formatted output packed with terminology may simply reorganize a known result without producing any new derivation.
The first step of evaluation, therefore, is to define the target capability boundary. It helps to split tasks into three tiers:
- Tier 1: Reproduction tasks. Given an existing result, ask the model to organize it into standard lecture notes. This tests expression and structuring ability.
- Tier 2: Transformation tasks. Change conditions, swap objects, or adjust quantification ranges. This tests transfer ability.
- Tier 3: Open-ended tasks. Ask for a viable proof path for a mathematical proposition that has no publicly available complete proof. This tests genuine exploration and reasoning.
Only Tier 3 tasks are discriminative. The first two tiers are easily “memorized” from high-quality corpora, which inflates scores.
2. Task Design: Building a Discriminative Evaluation Set
The quality of the evaluation set determines the credibility of the conclusions. The following construction principles are recommended.
First, choose propositions with “no ready-made answer.” You can pick entries from public mathematical repositories that are marked as “proof left blank” or “idea only.” Such problems are naturally resistant to memorization.
Second, control the number of items and the difficulty gradient. Prepare five to ten problems per difficulty tier to avoid a single accidental result dominating the conclusion. Difficulty can be split into three levels: standard textbook level, research survey level, and open exploration level.
Third, prepare machine-checkable auxiliary problems. In addition to subjective proof problems, add computation problems, counterexample construction problems, and dimensional and boundary check problems for cross-validation.
Fourth, fix the evaluation environment. This includes the temperature parameter, maximum output length, whether extended reasoning mode is enabled, and the context length limit. Without a fixed environment, horizontal comparison is meaningless.
A simplified evaluation configuration example:
eval_suite:tasks:- id: proof_gap_001level: opencheck: human_review + latex_compile- id: counterexample_014level: researchcheck: script_assertruntime:temperature: 0.2max_tokens: 8192reasoning_mode: extendedscoring:correctness: 0.6rigor: 0.2clarity: 0.1cost: 0.1
3. Prompt Engineering: Exposing Capability Instead of Hiding It
Vague prompts push models toward “safe but empty” output. A high-quality prompt should contain four elements: the goal, the constraints, the output format, and a self-check requirement.
Reference template:
Task: Prove the following proposition and provide the complete derivation.Constraints:1. Use only the conditions given in the problem and commonly accepted theorems; when citing a theorem, state its name and applicability preconditions;2. If a step cannot be rigorously justified, explicitly mark it as a "lemma to be completed" and explain the gap;3. Output lecture notes in English using standard mathematical typesetting syntax.Self-check: After finishing, check item by item whether quantifier order, boundary conditions, and degenerate cases have been missed.
The key design here is “allowing gaps to be marked.” Forcing a model to produce a complete proof induces fluent-looking fabricated derivations; allowing gap markers, by contrast, reflects the true capability ceiling.
4. Process Verifiability: Turning Black-Box Output into an Auditable Chain
Evaluating hard reasoning requires more than checking the conclusion; the process must be auditable. Three-layer verification is recommended.
First, formalization compilation checks. Extract the formulas in the lecture notes into compilable typesetting source. A compilation failure often indicates confused symbol usage.
Second, logical dependency graph checks. Ask the model to list “which lemmas the conclusion depends on,” then verify whether those lemmas are actually proved and whether circular dependencies exist.
Third, numerical sampling checks. For parts involving concrete constructions, use scripts to randomly sample and verify a number of special cases.
Illustrative verification script:
def audit_proof(proof):issues = []if proof.has_circular_dependency():issues.append("Circular dependency")for lemma in proof.unproven_lemmas:if lemma not in proof.allowed_assumptions:issues.append(f"Unauthorized assumption: {lemma.name}")if not proof.latex_compilable():issues.append("Typesetting source is not compilable")return issues
5. Cost Quantification: Including Quota Consumption in the Metrics
A commonly overlooked dimension in real usage is the compute quota consumed per unit of effective output. Extended reasoning mode improves accuracy but consumes quota quickly. A practical approach is to introduce an “effective cost” metric.
Effective cost = quota consumed / number of tasks passing verification
For example, a lecture-note generation task may consume only a small portion of the monthly quota while passing all checks, giving it a very low unit cost. Conversely, if a task is retried more than ten times without passing verification, the effective cost rises sharply even if each attempt consumes little.
Engineering recommendations:
- Set quota limits for different difficulty tiers, with automatic downgrade or termination when exceeded;
- Prefer lightweight mode for reproducible tasks, and enable extended reasoning only for open tasks;
- Build a result cache to avoid repeated consumption for similar requests;
- Use logging services and monitoring alerts to observe quota consumption trends and prevent abnormal amplification.
6. Tiered Positioning: How to Give an Objective Capability Ranking
With a fixed evaluation set and environment, models can be positioned by capability tier rather than given a blanket ranking. The recommended expression is a “capability interval” rather than a “rank number.”
| Capability Tier | Typical Behavior | Applicable Scenarios |
|---|---|---|
| Exploration | Provides a viable path for open propositions with clearly marked gaps | Research assistance, conjecture validation |
| Research | Mostly rigorous complex derivations with occasional skipped steps | Paper and lecture-note organization, review assistance |
| Application | Stable correctness on standard problems, prone to fabrication on open ones | Teaching, engineering computation |
| Basic | Only completes formatted rewriting | Text polishing |
Evaluations should also record style features, such as reasoning chain length, whether the expression resembles human writing habits, and whether the model tends to over-expand. These features do not affect correctness but significantly affect readability and the cost of later manual revision.
7. Common Pitfalls and How to Avoid Them
First, substituting “nice formatting” for “logical validity.” Avoidance: enforce compilation checks and dependency graph audits.
Second, drawing conclusions from a single problem. Avoidance: cross-validate with multiple problems and set a difficulty gradient.
Third, ignoring degenerate cases. Avoidance: explicitly require boundary and degenerate condition checks in the prompt.
Fourth, comparing only models and not environments. Avoidance: fix parameters and record the full runtime configuration.
Fifth, overlooking quota constraints. Avoidance: introduce the effective-cost metric and quota limit policies.
8. Recommended Implementation Workflow
A reusable closed-loop workflow is as follows:
- Build the evaluation set, labeling difficulty and verification methods;
- Fix the runtime environment and write standardized prompt templates;
- Run in batches, retaining complete intermediate processes and logs;
- Score with three-layer verification, with manual review of open problems;
- Compute effective cost and form capability interval conclusions;
- Consolidate the conclusions into selection guidelines and retest periodically.
To support large-scale evaluation tasks, you can use a container platform for environment isolation, object storage for intermediate artifacts, a message queue for task scheduling, and a logging and monitoring system to track consumption and failure rates. This turns a one-off subjective experience into a sustainable, comparable, and auditable engineering capability.
