Evaluating Mathematical Proof Generation in LLMs: Metrics, Workflows, and Cost Control

    Evaluating an LLM for mathematical proof generation requires more than demos or leaderboard rankings. This guide explains how to define the task boundary, build a multi-dimensional evaluation framework covering correctness, rigor, readability, verifiability, stability, and cost, design a staged prompt workflow for proof generation, measure effective accuracy per unit task cost, and run fair internal model comparisons with proper risk boundaries.

    Evaluating Mathematical Proof Generation in LLMs: Metrics, Workflows, and Cost Control

    Evaluating a large language model designed for mathematical proof generation cannot rely on a single demo, a leaderboard ranking, or one “impressive output.” Mathematical proof is a classic long-horizon reasoning task: it requires not only a correct conclusion, but also rigorous steps, legitimate citations, readable exposition, controllable cost, and reproducible results. A more sound approach is to break “capability evaluation” into several parts—task boundary, evaluation metrics, prompts and workflows, cost control, model selection, and risk boundaries—and build a reproducible internal evaluation system.

    1. Define the Task First: Proof Generation Is Not Retrieval and Paraphrasing

    The difference between mathematical proof generation and ordinary question answering is that the model may face a proposition with no ready-made proof to copy. It must independently understand definitions, identify applicable theorems, organize dependencies among lemmas, and construct a logically closed argument. In this setting, “the conclusion looks right” does not mean “the proof holds.” Common problems include: implicitly using unproven lemmas, incorrect quantifier scopes, omitted boundary conditions, circular reasoning, generalizing a special case into a general conclusion, and burying missing key steps under lengthy natural language.

    Evaluation should therefore distinguish three levels: first, whether the conclusion is correct; second, whether the proof process is rigorous; third, whether the output is verifiable and reproducible. For parts that can be formally checked, general symbolic checking or formal verification approaches can provide assistance; for informal proofs, a human review step must be retained. The output structure should also separate definitions, given conditions, goals, lemmas, proofs, and citation relationships, so that key logic is not buried in long paragraphs.

    2. Evaluation Dimensions: Don’t Replace a Capability Profile with a Single Score

    Build a scoring rubric from at least the following dimensions:

    1. Correctness: Does the conclusion hold? Are there logical gaps in the steps? Are the cited definitions and theorems applicable? Correctness should be a gate metric—if it fails, the other scores have limited meaning.

    2. Rigor: Are assumptions, quantifiers, boundary conditions, and special cases stated explicitly? Is circular reasoning avoided? Are key lemmas proved or given clear citation grounds?

    3. Readability: Is notation consistent throughout? Is the lemma hierarchy clear? Does the proof present a skeleton before expanding? Readability is not about “elegant prose”—it is about reducing review cost.

    4. Verifiability: Can each step be traced to its justification? Can a human or an automated checker verify it item by item? Can the same conclusion be reproduced?

    5. Stability: Does the result drift significantly across repeated sampling of the same proposition, temperature adjustments, or prompt variations? For mathematical tasks, pay special attention to whether multiple solutions to the same problem remain consistent.

    6. Cost and latency: Including API call costs, inference time, human review time, and failed-retry costs. Long reasoning chains usually incur higher costs, so single-output quality alone is not enough.

    7. Compliance and safety: The model must not fabricate nonexistent references, theorems, or citations; it must not package unverified conclusions as proven; academic content should retain a human sign-off step.

    3. Prompts and Workflow: Decompose “Proving” into Checkable Stages

    A single instruction like “prove this proposition and write it up as an English lecture note” invites the model to improvise and makes errors hard to locate. A more robust approach is a staged workflow: parse the task first, then list a proof plan, then map lemma dependencies, then expand the proof, and finally audit item by item. Pseudocode:

    1. procedure prove_math_task(task, budget):
    2. parsed = model.analyze(task,
    3. output="definitions, given conditions, goal, potential risks")
    4. plan = model.plan(parsed,
    5. output="proof strategy, lemma list, dependencies")
    6. skeleton = model.draft(plan,
    7. output="proof skeleton and key steps")
    8. checks = verify(skeleton)
    9. if checks.critical_errors > 0:
    10. return repair(skeleton, checks, budget)
    11. proof = model.expand(skeleton,
    12. output="structured proof text")
    13. audit = model.audit(proof,
    14. output="itemized checklist: assumptions, quantifiers, citations, boundaries")
    15. if audit.passed and cost(proof) <= budget:
    16. return proof
    17. return fallback_with_uncertainty(proof, audit)

    Prompts should explicitly specify: the scope of usable materials, the output structure, assumptions that must be listed, items that must be self-checked, and how to declare uncertainty on failure. For propositions with “no existing proof,” require the model to first state which known results it intends to use and then provide a proof skeleton, rather than generating large blocks of text directly. This improves rigor and makes it easier for human reviewers to quickly locate problems.

    4. Cost Control: Measure Value by “Effective Accuracy per Unit Task Cost”

    Long-horizon reasoning tasks easily consume budget. In engineering terms, avoid routing all requests to the highest reasoning tier; instead, tier by task value: low-risk, low-difficulty tasks use lightweight configurations, while high-value tasks requiring strict proofs enable long reasoning and multi-round auditing. Additional strategies include caching common lemmas, processing long documents in chunks, setting budget thresholds, early stopping on failure, logging calls, and monitoring with alerts.

    To evaluate cost-effectiveness, use two derived metrics: effective accuracy = samples passing verification / total samples; unit task cost = total call cost / samples passing verification. Combined, they are far more meaningful than “one very long output” or “the share of quota consumed on one run.” A model that generates a long lecture note in one pass does not necessarily have stronger proof capability; if it requires extensive retries and human review, the overall cost may actually be higher.

    5. Model Selection and Comparison: Build an Internal Benchmark Instead of Relying on Public Rankings

    When comparing models, keep prompts, sampling counts, budget ceilings, and human review standards consistent. The benchmark can be stratified by difficulty: basic definition problems, upper-undergraduate proof problems, graduate-level topic problems, and open problems. Open problems should not be scored automatically alone—introduce double-blind human review and record points of disagreement. For high-value scenarios, also repeat sampling to observe stability, and attribute failures: is it a comprehension error, a planning error, a lemma error, or a presentation and formatting problem?

    Public leaderboards can serve as a reference, but they cannot replace internal evaluation. Different tasks have different preferences for “chain-of-thought length,” “writing style,” and “output format.” Some models produce concise reasoning chains with low review cost; others produce longer chains that are not necessarily more correct. Final selection should be based on “whether effective accuracy per unit cost on the target task set meets the business threshold.”

    6. Risk Boundaries and Practical Recommendations

    Be clear about this: current models still have obvious limits on open mathematical problems; long reasoning does not equal correctness, and the coverage of automated checking is limited. High-risk mathematical or academic content must retain human review and sign-off. Output formats can also degrade in long texts, so structured validation is necessary. For practical adoption, start with a small-scale pilot: define a baseline, build a scoring rubric, log calls, set budget alerts, roll out gradually, and then expand task types. Using general cloud service categories—object storage for benchmark datasets, log services for call records, monitoring and alerting for budget control, and container platforms for running evaluation pipelines—you can turn evaluation and cost governance into a sustainable process.

    In summary, evaluating LLMs for mathematical proof should build a multi-dimensional profile around “correct, rigorous, readable, verifiable, and cost-controllable.” A single demo is only a clue; an internal benchmark, a staged workflow, and effective accuracy per unit task cost are the more reliable basis for technical judgment.