How to Evaluate LLM Mathematical Reasoning: Metrics, Chain-of-Thought, and Implementation Practices

    While large language models have matured in tasks like code generation and text understanding, mathematical reasoning remains a challenge, especially for open-ended problems. Evaluating a model based solely on a leaderboard score is often insufficient during selection or validation. This article provides an actionable evaluation framework covering metric definitions, test set tiering, chain-of-thought (CoT) length assessment, version comparison methods, and enterprise implementation workflows.

    Large language models (LLMs) have achieved significant maturity in tasks such as code generation and text understanding, but mathematical reasoning remains a persistent challenge, particularly for open-ended problems without fixed solutions. When selecting or validating a model, relying solely on a leaderboard score is often insufficient. This article outlines an actionable evaluation methodology, including metric definitions, test set tiering, chain-of-thought (CoT) length assessment, version comparison methods, and enterprise engineering workflows.

    1. Define Evaluation Metrics First

    Before evaluating mathematical capabilities, it is essential to clarify what you are measuring. Looking only at whether the final answer is correct will mask many underlying issues. The table below lists six commonly used metrics.

    Metric Meaning Measurement Method Considerations
    Final Answer Accuracy The proportion of answers matching the standard answer Tolerance comparison for numerical problems; simplified comparison for algebra Do not use exact string matching, as the same answer can have multiple formats
    Step Accuracy The proportion of problems where every intermediate derivation step is valid Manual annotation, or programmatic verification for checkable steps High annotation cost; sampling is recommended
    Answer Stability The proportion of consistent answers after multiple samplings of the same question Fixed prompt, sample 5 to 10 times Results fluctuate heavily at high temperatures; sampling parameters must be recorded
    Average Token Consumption Total input and output tokens per question Extracted from the usage field in the API response Needs to be statistically grouped by question difficulty
    End-to-End Latency Time from request submission to receiving the final answer Record time to first token and total duration Results may vary between peak and off-peak hours
    Manual Review Pass Rate The proportion of answers deemed directly usable by experts Scored based on unified scoring rubrics Requires checking inter-rater consistency

    These metrics must be evaluated together. A slight improvement in accuracy at the cost of doubled token consumption is rarely cost-effective for most business applications.

    2. Divide the Test Set into Three Categories

    A single test set cannot represent a model’s full capabilities. It is recommended to divide the test set into three tiers based on task type:

    • Standard Calculation Problems: Problems with clear solution methods, such as middle school word problems and basic algebraic operations. These are used to verify the reliability of basic calculations.
    • Competition-style Derivation Problems: Problems requiring multi-step derivation, construction, or proof, commonly found in public math competition datasets. These are used to compare multi-step reasoning capabilities.
    • Open-ended Modeling Problems: Problems presenting real-world scenarios where the model must choose its own method and reach a conclusion. Results are judged by experts based on scoring rubrics.

    Test conditions must be fixed and documented, including prompt templates, temperature or sampling parameters, random seeds, maximum output length, whether code execution tools are allowed, and context length. Results obtained under different conditions cannot be directly compared.

    Additionally, data contamination must be prevented. If test questions are sourced from public datasets, the model may have already seen the original or rewritten versions during training. It is recommended to retain a portion of unpublished new questions in each test set and rotate them regularly.

    3. Assess Chain-of-Thought Length Measurably

    A longer chain-of-thought does not necessarily mean better reasoning. When assessing CoT, focus on the following four data points:

    1. Relationship between accuracy and length: Create a scatter plot mapping the CoT token count against correctness for each question, and observe the inflection point where accuracy stops improving as length increases. Beyond this point, additional steps are likely redundant.
    2. Backtracking and repetition: Track whether the model explicitly abandons a path and switches to a new method. If the same intermediate result repeatedly appears in the output, it usually indicates the model is stuck in an inefficient loop.
    3. Redundancy rate: Measure the proportion of intermediate conclusions that are not referenced in subsequent steps. A higher rate indicates more useless content in the output.
    4. Cost per correct answer: Calculate total token consumption divided by the number of correct answers. This metric directly compares the economic efficiency of two models or configurations.

    In practice, you can allocate compute budgets based on question difficulty. Limit the maximum output length for simple questions and increase the budget for difficult ones. Budget thresholds should be determined by your team based on business costs and fault tolerance requirements; there is no universal standard value.

    Process Reward Models (PRM) and Monte Carlo Tree Search (MCTS), commonly seen in research, can improve the quality of intermediate steps. However, during model selection, you should verify whether the vendor publishes process-level evaluation results or if you can reproduce them on your own test set, rather than just relying on the name of the mechanism.

    4. How to Read Data When Comparing Versions

    Different versions within the same model family can exhibit significant performance differences, or differences that only manifest in certain question types. The version number alone does not indicate capability. When comparing versions, it is recommended to document the following fields:

    Field Description
    Model Name and Version Exact version identifier returned by the API
    Release or Test Date API behavior may change over time
    Post-training Methods Whether the vendor discloses the use of reinforcement learning or process rewards
    Test Set and Sampling Settings Must remain identical to other versions
    Accuracy and Confidence Interval Intervals are wide with small sample sizes; do not look at a single value
    Token Consumption and Latency Should be compared alongside accuracy

    Only compare results obtained under the same test set, prompt, and sampling settings. Discrepancies between vendor-published numbers and third-party reproductions are common; therefore, you should ultimately rely on your own testing results.