Evaluating and Practicing the Mathematical Reasoning of Large Language Models

    This article explains how to evaluate the mathematical reasoning ability of large language models through task-based assessment rather than subjective rankings. It breaks down open-ended proof tasks into observable scoring dimensions, provides a structured prompt template for producing academic lecture notes, and discusses context and cost management for long-chain reasoning. It also covers fair cross-model comparison methods, a production pipeline architecture, and common pitfalls with improvement suggestions.

    1. Background: From Model Benchmarks to Task-Based Capability Assessment

    In engineering practice, discussions about the mathematical ability of large language models often stay at the level of subjective rankings and lack a reproducible evaluation standard. A more reliable approach is to return to a concrete task: given a mathematical proposition not covered by existing material, require the model to complete the proof on its own and output it in the form of structured academic lecture notes. This type of task simultaneously tests knowledge retrieval, symbolic reasoning, long-context consistency, formatting compliance, and self-verification, making it a good touchstone for assessing a model’s overall capability.

    It is important to emphasize that evaluation conclusions depend heavily on task design and prompt quality. The same model can perform very differently under two prompts: “help me prove this conclusion” versus “provide a complete proof, annotate the lemmas used, boundary conditions, and the process of excluding counterexamples, and output it in academic lecture note format.” Therefore, the first step of evaluation is not to compare models, but to define the task clearly.

    2. Capability Breakdown: What a Mathematical Reasoning Task Actually Tests

    Breaking an open-ended mathematical proof task into several observable dimensions is the prerequisite for building a scorecard:

    • Problem understanding: Can it accurately identify the hypotheses and conclusion of the proposition and fill in implicit premises?
    • Strategy selection: Does it provide an executable proof route rather than jumping straight to the conclusion?
    • Symbolic and deductive rigor: Is every step justified, and are there circular arguments or skipped steps?
    • Boundary and special case handling: Does it discuss degenerate cases, extreme parameters, and counterexamples?
    • Long-chain consistency: In a long output, are notation, variables, and assumptions consistent throughout?
    • Expression and formatting: Can it stably output formulas and section structure that conform to academic standards?
    • Self-critique ability: Does it proactively point out weak points or unfinished parts of the proof?

    These dimensions can be quantified as scoring items from 1 to 5, combined with a veto item for “whether a fatal logical error exists,” forming a reusable scorecard.

    3. Prompt Engineering: Getting Stable, Usable Lecture Notes from the Model

    High-quality output depends on structured prompts. A practical template is as follows:

    1. Role: You are a math writing and proof assistant.
    2. Task: Prove the following proposition and output lecture notes in English.
    3. Constraints:
    4. 1. First give an overview of the proof strategy, then expand into details;
    5. 2. Annotate the basis for each step (definition/lemma/known theorem);
    6. 3. Explicitly discuss boundary cases and failure cases;
    7. 4. If a part cannot be completed rigorously, clearly mark it as to be supplemented;
    8. 5. Output lecture notes with section headings, and use standard math typesetting for formulas.
    9. Proposition to prove: <paste the proposition here>

    Key practices include: feeding long material in segments and maintaining a “list of assumptions and notation”; requiring the model to self-check at the end and list unresolved issues; and requiring two independent derivations for key steps to cross-verify.

    4. Context and Cost Management: Real Constraints of Long-Chain Reasoning

    Open-ended proofs often produce very long chains of thought and output, which directly brings two types of cost: queue waiting and quota consumption. In engineering, optimization can proceed from the following directions:

    1. Tiered calls: First use a lightweight model for problem clarification and outlining, then use a strong reasoning model to complete the core proof.
    2. Segmented settlement: Break the task into multiple small tasks such as “strategy—lemmas—main proof—lecture note formatting,” making it easier to reuse intermediate results.
    3. Caching and reuse: Cache fixed background material and notation tables to reduce repeated input.
    4. Quota governance: Set quotas and priority queues for the team to avoid individual long tasks blocking overall throughput.
    5. Asynchronous processing: Put long tasks into a message queue, and let the frontend obtain results by querying task status, improving the experience.

    Illustrative task orchestration logic:

    1. def solve(problem, notes):
    2. outline = light_model.chat(f"Provide a proof outline: {problem}\nBackground: {notes}")
    3. lemmas = strong_model.chat(f"Complete the lemmas and proof: {outline}")
    4. draft = strong_model.chat(f"Integrate in lecture note format: {lemmas}")
    5. return verifier.check(draft) or human_review(draft)

    5. Comparison Methodology: How to Fairly Evaluate Different Models

    If you need to compare multiple models on the same task, variables should be fixed: the same prompt, the same temperature parameter, the same context budget, averaging over multiple samples, and recording elapsed time and failure rate. Scoring is recommended to adopt a dual-track system of “automated verification + manual spot checks”: the automated side checks formula structural completeness, section completeness, and notation consistency; the manual side focuses on logical gaps and mathematical correctness. In the end, present each dimension’s score with a radar chart rather than a single total score, to avoid masking weaknesses.

    6. Production Architecture: Integrating Capability into the Workflow

    In an enterprise environment, the above process can be consolidated into a pipeline: the task ingestion layer is responsible for cleaning and structuring input; the orchestration layer is responsible for task splitting and model routing; the execution layer connects to model services; the verification layer performs symbolic checks and rule validation; and the archiving layer writes lecture notes and intermediate artifacts into object storage, while logging services and monitoring alerts track success rate, latency, and quota consumption. For high-value conclusions, a manual review step is retained, forming a closed loop of “machine first draft + expert final review.”

    7. Common Pitfalls and Improvement Suggestions

    • Only looking at the final answer: Ignoring the rigor of the process can easily overestimate model capability.
    • Overly casual prompts: This leads to chaotic output structure that is hard to evaluate.
    • Ignoring cost structure: Long tasks queue up during peak periods, and both experience and output decline.
    • Lacking a verification step: Using generated results directly as conclusions carries high risk.
    • One-shot long output: This makes it hard to locate errors; it is recommended to generate and confirm in segments.

    In summary, evaluating a model’s mathematical ability should return to the task itself: only with rigorous prompt design, clear scoring dimensions, controllable cost strategies, and a reliable verification process can reproducible, comparable, and deployable conclusions be obtained.