Evaluating and Selecting LLMs for Mathematical Proof Tasks
A practical framework for evaluating large language models on mathematical proofs, covering task design, contamination risks, scoring rubrics, effective cost, and service availability. Learn how to compare models by use case and build a reproducible evaluation pipeline rather than relying on subjective impressions or a single leaderboard.
Model selection discussions often rely on impressions such as “it works reasonably well,” “this task burns through the quota quickly,” or “it seems stronger than the previous generation.” These observations can be useful, but they are not a sufficient basis for team-level decisions.
The same model can perform very differently across tasks, prompts, and quota policies. Mathematical proofs make this problem especially apparent: fluent answers are not necessarily rigorous, and extensive citations do not demonstrate independent proof construction.
A better approach is to shift from “evaluating a model” to assessing whether a specific capability is usable in a defined scenario, at an acceptable cost and risk.
1. Define the Evaluation Scope: Advanced Mathematical Reasoning Is Not One Capability
Advanced mathematical reasoning can be divided into at least three levels:
- Calculation and derivation: Performing multistep symbolic operations under given assumptions.
- Proof completion: Filling gaps within a supplied context of definitions, lemmas, and literature.
- Open-problem exploration: Proposing testable ideas, counterexamples, or possible proof strategies.
Each level requires different evaluation criteria. Calculation emphasizes answer accuracy. Proof completion emphasizes logical completeness and appropriate use of cited results. Open-ended exploration emphasizes originality and verifiability.
It is particularly important to distinguish independent proof construction from retrieval or reproduction. For tasks drawn from public literature, a model may have memorized the result or proof outline from its training data.
To reduce contamination risk, prioritize:
- Propositions presented without proofs.
- Reformulated propositions that are mathematically equivalent to the originals.
- Tasks requiring the combination of lemmas from different chapters.
Require the model to state explicitly which established results it uses. For propositions whose proofs are omitted from the public source, evaluators should manually check that the response provides a verifiable derivation rather than directly reproducing an existing proof.
2. Design Tasks That Differentiate Models
An evaluation set should not consist only of difficult problems. Organize it by difficulty, mathematical domain, and output format.
At a minimum, include:
- Basic distinctions between definitions.
- Multistep algebraic derivations.
- Proofs in mathematical analysis.
- Combinatorial constructions.
- Probability arguments.
- Integrated tasks requiring English lecture notes or structured typesetting source.
Each task should specify constraints. Examples include:
- Do not cite lemmas that have not been supplied.
- Provide a counterexample, or explain why none exists.
- Include a theorem statement, proof steps, a list of key lemmas, and compilable typesetting source.
Prompts should be neutral and reproducible. Avoid instructions that encourage the model to imitate a particular writing style.
A sample template is:
Given proposition P and its context, construct a proof independently. If additional lemmas are needed, state and prove them first. Produce English lecture notes containing the theorem, proof, commentary, and structured typesetting source. Do not omit essential steps.
This keeps the evaluation focused on proof quality rather than stylistic polish.
3. Use a Scoring Rubric for Quality and Cost
Use separate scores rather than relying on a single aggregate score.
| Dimension | What to evaluate |
|---|---|
| Correctness | Whether the conclusion and essential steps are correct. |
| Rigor | Whether the proof contains logical gaps, circular reasoning, incorrect citations, or unproved lemmas. |
| Readability | Whether the structure is clear, definitions are consistent, and lecture notes are well organized. |
| Reproducibility | Whether another engineer can check the output step by step and whether the typesetting source is structurally complete. |
Each dimension can use a 0–4 scale:
- 0: Unusable.
- 1: Major defects.
- 2: Partially usable.
- 3: Generally usable.
- 4: High quality.
Cost should also be part of the evaluation. A useful definition is:
Effective cost = billing cost + waiting cost + rework cost
Billing cost can be measured in quota units or API charges. Waiting cost reflects queue time, timeout frequency, and retries. Rework cost estimates the human time required to review and correct the output.
For subscription-based quotas, consumption per request is not enough. Evaluate cost per usable task: how many reviewable proofs does a given amount of quota produce?
4. Evaluate Availability and Engineering Integration
Mathematical proof tasks often take substantial time, so service availability must be included in the assessment.
Record:
- P95 latency.
- Timeout rate.
- Retry rate.
- Distribution of failure causes.
- Queue conditions during peak usage.
A model that performs well during off-peak hours but frequently queues during peak demand may be much less useful in production.
Engineering measures can include asynchronous task queues, result caching, timeout retries, idempotency records, and human-review queues. Evaluation sets and generated results can be stored in object storage, invocation traces recorded in a logging service, and failure and timeout rates connected to monitoring and alerts.
These are general cloud infrastructure patterns, including in environments such as Baidu AI Cloud; they do not depend on a particular model interface.
Version the prompts, model versions, quota policies, and evaluation scripts as well. Without this record, changes in the same model’s performance over time cannot be reliably attributed to their causes.
5. Select Models by Use Case, Not a Single Leaderboard
Model selection should be organized by scenario rather than treated as a search for one overall winner.
- Proof completion: Prioritize rigor and the extent to which the proof is constructed independently.
- Lecture-note generation: Prioritize structure and readability.
- Open-ended exploration: Prioritize whether proposed ideas can be verified.
- Cost-sensitive tasks: Prioritize cost per usable task.
Longer reasoning traces do not necessarily indicate stronger proofs. More human-like prose does not imply greater mathematical rigor.
For critical mathematical tasks, require human review before accepting the output. For workloads that consume substantial quota, start with a small evaluation batch before committing to a bulk processing pipeline.
6. Evaluation Pipeline Pseudocode
task = {id: "proof-001",statement: "Proposition to prove",constraints: ["Construct the proof independently","Do not cite lemmas that have not been supplied","Output structured lecture notes"],output_format: "English lecture notes + compilable typesetting source"}score = {correctness: 0..4,rigor: 0..4,readability: 0..4,reproducibility: 0..4,cost_units: number,latency_s: number,retries: number}for model in candidate_models:for task in tasks:resp = invoke(model, build_prompt(task))result = evaluate(resp, task)record(result, cost(model, resp), latency, retries)
The central recommendation is to replace subjective model impressions with a closed evaluation loop: task sets, scoring rubrics, cost accounting, and availability monitoring.
Start with a small, stratified set of mathematical proof tasks designed to reduce contamination risk and establish capability boundaries. Then use cost per usable task and queueing metrics to assess production suitability. This approach helps teams avoid decisions driven by isolated examples or a single leaderboard and turns model capability into a measurable, auditable engineering decision.
