Constructing a Regular Heptagon with a Marked Ruler: A Practical Test for LLM Instruction Following
This article explores how a classic geometric construction problem—drawing a regular heptagon with a marked ruler—can serve as a rigorous evaluation method for large language models. It details the rationale behind using geometry problems for testing, outlines key principles for task design, and proposes a multi-dimensional framework that separates outcome correctness from procedural compliance. The article also covers engineering observations such as latency and interruptions, and provides a reproducible testing workflow for reliable model assessment.
Why Geometry Construction Problems Are Effective for LLM Testing
Standard model evaluations often rely on basic Q&A or generic algorithmic tasks, which fail to adequately assess a model’s ability to follow long, multi-step instructions. Geometry construction problems offer three distinct advantages:
- The steps are strictly sequential, with each one building on the previous.
- The output of each step can be verified.
- The final correctness of the result is visually obvious.
A marked ruler is a straightedge with two scale marks. Unlike traditional compass-and-straightedge methods, it permits a “sliding until a condition is met” operation. The task requires the model to execute a prescribed sequence of steps without skipping any based on prior knowledge.
The regular heptagon is a classic challenge. It cannot be constructed exactly with a compass and unmarked straightedge alone, but it becomes possible with a marked ruler. Therefore, the difficulty of this task lies not in drawing a seven-sided figure, but in whether the model follows the specified construction method precisely.
Three Key Principles for Designing the Task
1. Explicit Step Delineation
The construction process must be broken down into numbered steps. Each step should clearly define its starting point, underlying principle, and termination condition. For example, “construct a square and draw the perpendicular bisector of its base” must be completed before any subsequent steps. Omission of any step invalidates the final result, effectively exposing a model’s tendency to skip procedural details.
2. Clear Definition of Allowed Operations and Construction Marks
The problem statement must specify which operations are permitted, which intermediate marks must be preserved, and which can be omitted. For instance, a requirement like “retain marks only in necessary places” brings the readability of the output into the scope of evaluation.
3. Verifiable Output Format
The task should require an interactive page or animation, allowing frame-by-frame inspection of the geometric points’ trajectories. If the task also demands an exported animated image, it additionally tests the model’s ability to handle file output.
Evaluation Dimensions: Process and Outcome Assessed Separately
Judging solely by whether the final figure resembles a regular heptagon is too lenient a standard. A model could bypass the prescribed method entirely, using trigonometric functions to compute vertex coordinates and plotting them directly. While the drawn figure may appear correct, the process would have deviated from the task requirements.
Four dimensions are recommended for a comprehensive evaluation:
| Dimension | Check Item |
|---|---|
| Outcome | Whether the final figure is a regular heptagon within acceptable error margins |
| Process | Whether the code structure or comments correspond to each step specified in the task |
| Completeness | Whether standard construction steps omitted from the problem statement have been filled in |
| Fidelity | Whether any extra steps or shortcuts not requested by the task have been added |
A case where “the outcome is correct but the process deviates” should be marked as a failure. This indicates the model did not understand the instructions but instead assembled an answer through alternative means.
A checklist can support manual review:
Step Checklist[ ] 1. Construct a square and label its vertices[ ] 2. Draw the perpendicular bisector of the base[ ] 3. Using the specified vertex as center, draw a circle with the diagonal as radius[ ] 4. Align the marked ruler with the specified vertex, and slide until the second mark passes through the perpendicular bisector[ ] 5. Use standard compass-and-straightedge methods to determine the center and complete the heptagon[ ] 6. No superfluous steps; construction marks retained only where necessary[ ] 7. Support exporting an animated image
Engineering Observations: Latency and Interruptions Are Also Metrics
The testing process can also reveal experience-level issues that directly affect practical usage.
- Time to First Token and Output Continuity: Whether the thinking phase produces continuous output and whether pauses are frequent.
- Output Absent After Thinking: The model finishes its reasoning process but fails to provide a final answer. Timeouts and retry mechanisms should be in place at the API layer, and the occurrence frequency should be logged.
- Total Duration: Complex tasks may take significantly longer than simple Q&A. Batch testing should budget time and resources based on task complexity.
It is recommended to save a standardized log for each test run:
Model version:Task ID:Time to first token (seconds):Total duration (minutes):Output absent after thinking: Yes / NoProcess compliance: Yes / NoOutcome correctness: Yes / NoRemarks:
Organizing a Reproducible Testing Workflow
- Fix the prompt version, system instructions, and sampling parameters to ensure identical input across all models.
- Run each model on the same task multiple times and calculate a pass rate rather than relying on a single result.
- Record process and outcome metrics in separate tables to avoid logging only a “looks correct” conclusion.
- Use a control group with the same prompts, run in the same execution environment.
- Conclusions must state the number of samples, task conditions, and test date. Do not extrapolate a single task result to a model’s overall capability.
Conclusion
A single demanding task is suitable as a probe to identify a model’s weaknesses in long-instruction execution. However, drawing reliable conclusions for model selection requires a battery of tasks covering various task types, with concurrent logging of process compliance, outcome correctness, and runtime behavior. Only when these three categories of data are analyzed together do the test results become meaningful for decision-making.
