Evaluating LLM Prompt Adherence: A Complex Geometric Drawing Practice

    This article explores the true meaning of LLM prompt adherence by using complex geometric construction as an evaluation case. It details the challenges of natural language tasks, such as implicit parameters and spatial constraints, and provides practical methods for evaluating and improving model capabilities through structured intermediate representations and iterative verification.

    1. From “Can Answer” to “Can Follow”: The True Meaning of Prompt Adherence

    Evaluating whether a Large Language Model (LLM) “understands” a prompt goes beyond checking if it outputs the correct format. More importantly, it tests if the model can reproduce the desired execution process after comprehending the task objective, terminology, spatial constraints, and implicit parameters. For large-scale models with long chain-of-thoughts, prompt adherence is not just simple instruction matching; it is a comprehensive capability involving semantic parsing, context inference, domain knowledge retrieval, constraint satisfaction, process planning, and result self-checking.

    In daily development, humans rarely communicate with LLMs using rigorous programming languages. Requirements often appear as colloquial, omitted, or ambiguous natural language, such as “complete this flow,” “keep only necessary traces,” “process in the standard way,” or “add an export feature at the end.” Humans rely on experience to fill in the gaps, but models must identify the real constraints within fuzzy semantics. Therefore, prompt adherence tests should ideally select tasks with “clear objectives but complex processes, niche terminology but self-consistent logic, and verifiable outputs but loosely defined descriptions.” Complex geometric drawing is a quintessential scenario: it requires spatial reasoning, step fidelity, and can be verified through the final shape and intermediate traces.

    2. Evaluation Case: Driving Complex Geometric Drawing with Natural Language

    We can design a task requiring the model to generate a webpage that demonstrates the complete process of “constructing a regular heptagon using a marked ruler.” A marked ruler is a straightedge with two fixed marks; its core physical constraint is the constant distance between these two marks. The task description roughly includes: first, take a square and draw the perpendicular bisector of its base; draw a circle centered at the bottom-right vertex of the square with the diagonal as the radius; place the marked ruler against the bottom-left vertex so that the first mark slides along the circle until the second mark passes through the perpendicular bisector of the base; then, use the standard perpendicular bisector method to find the center, and fill in the omitted compass-and-straightedge steps; the compass should only leave traces where necessary; finally, add a GIF export feature.

    This description seems complete but contains significant implicit information. First, the side length of the square is not given. The model must infer that it should use a unit length; otherwise, the mark spacing, circle radius, and target heptagon cannot maintain global consistency. Second, the distance between the two marks on the ruler defaults to a unit length, though this is not explicitly stated. Third, “necessary traces” is undefined. The model must understand that compass traces should not be entirely omitted, nor should all auxiliary circles be drawn completely; only the key arcs explaining the construction process should be retained. Fourth, steps frequently use pronouns or references like “it,” “this line,” “the second mark,” and “the base’s perpendicular bisector.” The model must consistently maintain object relationships and spatial states. Fifth, the final output is not just a geometric conclusion but a runnable webpage, an animation, and a GIF export, requiring the model to simultaneously ensure content correctness and engineering deliverables.

    3. Difficulty Breakdown: Why This Task Differentiates Model Capabilities

    3.1 Niche Terminology and Domain Knowledge

    A marked ruler is not a common concept. If the model treats it as an ordinary ruler, it will ignore the core constraint of “two fixed marks.” If it only recognizes it as a “ruler” but fails to simultaneously satisfy “the first mark is on the circle” and “the second mark passes through the perpendicular bisector” during the sliding process, the subsequent construction will fail. During evaluation, observe whether the model proactively explains the term and reflects the physical constraint in the steps, rather than just generating a seemingly plausible geometric description.

    3.2 Multi-Object Reference and Spatial Relationships

    Nearly every step in this task involves at least three objects simultaneously: the square, the base’s perpendicular bisector, the bottom-right vertex, the bottom-left vertex, the circle, the two marks, the center, etc. The model must correctly resolve references and maintain object identity without drifting across long steps. Common failures include using the wrong vertex to place the ruler, setting the circle radius to the side length instead of the diagonal, and losing the “against the bottom-left vertex” constraint when sliding the marks. These errors indicate the model has not established a stable spatial state table.

    3.3 Implicit Units and Global Consistency

    The natural language description does not provide the square’s side length or the mark spacing. The model must reverse-engineer from the goal of “constructing a regular heptagon”: if values are arbitrary, subsequent geometric relationships will not guarantee consistency. Thus, it must treat the square as a unit square and the ruler’s mark spacing as a unit length. This tests global consistency reasoning, not local text matching. Models that only generate steps literally without checking parameter loops often expose contradictions in the final step.

    3.4 Fuzzy Semantics and “Necessary Traces”

    “Leaves traces only where necessary” is a typical fuzzy constraint. The model must understand that compass traces serve to assist positioning and proof—they should not draw every auxiliary circle fully, nor should they have zero traces. During evaluation, check if the final page distinguishes between auxiliary lines, key arcs, and the final shape, and if the animation reflects the causal relationship of “trace generation—condition met—proceed to next step.”

    3.5 Output Format and Verifiability

    Requiring a webpage with GIF export extends evaluation from “text correctness” to “engineering deliverability.” The model must organize page structure, drawing logic, animation timing, and export workflows. If it only provides geometric step descriptions or the page fails to run, its adherence remains at the descriptive level. Verifiability is the advantage of this task: whether the final shape approximates a regular heptagon, whether key points meet constraints, whether auxiliary traces are reasonable, and whether the export feature works can all be turned into checklist items.

    4. Evaluation Method: From Single Generation to Process Acceptance

    It is recommended to divide evaluation into two layers: “result acceptance” and “process acceptance.” Result acceptance focuses on the final shape, page runnability, and export functionality; process acceptance focuses on step order, object relationships, constraint satisfaction, and trace control. The following checklist can be established:

    • Term check: Does it clarify the difference between a marked ruler and a normal ruler, and reflect the fixed mark spacing in the steps?
    • Parameter check: Does it infer the unit square and unit mark spacing, and explain their consistency with the target shape?
    • Reference check: Do objects like vertices, circles, perpendicular bisectors, and marks remain consistent across long steps?
    • Spatial constraint check: Are conditions like placement, sliding, passing through, and center/radius gradually satisfied?
    • Process fidelity check: Are omitted compass-and-straightedge steps filled in logically and correctly?
    • Trace check: Do compass traces only appear where necessary, and are auxiliary lines distinguished from final lines?
    • Output check: Is the webpage runnable, is the animation coherent, and is the GIF export functional?
    • Self-check check: Does the model proactively point out assumptions, provide acceptance criteria, or discover potential conflicts?

    Scoring should not rely solely on a single generation. A more reasonable approach involves multiple iterations: the first round observes if the model can build a correct intermediate representation; the second round provides failure feedback to see if it can locate specific constraints; the third round asks it to supplement a self-check checklist. A model that can stably fix failure points is generally more valuable in engineering than one that outputs something that “looks correct” on the first try.

    5. Engineering Practice: Turning Natural Language Adherence into Actionable Capabilities

    5.1 Layered Prompt Design

    For complex tasks, prompts should be divided into the goal layer, input layer, constraint layer, and acceptance layer. The goal layer specifies the final deliverable; the input layer provides objects and initial conditions; the constraint layer lists inviolable physical or logical conditions; the acceptance layer provides checkable criteria. This preserves natural language expression while reducing the risk of key constraints being drowned out. For example, ask the model to output an “object table, constraint table, step table” before generating the webpage.

    5.2 Require Intermediate Representations

    Asking the model to provide a structured intermediate representation first is an effective way to reduce long-chain drift. You can require it to list geometric objects, inter-object relationships, pre- and post-conditions for each step, before moving to code generation. Pseudocode:

    1. Input: Natural language task description
    2. Output: Runnable webpage + GIF export
    3. Steps:
    4. 1. Parse objects: square, vertices, perpendicular bisector, circle, marked ruler marks
    5. 2. Infer implicit parameters: unit side length, unit mark spacing
    6. 3. Establish constraints: placement, sliding, passing through, radius, necessary traces
    7. 4. Generate step sequence, annotating pre/post-conditions for each step
    8. 5. Generate webpage and animation logic
    9. 6. Execute self-check: object consistency, constraint satisfaction, output format
    10. 7. Export GIF and provide acceptance notes

    5.3 Introduce Executable Checks

    Natural language evaluation should not rely solely on manual visual inspection. Key constraints can be converted into executable checks: is the point on the circle, does the line pass through the specified point, is the distance between the two marks constant, is the final polygon’s side/angle error within threshold, does the export button trigger. For parts that cannot be fully automated, at least require the model to output a self-check report explaining how each constraint is met.

    5.4 Establish Iterative Repair Mechanisms

    In complex tasks, first-generation failure is the norm. Engineering-wise, failure feedback should be specific, e.g., “the second mark does not pass through the base’s perpendicular bisector,” “too many compass traces,” “square side length not unified with mark spacing,” rather than a vague “the result is wrong.” The model’s ability to repair based on specific constraints is a crucial indicator of prompt adherence.

    5.5 Clarify Human-Machine Collaboration Boundaries

    Ambiguities in natural language cannot be entirely guessed by the model. High-quality practices should require the model to explicitly list assumptions when key uncertainties arise, or request clarification; when inferences are possible, provide the basis. This maintains natural language efficiency while preventing the model from making silent, incorrect assumptions. For enterprise applications, complex tasks can be split into multiple stages—“parsing, planning, generating, verifying, exporting”—with acceptance points at each stage, thereby turning prompt adherence into a manageable delivery process.

    6. Conclusion

    The essence of prompt adherence is whether the model can reconstruct true intent from imprecise natural language expressions and continuously satisfy constraints throughout a long process. The complex geometric drawing task is valuable because it covers niche terminology, implicit parameters, multi-object spatial relationships, fuzzy semantics, and engineering output formats. When evaluating such capabilities, reduce reliance on a single “looks correct” attempt, and increase process acceptance, constraint checking, and iterative repair observation. For developers and enterprise users, a clear set of evaluation dimensions and engineering practices better reflects a model’s reliability and usable boundaries in real-world scenarios than a single demo.