Evaluating LLMs for Complex Mathematical Proofs: Benchmarking, Prompt Design, and Cost Control

    This guide explains how to evaluate large language models on complex mathematical proof tasks in a structured, verifiable, and cost-aware way. It covers core evaluation dimensions such as correctness, completeness, verifiability, presentation quality, efficiency, and stability; it also explains how to build layered benchmark sets, design prompts that reduce hallucinated references and skipped reasoning steps, apply rubric-based scoring, and route tasks across models according to difficulty and budget. The goal is to move beyond judging whether an answer merely looks plausible and instead assess whether the output is rigorous, reproducible, maintainable, and practical for real engineering use.

    Evaluating LLMs for Complex Mathematical Proofs: Benchmarking, Prompt Design, and Cost Control

    1. Why Complex Proof Tasks Require a Different Evaluation Approach

    In complex mathematical proof tasks, an LLM does not simply produce a short answer. Its output is often a long, structured document that includes proposition interpretation, condition analysis, lemma selection, construction of auxiliary results, boundary-case discussion, and formal mathematical writing.

    These tasks place much higher demands on a model than ordinary question answering. The model must not only reach a conclusion, but also ensure that every reasoning step can be checked, that key lemmas are not omitted, that cited sources are not fabricated, and that the final text is well organized and readable.

    Because of this, evaluating an LLM’s performance on complex mathematical proofs cannot rely only on whether the answer “looks like a proof” or whether the response is long. If the output appears rigorous but contains circular reasoning, missing key steps, misread assumptions, inconsistent notation, or fabricated references, its practical value is still limited.

    A more professional evaluation should treat the model output as a technical document that requires expert review or automated verification. It should assess multiple dimensions, including correctness, completeness, verifiability, presentation quality, and cost efficiency.

    In practice, complex mathematical proof tasks usually have three characteristics:

    1. High cognitive load: The model must understand abstract definitions, derive relationships, and construct proof paths rather than simply retrieving an existing answer.
    2. High presentation requirements: The output should follow mathematical writing conventions, including clear definitions, consistent notation, reasonable paragraph structure, and explicit conclusions.
    3. High resource consumption: Long-chain reasoning often requires more compute budget, longer execution time, and higher call costs. Teams therefore need to consider quota usage, queuing, retries, and total operational cost.

    For these reasons, building a rigorous evaluation methodology is not only useful for judging model capability. It also helps teams allocate tasks more effectively when resources are limited.


    2. Core Evaluation Dimensions: Final Answers Are Not Enough

    For complex mathematical proof tasks, evaluation should be broken down into the following six dimensions.

    2.1 Correctness: Does the Conclusion Hold?

    Correctness is the primary metric. The evaluation must first determine whether the final proposition established by the model is valid.

    For known propositions, this can be checked against standard answers. For open propositions without existing proofs, domain experts must judge whether the reasoning is valid.

    Key points to examine include:

    • Whether the final conclusion matches the target proposition;
    • Whether there are obvious logical errors;
    • Whether unmet assumptions are misused;
    • Whether critical boundary cases are missed;
    • Whether there are leaps that appear plausible but cannot be verified.

    If the conclusion is wrong, then the output should be judged as unsatisfactory, even if the language is fluent and the formatting looks polished.

    2.2 Completeness: Are the Key Steps Present?

    Complex proofs often consist of multiple lemmas and intermediate results. A model may provide a correct conclusion while omitting essential derivations, making the proof impossible for a reader to reconstruct.

    Completeness evaluation should check whether the model:

    • Clearly lists known conditions and the target claim;
    • Provides necessary definitions and notation;
    • States or cites key lemmas;
    • Expands the main proof path step by step;
    • Discusses special cases or boundary conditions separately.

    A high-quality proof should not only present a conclusion. It should allow a reader to follow the argument and reproduce the reasoning independently.

    2.3 Verifiability: Are Citations and Reasoning Traceable?

    In mathematical writing, citations must be real, locatable, and checkable. If a model generates nonexistent theorem numbers, fabricated references, or vague references to “known results,” even a fluent-looking output becomes unreliable.

    Verifiability evaluation may include:

    • Whether the source basis is clearly stated;
    • Whether cited content can be checked;
    • Whether the model distinguishes between “known results” and its own derivations;
    • When a proposition has no existing proof, whether the model clearly states that the reasoning is exploratory;
    • Whether uncertain or unverified parts are explicitly marked.

    For complex mathematical tasks, verifiability is often more important than surface-level language fluency.

    2.4 Presentation Quality: Is the Output Suitable for Reading and Reuse?

    If the task requires producing English lecture notes or formal documentation, the model must do more than reason. It must also organize the content clearly.

    Evaluation may focus on:

    • Whether heading levels are clear;
    • Whether definitions, lemmas, theorems, and proofs are clearly separated;
    • Whether mathematical notation is consistent;
    • Whether paragraphs contain logical gaps;
    • Whether the output can be converted into standard mathematical typesetting;
    • Whether there is excessive repetition or irrelevant explanation.

    Presentation quality may look like a surface-level concern, but in real use it directly affects document maintenance cost and team collaboration efficiency.

    2.5 Cost and Efficiency: How Are Quality, Speed, and Resources Balanced?

    In practical use, a more powerful model is not always the best fit. Some high-difficulty tasks require longer reasoning budgets, while some routine tasks are better suited to lower-cost, lower-latency approaches. Evaluation therefore cannot ignore cost.

    Useful indicators include:

    • Time required for a single task;
    • Resource consumption for one successful proof;
    • Average number of rework iterations;
    • Failure and retry rates;
    • Cost per unit of effective output;
    • The impact of peak-hour queuing on delivery reliability.

    When subscription quotas or API call budgets are limited, high-value tasks should be assigned to stronger models with sufficient reasoning budgets, rather than allowing every task to consume resources evenly.

    2.6 Stability: Does the Model Behave Consistently Across Runs?

    Complex mathematical proofs require a high degree of consistency. If the same proposition is run under different prompts, parameters, or times, the model should still produce stable results.

    Stability evaluation can use repeated sampling to examine:

    • Whether the conclusion remains consistent;
    • Whether key steps appear consistently;
    • Whether slight prompt changes cause large deviations;
    • Whether fabricated citations appear frequently;
    • Whether contradictions arise during complex derivations.

    Low stability makes results difficult to reproduce and also complicates engineering deployment.


    3. Building the Evaluation Set: From Generic Problems to Layered Tasks

    To evaluate model capability scientifically, a team should not rely only on scattered examples. A structured evaluation set should cover different difficulty levels and task types, avoiding bias caused by a single test case.

    3.1 Difficulty-Based Task Design

    Tasks can be divided into five levels:

    1. Definition understanding tasks: Assess whether the model can accurately explain mathematical concepts, notation, and assumptions.
    2. Simple derivation tasks: Assess whether the model can perform basic algebraic transformations or logical reasoning.
    3. Standard proof tasks: Assess whether the model can reproduce the standard proof path of a known proposition.
    4. Comprehensive proof tasks: Assess whether the model can combine multiple lemmas to complete a longer proof.
    5. Open-ended exploratory tasks: Assess the model’s reasoning ability when no existing proof is available.

    Each level corresponds to a different evaluation focus. Basic tasks are useful for quick screening, while comprehensive and open-ended tasks are more useful for assessing higher-order capability.

    3.2 Annotation Standards

    For each evaluation task, the following materials should be prepared:

    • The target proposition;
    • Reference proof or standard answer;
    • A list of key steps;
    • Common error types;
    • Scoring rubric;
    • Expert review records.

    For open-ended tasks without standard answers, verifiable anchors can be defined, for example:

    • Whether an intermediate equation can be verified independently;
    • Whether a special case can be checked numerically;
    • Whether a lemma can be derived from known theorems;
    • Whether a conclusion conflicts with a counterexample.

    These anchors help maintain evaluation objectivity even when a complete standard answer is unavailable.


    4. Prompt Design: Making Model Output More Verifiable and Controllable

    Complex mathematical proof tasks place high demands on prompt design. A prompt should not only state the task. It should also constrain model behavior to avoid vague, fabricated, or unverifiable content.

    4.1 Basic Structure of a Proof Prompt

    A good mathematical proof prompt usually includes:

    • Role definition: Make the model act as a rigorous mathematical writing assistant;
    • Task objective: Clearly state the proposition to prove or attempt to prove;
    • Input materials: Provide definitions, theorems, boundary conditions, or reference materials;
    • Output format: Require sectioned output, such as proposition restatement, definitions, lemmas, proof, and boundary discussion;
    • Prohibitions: Forbid fabricated citations, skipped key steps, and treating unknowns as knowns;
    • Checklist: Require the model to self-check at the end whether key conditions have been missed.

    4.2 Example Prompt

    The following prompt can serve as a general template:

    1. Please complete the following task in a rigorous mathematical writing style:
    2. 1. Restate the target proposition and list all known conditions and target conclusions.
    3. 2. List the key definitions, lemmas, or theorems required for the proof.
    4. 3. If citing external material, state what is cited and how it is used. Do not fabricate sources.
    5. 4. Provide the complete proof process, splitting it into multiple steps when necessary.
    6. 5. Discuss special cases, boundary conditions, or exceptional situations.
    7. 6. If you cannot complete the full proof, clearly state where the gap is instead of generating content that looks complete but cannot be verified.
    8. 7. At the end, output a short self-check list confirming whether the following requirements are met:
    9. - Whether the conclusion matches the target proposition;
    10. - Whether key assumptions are missed;
    11. - Whether there is circular reasoning;
    12. - Whether citations can be checked;
    13. - Whether the presentation is suitable as mathematical lecture notes.

    The advantage of this prompt is that it turns “text generation” into an “auditable task.” This can significantly reduce the risk of superficial responses or fabricated content.

    4.3 Multi-Turn Prompt Strategy

    For high-difficulty propositions, the task can be divided into multiple turns:

    1. Turn 1: Ask the model to restate the proposition and outline a proof plan.
    2. Turn 2: Ask the model to expand only the first lemma.
    3. Turn 3: Add subsequent proof steps gradually.
    4. Turn 4: Ask the model to perform a self-check.
    5. Turn 5: Ask the model to organize the result into a complete lecture-note format.

    Step-by-step prompting is more controllable than asking for a complete long-form answer at once. It also makes it easier to identify where errors occur.


    5. Scoring Methods: Reducing Subjective Bias with Structured Rubrics

    To avoid relying only on subjective impressions, teams should design structured scorecards. A percentage-based or weighted scoring system is recommended.

    A sample weighting scheme is:

    • Correctness: 35%
    • Completeness: 25%
    • Verifiability: 20%
    • Presentation quality: 10%
    • Cost and stability: 10%

    5.2 Pseudocode Example

    1. def evaluate_solution(result, rubric):
    2. # If the conclusion is invalid or there is severe circular reasoning, reject immediately
    3. if result.conclusion_invalid or result.has_circular_reasoning:
    4. return 0
    5. score = 0
    6. score += rubric.correctness * 0.35
    7. score += rubric.completeness * 0.25
    8. score += rubric.verifiability * 0.20
    9. score += rubric.format_quality * 0.10
    10. score += rubric.efficiency * 0.10
    11. # Deduct points when key steps are missing
    12. if result.missing_key_lemma:
    13. score -= 10
    14. # Fabricated references should trigger a major penalty or automatic rejection
    15. if result.invalid_reference:
    16. score -= 20
    17. return max(score, 0)

    The advantage of this approach is that it breaks a complex task into interpretable metrics, making cross-task comparisons easier.


    6. Model Selection and Task Routing: Matching Capability to Scenario

    In real engineering, not every task needs the highest-cost model with the longest reasoning budget. A more practical approach is to build a tiered task-routing mechanism.

    6.1 Task Classification

    Tasks can be divided into three categories:

    1. High-value, high-risk tasks: Such as formal mathematical lecture notes, paper-assisted proofs, and complex logical derivations. These should prefer stronger solutions in correctness and stability, with human review retained.
    2. Medium tasks: Such as teaching examples, routine proof organization, and document polishing. These can use a solid general-purpose model with template-based checks.
    3. Low-complexity tasks: Such as summarization, formatting, and simple question answering. These can use lower-cost models, with emphasis on efficiency and cost control.

    6.2 Routing Pseudocode

    1. if task.difficulty == "high":
    2. model = choose_model(priority="accuracy", budget="high")
    3. require_human_review = True
    4. elif task.difficulty == "medium":
    5. model = choose_model(priority="balance", budget="medium")
    6. require_human_review = False
    7. else:
    8. model = choose_model(priority="cost", budget="low")
    9. require_human_review = False

    This routing method avoids wasting resources by using the strongest model for every task. It also gives high-value tasks more reliable quality guarantees.


    7. Quota and Cost Management: Avoiding Waste and Task Failure

    When using subscription quotas, credits, or API call limits, cost management should be integrated into the evaluation workflow. Complex mathematical proof tasks often consume significant resources. Without budget controls, teams may encounter wasted quota, task queuing, or mid-task failures.

    7.1 Common Cost Problems

    • A single task consumes too much quota, blocking other effective tasks;
    • Repeated retries after failure consume additional quota;
    • Excessively long context increases unnecessary computation;
    • Verbose model output increases post-processing cost;
    • Peak-hour queuing affects delivery timelines.

    7.2 Management Strategies

    Recommended strategies include:

    1. Task tiering: Assign high-value tasks to high-quality models and low-value tasks to lower-cost models.
    2. Cache reuse: Cache repeated propositions or similar lecture notes to avoid duplicate computation.
    3. Budget limits: Set maximum step counts, maximum output lengths, and maximum retry counts per task.
    4. Failure circuit breaker: Pause automatic retries after consecutive failures and route the task to human review.
    5. Sampling review: Retain spot checks for high-quality tasks.
    6. Cost tracking: Record resource consumption for each effective output and calculate unit-cost metrics.

    For example, a team can maintain a simple summary table:

    Task type Total calls Successful calls Average latency Average resource usage Manual rework rate
    Complex proof 20 12 High High 25%
    Document organization 50 47 Low Low 5%

    This kind of table helps teams determine whether a task type is suitable for automation and whether the model selection strategy needs adjustment.


    8. Common Pitfalls: Why Many Evaluation Conclusions Are Unreliable

    Several common mistakes can distort model evaluation for mathematical proof capability.

    8.1 Judging Only by Price, Not by Task Value

    Low price does not mean suitability for every task. For complex proofs, if the model cannot provide verifiable reasoning, a low-cost choice may create higher rework costs.

    8.2 Judging Only by Speed, Not by Correctness

    Quickly generating a text that appears complete but contains logical flaws can mislead users and increase downstream review burdens.

    8.3 Judging by One Result, Not by Stability

    A single run may be affected by randomness. Complex tasks should be tested repeatedly to confirm consistency.

    8.4 Not Checking Citation Authenticity

    Models may generate nonexistent document numbers or incorrect citations. If the evaluation does not check references, unreliable outputs may be mistaken for high-quality results.

    8.5 Ignoring Document Maintainability

    Even if a result is correct, inconsistent structure or notation can reduce practical efficiency.

    8.6 Treating the Model as the Final Authority

    Model output should be treated as auxiliary material, not as a final conclusion that requires no review. In formal mathematical writing, human review remains necessary.


    To make evaluation more engineering-ready, teams can follow this process.

    Step 1: Clarify the Task Objective

    First, determine whether the task is to generate a complete proof, help organize proof ideas, or structure existing materials. Different objectives require different evaluation standards.

    Step 2: Build a Small-Sample Test Set

    Select 10 to 30 representative tasks covering simple, medium, and difficult cases. A small sample is suitable for rapid iteration.

    Step 3: Design Prompt Templates

    Prompts should include role definition, objectives, constraints, output format, and a self-check list. Avoid overly open-ended instructions that can cause uncontrolled output.

    Step 4: Run a Small-Scale Pilot

    Record correctness, completeness, citation behavior, and resource consumption for each output. Mark the main problem types.

    Step 5: Perform Human Review and Revise the Rubric

    Experts should focus on logical flaws, citation authenticity, and boundary cases. The scoring rubric should be adjusted based on review results.

    Step 6: Expand to Formal Evaluation

    Once the process is stable, expand the task set. Add more open-ended tasks and long-form tasks to observe model performance in realistic scenarios.

    Step 7: Continue Monitoring

    After deployment, continuously track success rates, rework rates, average latency, quota consumption, and user feedback. This creates a closed-loop optimization mechanism.


    10. Conclusion: The Key Is Verifiable, Engineering-Ready Standards

    For complex mathematical proof tasks, judging whether a model is simply “smart enough” is no longer sufficient. A more scientific approach is to build an engineering-ready evaluation system that checks:

    • Whether the conclusion is correct;
    • Whether the reasoning is complete;
    • Whether citations are verifiable;
    • Whether the output is easy to maintain and reuse;
    • Whether quality is stable over time;
    • Whether costs remain manageable.

    In practice, differences between models often become most visible on difficult tasks. Simple tasks may be handled by many models, but complex proofs, long-chain reasoning, and formal document generation expose gaps in logical rigor, citation reliability, and resource efficiency.

    Therefore, teams should route tasks according to task value, reserve high-quality resources for critical work, and use prompt design, scoring rules, budget controls, and human review to reduce uncertainty.

    Ultimately, whether an LLM is suitable for complex mathematical proof scenarios should not be judged by a single generated result. It should be judged by whether the model can consistently produce high-quality content that is verifiable, traceable, and editable under controllable cost.