Evaluating LLM Instruction Following in Complex Geometric Construction Tasks

    A regular-heptagon construction task using a two-mark ruler illustrates how to evaluate whether large language models preserve user intent under complex constraints. This article examines task design, common failure modes, validation checkpoints, and engineering practices for turning instruction-following assessments into reproducible tests.

    Evaluating LLM Instruction Following in Complex Geometric Construction Tasks

    When evaluating a large-parameter model capable of extended reasoning, parameter count, benchmark scores, and generation speed all matter. Yet its practical usefulness in engineering often depends on instruction following.

    Instruction following means more than producing the requested format or repeating keywords. It requires the model to understand user intent under complex constraints and carry spatial operations, physical limitations, technical terminology, and ambiguous language through to the final artifact. This is particularly important for natural-language-driven programming, automated script generation, and visualization.

    This article uses a task involving the construction of a regular heptagon with a two-mark ruler to explain how to design an instruction-following evaluation, analyze failures, and translate the findings into practical engineering workflows.

    1. Why Instruction Following Matters for Extended-Reasoning Models

    Extended-reasoning models can break complex problems into multiple steps, but strong reasoning does not necessarily mean accurate execution of user intent. A common failure is that a model appears to understand the task but loses constraints along the way.

    For example, a request to retain only necessary construction traces may produce numerous auxiliary lines. A requirement for the ruler’s second mark to lie on a perpendicular bisector may be reduced to an ordinary line operation. A request for an interactive web page may yield only a static written explanation.

    These are not merely formatting errors: they are failures to preserve intent. For developers, reliable adherence to complex instructions directly affects three things:

    • Whether generated artifacts can be executed and verified.
    • Whether debugging costs remain manageable.
    • Whether the model can be integrated into an automated pipeline.

    Instruction following should therefore be a core evaluation dimension, not a secondary metric.

    2. Evaluation Task: Constructing a Regular Heptagon with a Two-Mark Ruler

    The task asks the model to generate an HTML page that demonstrates constructing a regular heptagon using a ruler with two marked positions. The main steps are:

    1. Start with a square and construct the perpendicular bisector of its bottom side.
    2. Draw a circle centered at the square’s bottom-right vertex, using the square’s diagonal as the radius.
    3. Position the two-mark ruler against the bottom-left vertex. Move its first mark along the circle until its second mark lies on the perpendicular bisector of the bottom side.
    4. Use conventional straightedge-and-compass operations to locate the center of the heptagon’s circumcircle and complete the regular heptagon.
    5. Show the previously omitted construction steps and add GIF export.

    Although this appears to be a geometry task, it is also a dense constraint test. It evaluates understanding of an unfamiliar tool, object references, ambiguous language, spatial invariants, and output requirements.

    The prompt does not specify the square’s side length, so the model is expected to infer a unit square. It does not specify the distance between the ruler’s two marks, so the expected assumption is a unit distance. Nor does it formally define “necessary traces”: the model must distinguish auxiliary construction lines from the final figure.

    Successful output depends on handling these implicit constraints, not just reproducing the visible sequence of steps.

    3. What the Task Actually Tests

    Understanding an Unfamiliar Tool

    A two-mark ruler is not an ordinary straightedge-and-compass tool. The model must interpret “move the first mark along the circle” and “place the second mark on the perpendicular bisector” as geometric constraints, rather than simplifying them into ordinary line or compass operations.

    Resolving References Across Multiple Objects

    Each step involves several objects: the square, its bottom side, the perpendicular bisector, vertices, a diagonal, a circle, and the marked ruler. An incorrect reference can cause cascading errors in subsequent steps.

    Interpreting Ambiguous Instructions

    Phrases such as “necessary traces,” “conventional operations,” and “omitted steps” are not formal specifications. The model must work backward from the intended result to determine which steps need to be visible and which construction traces should be hidden.

    Producing an Executable Artifact

    The task requires more than a description of the construction. It calls for a runnable web page and animated output. The model must translate geometric logic into a state machine, a rendering loop, and an export workflow.

    4. Evaluation Metrics and Record Keeping

    The evaluation can be organized into five layers:

    1. Constraint coverage: Check whether explicit and implicit constraints are addressed.
    2. Object-reference accuracy: Verify that each step consistently refers to the correct geometric objects.
    3. Preservation of geometric invariants: Check that the relationships defining the square, circle, perpendicular bisector, and regular heptagon hold.
    4. Artifact executability: Confirm that the page runs and the animation can be exported.
    5. Failure explainability: Record where the model loses or misinterprets a constraint.

    The following validator skeleton illustrates how checkpoints can be recorded:

    1. <canvas id="stage"></canvas>
    2. <script>
    3. // Illustrative only: state machine and checkpoints, with no specific third-party library dependency
    4. const checkpoints = [
    5. { id: "unit-square", check: s => s.square?.side === 1 },
    6. { id: "perp-bisector", check: s => s.hasPerpBisector },
    7. { id: "circle-E", check: s => s.circleE?.radius === s.square.diagonal },
    8. { id: "marked-ruler", check: s => s.ruler?.firstTickOnCircle && s.ruler?.secondTickOnBisector },
    9. { id: "regular-heptagon", check: s => s.heptagon?.isRegular }
    10. ];
    11. </script>

    Evaluation records should include the original prompt, model output, screenshots of the running artifact, failed checkpoints, and the number of repair iterations. Reproducible records are essential for distinguishing an occasionally correct result from reliable instruction following.

    5. Practical Engineering Recommendations

    Developers should avoid handing an entire complex task to the model in a single generation step. A more reliable approach is to request an intermediate representation first, such as an object list, a constraint list, and a step-by-step state machine. Code can then be generated in stages and checked against a validator.

    Ambiguous requirements should be made explicit in the prompt. For this task, that means specifying unit lengths, which construction traces should remain visible, and the required export format.

    For extended-reasoning models, request constraint checks after critical steps rather than relying only on a final summary. The goal is to verify that the constraints still hold as the artifact develops.

    6. Interpreting the Evaluation Results

    If a model consistently produces executable artifacts from the same natural-language constraints and satisfies multiple checkpoints, its instruction following has moved beyond format compliance toward preserving user intent. This capability has direct value for natural-language-driven programming, low-code generation, geometry visualization for teaching, and automated testing.

    If the model repeatedly fails on object references or ambiguous language, its extended reasoning is not reliably maintaining the task’s constraints. Structured prompts, intermediate representations, and validators remain necessary to close that gap.

    Ultimately, evaluating a model for complex engineering work requires more than checking whether it produces a polished answer. The key question is whether it can reliably preserve user intent when instructions contain dense constraints, ambiguous semantics, and complex object relationships. Instruction following is the bridge between model capability and practical production use.