Evaluating Complex Instruction Following in LLMs: Practical Methods and Engineering Lessons
Complex instruction following is a critical measure of whether a large language model can fit into production workflows. Using an HTML geometry-construction task as a case study, this article examines semantic parsing, implicit constraints, procedural consistency, and output fidelity. It also explains how developers can design more realistic evaluations and use verifiable goals to assess model-generated results.
1. Why Following Instructions Can Be Harder Than Writing Code
Code generation, mathematical reasoning, and text summarization are relatively straightforward to quantify in large language model evaluations. Models can also achieve high scores on these tasks. Yet their usefulness in production often depends on a less standardized—and more demanding—question: Can they accurately interpret and execute a conversational instruction that is incomplete or contains implicit constraints?
Developers discussing recent model updates frequently highlight improvements in instruction following. This seemingly modest observation points to an important shift: from loosely interpreting a request and improvising an answer to understanding a complex set of relationships and faithfully implementing the intended result.
For large models capable of extended reasoning, this involves more than alignment alone. It requires a combination of spatial reasoning, physical constraint modeling, specialized terminology, and the interpretation of ambiguous language.
A geometry-construction task provides a useful lens for examining these capabilities and their engineering implications.
2. Evaluation Design: An Unusual Geometry Task with Interdependent Constraints
A task designed to test complex instruction following should combine three characteristics: an unfamiliar domain, a long sequence of dependencies, and implicit constraints.
The example here asks a model to create an HTML page demonstrating the construction of a regular heptagon using a two-mark ruler. The request can be paraphrased as follows:
Create an HTML page that demonstrates constructing a regular heptagon with a two-mark ruler. Begin with a square and construct the perpendicular bisector of its bottom edge. Draw circle E, centered at the bottom-right vertex E, with the square’s diagonal as its radius. Then use the two-mark ruler, keeping it in contact with the bottom-left vertex D. Move the ruler’s first mark along circle E until its second mark lies on the perpendicular bisector of the bottom edge. Continue with the usual construction steps, such as using perpendicular bisectors to determine the center of the required circle. Fill in all omitted straightedge-and-compass steps. Note that compass motion produces a point’s trajectory, but visible traces should appear only where needed. Finally, add a GIF export feature.
Several aspects make this request challenging.
Unfamiliar Terminology
A two-mark ruler is not a conventional unmarked straightedge used in elementary straightedge-and-compass construction. A model may have encountered little material describing it, particularly its geometric behavior.
The distance between its two marks is fixed. During the specified operation, the ruler must remain in contact with one vertex while one mark moves along a circle. If the model misunderstands these physical constraints, the subsequent construction will be incorrect.
Dense References to Multiple Objects
Nearly every operation involves several geometric objects at once: the square, its bottom-edge perpendicular bisector, a vertex, a circle, and the two ruler marks.
References such as “its,” “that vertex,” and “the second mark” require the model to maintain a consistent representation of object identities and relationships throughout the task.
Incomplete Natural-Language Specifications
The request does not specify the square’s side length or the spacing between the ruler marks. The intended setup assumes a unit square and unit spacing between the marks. In an implementation, the important issue is preserving that shared scale and the required geometric relationships, rather than the absolute drawing size.
The meaning of “necessary traces” is also left unspecified. The model must interpret these gaps in relation to the construction goal rather than choose arbitrary values or visual behavior.
Multiple Output Requirements
The response must deliver more than a geometric explanation. It must produce runnable HTML and Canvas code, complete the omitted construction steps, manage animation timing, and support GIF export.
These requirements test whether the model can translate a geometric procedure into an organized, executable implementation.
3. Four Layers of Understanding Behind Instruction Following
From an engineering perspective, this task involves four layers of capability. A failure at any layer can cause the final result to diverge from the request.
Layer 1: Semantic Parsing and Object Modeling
The model must extract geometric entities and their relationships from natural language, then represent them in a computable form.
For example, “draw circle E centered at the bottom-right vertex E with the diagonal as its radius” requires the model to identify E’s coordinates, determine the square’s diagonal length, and construct the corresponding circle parameters.
The central challenge is resolving informal references into specific objects.
Layer 2: Reasoning About Implicit Constraints
The square’s scale, the spacing between ruler marks, and the scope of visible construction traces all require decisions that the prompt does not fully specify.
The model must connect these decisions to the final goal: constructing a regular heptagon. It should use the goal to constrain its interpretation, rather than fill gaps arbitrarily.
This form of goal-driven completion is a higher-level aspect of instruction following. It requires distinguishing a justified assumption from an invented detail.
Layer 3: Maintaining Procedural Consistency
Geometric constructions contain strong dependencies between steps. An error in an early operation can propagate through the entire sequence.
The model must therefore maintain mathematical consistency throughout the construction. A step that looks plausible in an animation is not enough if it does not establish the relationship required by the next step.
This tests the stability of extended reasoning: each operation must remain compatible with the objects, constraints, and results already established.
Layer 4: Fidelity of the Final Output
A runnable HTML page is only part of the requirement. The visualization must also represent the intended construction accurately.
Which auxiliary lines remain visible? Which temporary marks disappear? Where should compass arcs leave traces, and where should movement remain unmarked?
These details test both interpretation and execution. The model must understand the requested visual behavior and preserve it in the final implementation.
4. Engineering Lessons for Everyday Development
The value of this example is not the heptagon itself. It is the way the task condenses challenges that routinely appear in developer requests: conversational wording, missing information, and implicit domain constraints.
Consider these examples:
- “Add a paginated query following the existing API style,” without specifying sorting fields or boundary conditions.
- “Make this animation loop, but avoid a jump between the last and first frames,” without defining the easing curve.
- “Create a chart component with export support,” without specifying an export format or resolution policy.
These requests share the same structure as the geometry task: a clear objective, an underspecified path, and implicit constraints.
A model’s effectiveness depends on whether it can infer relevant constraints from the goal, maintain object and state consistency across a long procedure, and faithfully express the intended behavior in its output.
Two practical lessons follow.
Evaluate Models Against Real Workflows
Standard coding-problem pass rates provide useful information, but they do not fully capture production readiness.
Include tasks that combine conversational instructions with implicit constraints. Observe whether the model:
- Asks for clarification when necessary.
- Completes omitted details correctly.
- Makes reasonable assumptions where appropriate.
- Avoids inventing unsupported details when the request is uncertain.
These behaviors help reveal whether a model can collaborate reliably in an actual development workflow.
Include Verifiable Anchors in Instructions
In the geometry example, “the final result must be a regular heptagon” is a strong verification anchor. It gives the model a target against which to check the consistency of intermediate steps.
Developers can apply the same principle by including explicit, verifiable goals or constraints in their requests. These anchors give the model a basis for its decisions and give the developer a basis for reviewing the result.
5. Reference Implementation Skeleton
The following simplified HTML/Canvas skeleton illustrates how to organize a construction task. It omits the detailed geometry and focuses on the step-based structure.
<!DOCTYPE html><html><head><meta charset="utf-8"><title>Geometry Construction Demo</title></head><body><canvas id="stage" width="800" height="800"></canvas><script>const ctx = document.getElementById('stage').getContext('2d');const steps = []; // Each step stores a drawing function and a trace-retention flagfunction addStep(fn, keepTrace = true) {steps.push({ fn, keepTrace });}// Example: draw a unit square and the perpendicular bisector of its bottom edgeaddStep(() => {ctx.strokeRect(300, 300, 200, 200);ctx.beginPath();ctx.moveTo(400, 300);ctx.lineTo(400, 500);ctx.stroke();});// Subsequent steps: circle, two-mark ruler constraints,// perpendicular bisectors to locate the circle center, etc.// ...// Play steps frame by frame with a trace-retention flaglet idx = 0;function play() {if (idx >= steps.length) return;const s = steps[idx++];if (s.keepTrace) s.fn();requestAnimationFrame(play);}play();</script></body></html>
The central idea is step-based modeling. Each step represents a drawing action and records whether its trace should be retained. This provides a structure for treating construction marks as individually managed units rather than as an undifferentiated collection of drawing commands.
The snippet is an organizational skeleton, not a complete implementation of the requested task. It does not include the full heptagon construction or GIF export. Its playback loop executes only steps marked for trace retention; it does not yet implement the display and removal of temporary construction marks.
The engineering signal is the abstraction itself: a model should represent the construction as an executable sequence of dependent operations, rather than simply generate a static picture that resembles the target.
6. Conclusion
Instruction following deserves separate attention because it distinguishes plausible content generation from precise delivery against complex requirements.
Unfamiliar terminology, dense object references, implicit constraints, and multiple output requirements may look like unusually demanding evaluation conditions. In practice, they are common features of real development work.
For developers, understanding how to evaluate these capabilities—and where they break down—has more lasting value than relying on a single benchmark score. A useful engineering model must turn an informal, complex request into a result that is logically consistent, operationally sound, and faithful to the intended details.
