Prompt-Following Evaluation for Large Language Models: A Regular Heptagon Construction Task

    This article presents a practical method for evaluating how reliably large language models follow complex prompts. Using a geometry task that constructs a regular heptagon with a two-mark ruler, it examines semantic parsing, implicit-constraint reasoning, reference resolution, step completion, and the ability to turn geometric instructions into a runnable web application with animation and GIF export.

    Why Prompt Following Deserves Its Own Evaluation

    In everyday use, large language models often perform well on simple question answering but gradually drift from the expected result when given a long instruction containing multiple objects, implicit constraints, and ambiguous wording. This type of failure does not necessarily indicate a lack of domain knowledge. The problem may occur at any stage of the instruction-understanding and execution chain.

    A useful way to analyze this capability is to divide it into three layers:

    1. Semantic parsing: Can the model correctly identify specialized terms, such as a “two-mark ruler,” resolve references, and recover omitted information?
    2. Constraint reasoning: Can it infer conditions that are not explicitly stated but are logically required by the instruction?
    3. Result reconstruction: Can it translate the understood spatial operations and physical constraints into a final, verifiable artifact?

    Many evaluations focus primarily on the first layer—whether the model can “understand” the prompt. In practice, however, usability depends heavily on the third layer: whether the model can produce the correct result. Prompt following is therefore a key measure of the entire end-to-end chain.

    A High-Discrimination Test Case: Constructing a Regular Heptagon with a Two-Mark Ruler

    To evaluate this capability, I designed a relatively complex task. The original instruction can be summarized as follows:

    Create an HTML page that constructs a regular heptagon using a two-mark ruler. Start with a square and draw the perpendicular bisector of its bottom edge. Using the lower-right vertex E as the center and the diagonal as the radius, draw circle E. Then use the two-mark ruler by placing it against the lower-left vertex D. Move the first mark along circle E until the second mark passes through the perpendicular bisector of the bottom edge. Continue with the conventional perpendicular-bisector construction to determine the circle center and other elements. Fill in all omitted compass-and-straightedge construction steps, show only the necessary traces created by moving the compass, and finally add GIF export functionality.

    This task is highly discriminative because it combines four types of difficulty.

    1. A Specialized Tool and a Nonstandard Construction Method

    A two-mark ruler—also described as a marked or graduated ruler, and associated with neusis-style constructions—is an extension of classical straightedge-and-compass geometry. Most models do not have a direct, reliable memory of its geometric properties. They must infer the tool’s operational meaning from the description in the prompt.

    2. Dense References to Multiple Objects

    Nearly every step involves at least three geometric objects, including the square, its vertices, a perpendicular bisector, a circle, two ruler marks, and intersection points. A single reference-resolution error can propagate through the entire construction and invalidate the final diagram.

    3. Informal and Underspecified Natural Language

    The instruction does not specify the side length of the square or the distance between the two marks on the ruler. The model must infer that, because the target is a regular heptagon, the square should be treated as having unit side length and the distance between the marks should also be interpreted as one unit. Otherwise, the stated geometric relationships are not self-consistent.

    4. Engineering Constraints on the Output

    The task is not limited to geometric reasoning. The result must be presented as a web page, omitted construction steps must be completed, the display logic must distinguish necessary traces from irrelevant movement paths, and GIF export must be supported. In effect, the task combines geometry, instruction following, and front-end implementation.

    What This Type of Test Actually Measures

    In practical communication, people do not always express requirements in precise formal language. Real-world requests are often conversational, incomplete, and dependent on contextual assumptions. A model that works only with fully structured and unambiguous prompts has limited practical value.

    For this test case, the model must complete the following reasoning chain:

    • Interpret the operation of the two-mark ruler: One mark rests at the fixed point D while the other moves along the circle, creating the required intersection.
    • Infer hidden unit constraints: Use the goal of constructing a regular heptagon to infer the intended side length of the square and the spacing between the ruler marks.
    • Understand “necessary traces”: Distinguish intermediate construction paths from final geometric elements and present them appropriately in the animation.
    • Complete omitted steps: The prompt provides only the critical turning points. The model must add standard operations, such as drawing perpendicular bisectors and connecting points, based on conventional construction practice.
    • Deliver an executable implementation: Translate the geometric process into Canvas or SVG drawing operations, animation steps, and GIF encoding and export.

    If any link in this chain fails, the resulting page may be incorrect. This makes the task an end-to-end stress test rather than a single-point knowledge question.

    A Reusable Methodology for Evaluating Prompt Following

    The following principles can be used to evaluate how reliably a model follows complex prompts.

    1. Design Instructions with Implicit Constraints

    Deliberately omit parameters that can be inferred from the stated objective. Observe whether the model can complete the missing information or whether it either asks unnecessary questions or chooses arbitrary values.

    2. Include Specialized Terms

    Rare technical terminology can quickly reveal whether a model is relying on memorized information or reasoning from the context provided in the prompt.

    3. Use Dense References to Multiple Objects

    Ask the model to manipulate several entities in the same paragraph. This tests the stability of reference resolution and object tracking.

    4. Combine Reasoning with an Engineering Deliverable

    Require both logical or geometric reasoning and a runnable artifact, such as a web page, script, or chart. This makes it possible to observe how an interpretation error propagates into the final implementation.

    5. Make the Result Verifiable

    Whenever possible, define objective criteria for correctness. In this example, verification can include whether the vertices of the regular heptagon lie on the intended circle, whether adjacent side lengths are equal, and whether the animation follows the logic of the geometric construction.

    A practical scoring framework can include the following dimensions:

    • Terminology understanding: Does the model correctly explain and use the two-mark ruler?
    • Implicit-constraint inference: Does it use unit values for the square side and mark spacing as required by the construction?
    • Multi-object reference resolution: Are the identities and relationships of vertices, intersections, and circles handled correctly?
    • Step completeness: Does the model fill in omitted conventional construction steps?
    • Presentation quality: Does the animation show only necessary traces, and is the interaction smooth?
    • Additional functionality: Does GIF export work, and can the generated code run directly?

    Implications for Practical Development

    The value of this type of evaluation goes beyond determining whether a model can solve a geometry problem. It maps closely to real software-development scenarios:

    • When a product manager describes a requirement in one sentence, can the model infer reasonable defaults?
    • When a requirements document omits details, will the model silently assume incorrect parameters?
    • In a multi-module system, can the model track the identity and state of each object correctly?
    • When generating code, can it convert an ambiguous intention into a runnable and verifiable artifact?

    From an engineering perspective, strong performance on this type of test suggests that developers can use more natural language when giving instructions and reduce the cost of repeated clarification. Weak performance means that prompts should explicitly state all constraints or that the task should be divided into smaller, independently verifiable subtasks.

    It is important to note that this kind of evaluation primarily measures rapid-prototyping ability in a “vibe coding” style: using natural language to drive a model toward a one-off or demonstrative complex task. It does not fully represent a model’s ceiling in “wish coding,” where a high-level intention is expected to become a production-grade system. The latter also requires code quality, long-term maintainability, test coverage, security, and compliance considerations.

    For that reason, a single task should not be used to make absolute claims about a model’s overall capabilities.

    Conclusion

    Prompt following is one of the dividing lines between a model that can merely converse and one that can be used reliably in development work. Carefully designed tasks that combine specialized terminology, implicit constraints, dense object references, and compound output requirements—such as constructing a regular heptagon with a two-mark ruler—can expose weaknesses in semantic parsing, constraint reasoning, and result reconstruction.

    For developers, this evaluation approach provides two benefits. It offers a more objective way to compare model behavior, and it also improves prompt design. By making vague intentions explicit and converting hidden assumptions into structured constraints, teams can achieve more stable and verifiable results when working with large language models.