How to Systematically Evaluate the Complex Mathematical Reasoning of Large Language Models

    Evaluating an LLM's mathematical ability requires more than checking whether the final answer is correct. Using the classic "goat grazing on grass" problem as a test case, this article explains why small parameter changes can cause non-linear jumps in problem difficulty, why models often fail on such tasks, and how to design a layered, process-oriented evaluation framework that tests geometric modeling, case analysis, critical-point identification, and result verification rather than memorized templates.

    1. The Key Question: Don’t Just Check Whether the Model Can Compute

    Evaluating an LLM’s mathematical ability cannot be based solely on whether the final answer is correct. Especially in word problems, geometry problems, and multi-step reasoning tasks, a model may arrive at the right answer by memorizing similar problem types, applying common templates, or even guessing. A more meaningful evaluation should examine several dimensions:

    1. Whether the model accurately understands the problem statement;
    2. Whether it can build a correct mathematical model;
    3. Whether it can recognize difficulty jumps caused by parameter changes;
    4. Whether it can produce continuous, verifiable derivations;
    5. Whether it can check that the answer satisfies the original conditions;
    6. Whether it retains transfer ability when the problem format changes.

    The “goat grazing on grass” problem is a classic test vehicle. Its basic version is an elementary school word problem: given the rope length, the grass area, or the reachable region, compute the area the goat can graze, or back-solve for a parameter. At this level, only basic geometry formulas and quantitative relationships are needed, so the difficulty is low.

    However, changing a single seemingly ordinary condition—such as where the goat is tethered, the shape of the fence, the distribution of obstacles, or asking for the reachable region formed when the rope wraps around boundaries—can quickly turn a simple area calculation into a composite problem. The task now requires geometric intuition plus handling arcs, tangent points, angular ranges, overlapping regions, and boundary segmentation. The difficulty grows non-linearly.

    2. Why a Single Parameter Change Can Multiply the Difficulty

    The challenge in such problems usually lies not in any individual formula, but in the changed topology of the “reachable region.”

    Suppose the goat is tethered at a fixed point with rope length (r). With no obstacles, the reachable region is simply a circle with area:

    [
    S=\pi r^2
    ]

    If the goat is tethered outside a rectangular fence, the problem is no longer just the area of a circle. The rope may wrap along the fence edges, and the reachable region becomes a composite of multiple circular sectors, rectangular strips, or arc-shaped regions. The model must then answer:

    • Can the rope wrap around a given corner?
    • How much effective length remains after wrapping around that corner?
    • Do adjacent regions overlap?
    • Is a particular arc blocked by the fence?
    • When a boundary condition holds with equality, does the region change abruptly?

    An error in any one of these judgments will push the final area away from the correct result.

    A more complex situation arises when a parameter change makes an angle no longer a constant but a quantity determined jointly by several lengths. For example, in a right triangle, an angle may satisfy:

    [
    \theta=\arccos\frac{a^2+b^2-c^2}{2ab}
    ]

    or:

    [
    \theta=\arctan\frac{y}{x}
    ]

    This means the model must first establish the geometric relationships, then use inverse trigonometric functions to express the angle, and finally substitute the angle into the sector area formula:

    [
    S_{\text{sector}}=\frac{1}{2}r^2\theta
    ]

    If degrees are used, the conversion between radians and degrees must also be handled:

    [
    \theta{\text{rad}}=\theta{\text{deg}}\cdot\frac{\pi}{180}
    ]

    Many mistakes are not arithmetic errors but mishandling of angle units, effective radii, or region boundaries.

    3. The Real Difficulty Lies in Case Analysis

    These problems usually cannot be solved with a single unified formula; they require piecewise analysis.

    3.1 When the parameter is small

    When the rope is not long enough to wrap around an obstacle or reach the next boundary, the reachable region may be only part of a circle. The model must determine which directions are blocked and compute the remaining sector or circular segment area.

    3.2 When the parameter reaches a critical value

    When the rope length exactly equals the distance to some boundary, the system is in a critical state. This state is easily overlooked, yet it is often the key to validating whether the piecewise formulas are correct.

    For example, if the rope length is (L) and the distance from the tether point to a corner is (d), then:

    • When (L<d), the goat cannot reach the corner;
    • When (L=d), the goat just touches the corner;
    • When (L>d), the goat may wrap around the corner and further expand the reachable region.

    The geometric structure in these three intervals can be entirely different.

    3.3 When the parameter is large

    When the rope is long enough, the goat may wrap around multiple boundaries. Each time it rounds a corner, the remaining rope length changes, and the subsequent reachable region depends on the previous step. The computation typically follows a recurrence:

    [
    L_{i+1}=L_i-d_i
    ]

    where (d_i) is the length consumed wrapping around the (i)-th boundary. Meanwhile, the radius, center, and angle of each new region may also change.

    At this point, the problem has fundamentally shifted from “applying a formula” to “constructing a geometric state machine”: every boundary node crossed puts the system into a new state.

    4. Why LLMs Tend to Fail on Such Problems

    4.1 Over-reliance on problem-type memory

    A model may have seen many similar problems—“goat grazing,” “rope tied to a cylinder,” “wrapping around a wall”—and directly apply a familiar answer. But changing a single parameter can invalidate the original structure.

    Typical signs of this failure mode include:

    • Not re-examining the geometric relationships;
    • Assuming all regions can be added directly;
    • Applying common area formulas by default;
    • Ignoring occlusion by boundaries;
    • Failing to verify critical conditions.

    These are problems that look superficially similar but differ structurally.

    4.2 Incomplete spatial imagination

    Word problems must be converted into spatial relationships. If the model does not clearly distinguish the tether point, obstacle boundaries, tangent points, and the reachable region, it may mistake “rope length” for “straight-line distance to the target,” or wrongly include regions blocked by obstacles.

    4.3 Insufficient case-analysis ability

    Many models prefer to produce one continuous derivation from start to finish, but these problems must be decomposed by parameter ranges. Without explicitly stating “when the rope can wrap around the corner,” a formula lacks its applicability conditions.

    4.4 Plausible-looking results without verification

    The resulting area is often a complex expression. If the model only outputs a final number without sanity checks, errors are hard to detect. For example:

    • As rope length approaches zero, does the area also approach zero?
    • As the obstacle size approaches zero, does the result degenerate to the area of a circle?
    • As rope length increases, does the reachable area increase monotonically?
    • Does the computed region exceed the theoretical envelope?
    • Are adjacent regions double-counted?

    These checks are an important basis for distinguishing “genuine reasoning” from “formal stitching.”

    5. How to Design a More Reliable LLM Evaluation

    To evaluate a model’s ability on such problems, do not test a single question; instead, build a problem set with layered variations.

    Level 1: Basic formula problems

    Cover only circle area, sector area, perimeter, and ratio relationships to test fundamental math ability.

    Level 2: Single-obstacle problems

    Add one boundary or one right-angle corner, requiring the model to identify the relationship between arcs and sectors.

    Level 3: Multi-boundary wrapping problems

    Add multiple consecutive boundaries, requiring the model to track rope-length consumption and perform multi-stage computation.

    Level 4: Parameterized problems

    Instead of fixed numbers, require the model to derive a general formula in symbols such as (a,b,L). This reduces the influence of number-guessing.

    Level 5: Counterfactual variants

    Change the tether point, boundary orientation, rope-length range, or obstacle size, and observe whether the model rebuilds the model rather than reusing the original answer.

    Level 6: Error-diagnosis problems

    Provide a derivation containing a hidden error and ask the model to locate and correct it. This tests understanding better than simply asking for an answer.

    The evaluation should also record the full reasoning process rather than comparing only final answers. Scoring dimensions can include:

    • Problem abstraction: Were all conditions extracted?
    • Modeling accuracy: Were the coordinate system and boundary relationships set up correctly?
    • Case-analysis completeness: Were key parameter intervals covered?
    • Verifiability of derivation: Is every step justified?
    • Computational correctness: Are formulas and arithmetic correct?
    • Boundary checking: Were special cases verified?
    • Clarity of expression: Are conclusions stated with their applicability conditions?

    6. How to Reduce the Interference of Overfitting on Evaluation Results

    To prevent models from answering purely from training memory, problem design can adopt the following methods:

    1. Change the numbers while preserving the geometric structure;
    2. Change the figure’s orientation, e.g., rotation or mirroring;
    3. Rephrase the narrative to avoid common question-bank phrasing;
    4. Use symbolic parameters and require a general derivation;
    5. Add a condition that changes the topology;
    6. Ask the model to explain why a particular formula applies;
    7. Design multiple close variants and check answer stability;
    8. Use unseen composite structures rather than simply substituting numbers.

    In particular, a single correct answer does not prove stable capability. A more reasonable approach is multi-round sampling, comparing the consistency of results under different phrasings, parameters, and prompts.

    If a model can only complete the task after explicit prompts like “please analyze case by case,” “please sketch the coordinate relationships,” or “please check the boundary conditions,” it may have some reasoning potential but limited autonomous planning. Conversely, if a model proactively identifies critical turning points, lists piecewise conditions, and verifies its results, its mathematical reasoning quality is generally higher.

    7. Implications for Practical Applications

    Complex math problems are just a microcosm of LLM reasoning ability. In engineering development, data analysis, algorithm design, and enterprise decision-making, there are likewise many problems that are “simple on the surface, complex at the boundaries.”

    Therefore, when using models in practice, don’t only ask “what is the answer”—also require the model to provide:

    • Problem assumptions;
    • Definitions of intermediate variables;
    • Case-analysis conditions;
    • Sources of key formulas;
    • Result ranges;
    • Edge cases;
    • Independent verification methods.

    For high-risk tasks, a combined workflow of “model generation, programmatic verification, human review” can be adopted. For example, let the model build the mathematical model, then validate the formulas with scripts or computation programs; or have two independent reasoning processes solve the problem separately and compare the differences.

    In enterprise scenarios, when deploying models through general-purpose AI services such as Baidu AI Cloud, it is also advisable to combine logging, version management, evaluation-set maintenance, and result tracking to establish a continuous evaluation mechanism. The focus is not on achieving the highest score on a single test, but on confirming that the model remains stable and reliable under input variations, boundary-condition changes, and task transfer.

    8. Conclusion

    The value of “goat grazing” type problems lies not in how novel they are, but in how clearly they expose several core difficulties in LLM reasoning: geometric modeling, case analysis, critical-point identification, complex formula derivation, and result verification.

    When evaluating a model, the final answer is only an outcome metric and cannot replace process analysis. What truly matters is whether the model can abstract structure from natural language, recognize geometric changes caused by parameter shifts, complete derivations without ready-made templates, and proactively detect and correct its own errors.

    Therefore, a professional evaluation of such models should upgrade from “did it answer correctly?” to “why did it answer correctly, is it stable, can it transfer, and does it withstand verification?” This methodology applies not only to mathematical reasoning but also to broader technical scenarios such as code generation, algorithm analysis, data processing, and complex business decision-making.