Evaluating and Practicing the Mathematical Reasoning of Large Language Models
This article explains why ranking the mathematical ability of large language models is difficult, and offers a practical evaluation framework. It covers a four-layer metric design spanning reasoning correctness, chain-of-thought characteristics, notation and formatting quality, and engineering usability, along with a relative-coordinate method for model selection when no unified benchmark exists. It also provides prompt engineering patterns for open proof tasks, cost and quota scheduling strategies, common pitfalls, and a step-by-step approach to building a repeatable evaluation pipeline.
1. Background: Why Mathematical Ability Is Hard to Rank
In real engineering and research-assistance scenarios, users often care less about how fluently a model handles general Q&A and more about whether it can complete a structurally sound mathematical argument. The core requirement in the original discussion can be summarized in one sentence: given a proposition from a public mathematics repository that has no published proof, the model must construct the reasoning itself and output it in the form of a formal academic lecture note.
This kind of task is valuable for evaluation because it stress-tests three capabilities at once. First, long-chain deduction: the model must build lemmas and intermediate steps on its own without a reference answer. Second, adherence to symbolic and formatting constraints: the output must follow mathematical typesetting conventions. Third, long-context consistency: definitions, notation, and the target proposition must not contradict one another across the text.
It is worth emphasizing that any “capability ranking” is only a relative conclusion under a specific task distribution. Talking about rankings without specifying the task, data, and prompts easily leads to conclusions that cannot be reproduced. A more reliable approach is to build your own evaluation set rather than copy someone else’s leaderboard position.
2. Evaluation Dimensions: Turning Subjective Impressions into Observable Metrics
Break the evaluation into four layers, each mapped to observable signals.
- Reasoning correctness and depth: whether the conclusion holds, whether key steps are verifiable, and whether there are skipped steps or circular arguments.
- Chain-of-thought complexity and conciseness: models differ here. Some produce very short chains with expression close to human writing; others produce extremely long chains with many branches. Long chains offer more exploration space on open problems but accumulate errors more easily.
- Expression and formatting quality: whether terminology is used accurately, whether definitions come first, and whether equation numbering and cross-references are self-consistent.
- Engineering usability: response latency, queue probability, quota consumption rate, and the cost of retrying failures.
A sample evaluation record can look like this:
{"task_id": "proof-001","prompt_type": "open_proof","metrics": {"correctness": 1,"max_chain_depth": 42,"notation_consistency": 0.95,"tokens_consumed": 18000},"notes": "Key lemma constructed independently, no retrieval used"}
3. Capability Tiers: A Reusable Relative Coordinate
When no unified benchmark exists, use a “relative coordinate” method instead of absolute ranks: pick several capability tiers as anchors and insert the model under test among them. The empirical coordinates from the original discussion are that a certain newer version sits roughly between two middle tiers, and the performance after a minor version upgrade at least matched the previous anchor tier; compared with another technical approach, the base version falls between two tiers while the upgraded version reaches a higher tier.
The value of this method is that it transfers: anchors change as the ecosystem updates, but the insertion method itself stays valid over time. In practice, reset the anchors every quarter and keep historical evaluation sets to watch for regressions.
4. Prompt Engineering: Stable Output for Open Proposition Tasks
For tasks like “complete the proof and generate a lecture note,” the prompt should explicitly constrain four things: the target proposition, the available background, the output format, and prohibited behaviors.
Task: Construct a complete proof for the proposition below.Constraints:1. Do not claim the proposition already has a public proof; derive it yourself;2. List notation and definitions first, then give lemmas and proofs;3. Output an English academic lecture note with numbered equations;4. If a step cannot be rigorously argued, explicitly mark it as a lemma to be filled in; do not skip over it vaguely.
Item 4 is especially important: it converts a “seemingly complete” pseudo-proof into a locatable gap and significantly reduces the cost of manual review.
5. Cost and Quotas: Scheduling a Limited Resource
A very real pain point in the original discussion is that membership quota is about to expire and remaining credits cannot be cashed out, while queuing during peak hours is severe. Abstracted, these are two engineering constraints: the validity period of a quota and fluctuations in service availability.
Actionable strategies include:
- Task tiering: reserve the strongest tier for high-value, long-chain tasks, and push light tasks such as summarization and rewriting down to a low-cost tier.
- Batching and off-peak scheduling: put non-real-time tasks in a queue and avoid peak hours.
- Caching and reuse: cache outputs for identical propositions and templates to avoid repeated billing.
- Budget guardrails: set a consumption cap per task, with automatic downgrade or interruption when exceeded.
def dispatch(task):if task.priority == "high" and task.est_tokens < BUDGET:return run_on("strong_tier", task)if task.cache_hit:return task.cached_outputreturn enqueue(task, mode="off_peak")
6. Common Pitfalls
First, treating fluency as correctness. A smoothly written proof may hide a circular argument. Second, looking at a single run only. Mathematical tasks have high variance, so sample multiple times and measure the pass rate. Third, ignoring formatting constraints. If the numbering in a lecture-note output is messy, the cost of later manual review multiplies. Fourth, substituting a general leaderboard for your own evaluation set, which causes model selection to mismatch your real business distribution.
7. Conclusion and Implementation Advice
For developers, the rational path is to first build 20 to 50 evaluation tasks that fit your own scenario, then score them on four dimensions: correctness, chain-of-thought characteristics, expression quality, and engineering usability, and complete model selection with the relative coordinate method. At the same time, introduce task tiering, off-peak scheduling, result caching, and budget guardrails at the system level, turning model capability fluctuations and quota limits into controllable engineering parameters. If you already use model services on Baidu AI Cloud, you can combine its general capabilities such as monitoring and alerting, log services, and message queues to build an evaluation and scheduling pipeline, turning capability assessment from a one-off subjective experience into a sustainable engineering practice that iterates over time.
