Prompt Adherence Evaluation for LLMs: Constructing a Regular Heptagon with a Marked Ruler
This article presents a practical method for evaluating prompt adherence in large language models using a geometry construction task: building a regular heptagon with a marked ruler in an HTML page. It explains the three levels of prompt adherence, analyzes why the task combines obscure domain knowledge, dense object references, and implicit constraints, and provides a scoring checklist for judging generated HTML. It also discusses the limits of this kind of vibe-coding test and offers recommendations for developers building private evaluation sets.
How to Scientifically Evaluate LLM Prompt Adherence: A Complete Breakdown of a Geometry Construction Task
1. Why Prompt Adherence Matters More Than Benchmark Scores
Most public leaderboards for large language model capability focus on standardized dimensions such as mathematical reasoning, code correctness, and knowledge question answering. These metrics are important, but they diverge significantly from real work scenarios. In actual use, users rarely communicate with models in formal, structured language. More often, requirements are expressed in colloquial natural language that contains omissions and ambiguity.
Prompt adherence is not merely the degree to which a model “obeys.” It contains three progressive levels:
- Literal parsing capability: Can the model correctly segment the operation steps, objects, and constraints in an instruction?
- Semantic completion capability: When facing unstated implicit conditions, such as default dimensions or unit conventions, can the model infer the unique reasonable interpretation from the task goal?
- Intent restoration capability: In the final output, does the model fully implement that understanding as a correct result, rather than merely making something that “looks right”?
For large-parameter models with long chain-of-thought reasoning capability, the third level is the real dividing line. The value of long chain-of-thought is not that the thinking process is longer, but that before generating the final answer, the model can digest the complex spatial operations, physical constraints, technical terms, and fuzzy semantics described in the prompt one by one and make them internally self-consistent. If a model only “executes” the prompt without “understanding” it, logical breaks are inevitable in scenarios with multiple objects and multiple constraints.
This is the core significance of prompt adherence testing: in daily work, humans cannot always talk to models in rigorous programming language; if they did, they might as well program directly. Models must learn to capture true intent from imperfect natural language.
2. Test Case Design: Constructing a Regular Heptagon with a Marked Ruler
To construct a task that simultaneously has the triple difficulty of “obscure knowledge + high-density references + implicit constraints,” the following prompt can be used as a baseline case:
Create an HTML webpage that constructs a regular heptagon using a marked ruler. The steps are as follows: first take a square and construct the perpendicular bisector of its bottom edge; then, with the bottom-right vertex E as the center and the diagonal as the radius, draw circle E; next, using a marked ruler, keep the marked ruler flush against the bottom-left vertex D, and move the first mark of the marked ruler along circle E until the second mark passes through the perpendicular bisector of the bottom edge; after that, perform the usual operations such as constructing perpendicular bisectors to determine the center. Complete all omitted compass-and-straightedge construction steps. Note: using a compass would produce the trajectory of a moving point, but leave traces only in the necessary parts. Finally, add a feature to export the output as a GIF.
The design intent of this case can be analyzed from three dimensions.
2.1 Obscure Knowledge Dimension: The Marked Ruler
The marked ruler is a construction tool discussed in ancient Greek geometry. Classical compass-and-straightedge construction has been proven unable to complete a regular heptagon, but after introducing a marked ruler, the regular heptagon becomes constructible. Most models have a fuzzy understanding of this tool in their training corpora: either they do not understand how it is used at all, or they confuse it with an ordinary ruler.
The key point is that the construction logic of the marked ruler is not “measuring” but “sliding while keeping flush”: keep the ruler against a fixed point and rotate or slide it so that two marks on the ruler fall on two given curves or lines, thereby determining a line that satisfies a specific length relationship. This is a typical “neusis” construction. If the model does not understand this mechanism, all subsequent steps will collapse.
2.2 High-Density Multi-Object References
Consider the middle step of the prompt: “keep the marked ruler flush against the bottom-left vertex D, and move the first mark of the marked ruler along circle E until the second mark passes through the perpendicular bisector of the bottom edge.”
This single sentence involves four objects at the same time: the marked ruler (tool), vertex D (fixed constraint point), circle E (constraint curve for the first mark), and the perpendicular bisector of the bottom edge (termination condition for the second mark). The model must simultaneously maintain the spatial relationships among these four objects and understand the dynamic stop condition expressed by “until.” This kind of high-density multi-object reference is a stress test for the model’s semantic tracking capability. Any reference error for any object will misalign the entire construction process.
2.3 Implicit Constraints and Fuzzy Semantics
This prompt deliberately retains three “trap-like omissions”:
- The side length of the square is not given. On the surface, the side length is a free parameter, but combined with the final goal of “constructing a regular heptagon,” reverse inference shows that the square must use unit side length; otherwise, the subsequent proportional relationships cannot close. The model needs to complete this reverse reasoning on its own.
- The spacing between the two marks on the marked ruler is not specified. In classical construction methods, this spacing is assumed by default to be unit length and exactly equal to the side length of the square. The model needs to recognize this convention.
- The meaning of “necessary traces” is ambiguous. Compass construction theoretically produces complete trajectory circles, but standard geometric construction retains arcs only at positions actually used to determine intersections. The model needs to translate this colloquial description into “draw short arcs near intersections, not full circles.”
These three omissions are not oversights by the tester; they are the core of the test: can the model restore a unique, self-consistent interpretation from fuzzy semantics?
3. Evaluation Observations and Scoring Dimensions
After receiving the HTML generated by the model, it is recommended to check the following dimensions one by one rather than only checking whether “the page opens”:
| Dimension | What to Check | Common Failure Modes |
|---|---|---|
| Geometric correctness | Does the marked-ruler sliding process reflect the dual constraints of the two marks? | Skipping the sliding process and hard-coding the coordinates of the regular heptagon vertices |
| Process completeness | Are the omitted compass-and-straightedge steps completed, such as constructing perpendicular bisectors, determining the center, and point-by-point division? | Only drawing the final figure without the construction process |
| Trace control | Do compass traces appear only at necessary positions? | Drawing many full circles and making the page cluttered |
| Animation logic | Are construction steps presented step by step in dependency order? | All elements appear at once, with no sense of process |
| Additional requirement | Is the GIF export feature actually implemented? | Only placing a button that does nothing when clicked |
The most concerning failure mode is “bypass-style completion”: the model finds the prompt-based construction too complex and instead uses mathematical formulas to directly calculate the coordinates of the regular heptagon vertices and draw them. The surface result is correct, but the prompt is not followed at all. This is exactly the behavior that prompt adherence testing is meant to catch: the result is right, the process is wrong, and the adherence is still unacceptable.
4. What the Test Reveals About Model Capability Boundaries
It is important to recognize clearly that this type of test mainly examines the model’s “vibe coding” capability, that is, quickly generating a runnable interactive demo from a natural language description. It validates comprehension, engineering implementation, and attention to detail, but it is not equivalent to the model’s upper capability limit.
For scenarios closer to scientific research or deep engineering collaboration, namely “goal-directed programming” where the model needs to maintain complex goals over time, autonomously decompose tasks, and iterate, a single prompt adherence test can only provide indirect reference. A truly rigorous capability profile also requires comprehensive evaluation across dimensions such as multi-turn collaboration, long-context consistency, and toolchain invocation.
5. Practical Recommendations for Developers
- Build your own private test set: Public leaderboards are easy to optimize against, while private cases containing obscure knowledge and implicit constraints are more likely to expose a model’s real level.
- Prioritize testing “process adherence” over “result correctness”: Deliberately provide an unconventional solution path and observe whether the model replaces it with a “smarter” shortcut without authorization.
- Run gradient experiments between colloquial and formal language: Submit the same task using a rigorous specification document and a colloquial description, then compare the outputs. This can quickly locate the model’s semantic completion capability.
- Map evaluation results to real workflows: If your daily work relies heavily on natural language requirement communication, the weight of prompt adherence should be far higher than mathematical leaderboard scores.
Conclusion
Prompt adherence is a key capability for large models moving from “answer machines” to “work partners.” A seemingly simple geometry construction webpage task actually tests four capability lines at once: terminology understanding, spatial reasoning, implicit condition completion, and engineering implementation. When we say that a model upgrade “significantly improves prompt adherence,” its essential meaning is that the model has begun to truly understand the intent space behind natural language, rather than merely matching literal instructions. The maturity of this capability will directly determine whether natural language can become a reliable general interface between humans and machines.
