Evaluating Instruction Following in Large Language Models: Complex Spatial Reasoning in Practice
Large language models are increasingly evaluated not by parameter count alone but by how accurately they follow complex, ambiguous instructions. This article examines the core of instruction-following ability through the lens of a challenging geometric construction task—building a regular heptagon with a marked ruler (two-scale ruler). It breaks down the technical dimensions of instruction compliance, including spatial reasoning, domain-term mapping, and implicit constraint inference, and offers practical guidance for developers who want to assess and improve model reliability in real-world engineering workflows.
The Essence of Instruction Following: From Literal Execution to Intent Reconstruction
In model evaluation, “instruction following” may seem straightforward, yet it carries significant technical depth. For large models with extensive parameters and long chain-of-thought reasoning, obeying a prompt is far more than matching keywords or invoking functions. The model must parse the natural-language instruction, construct an accurate internal representation of the described environment—including spatial geometry, physical constraints, specialized terminology, and ambiguous semantics—and ultimately generate output that faithfully reflects the user’s original intent.
This capability spans several dimensions:
- Understanding spatial operations and physical constraints: The model must grasp abstract geometric concepts (e.g., perpendicular bisectors, tangency, intersection points) and physical rules (e.g., sliding a ruler while maintaining contact) and convert them into computable mathematical models or executable code logic.
- Accurate mapping of domain-specific terms: When encountering niche terminology, the model must leverage its internal knowledge to interpret correctly rather than produce plausible but meaningless text.
- Implicit inference from vague language: Natural language is inherently incomplete. A model with high instruction-following ability uses context and the ultimate goal to fill in missing constraints (such as default units of measurement) and maintains logical consistency.
A High-Difficulty Test: Constructing a Regular Heptagon with a Two-Scale Ruler
To quantify instruction-following in a demanding scenario, we designed a workflow that relies heavily on internal logical consistency. The test requires the model to generate an HTML page that animates the construction of a regular heptagon using a “two-scale ruler” (a marked ruler with two parallel edges at a fixed distance).
The core prompt includes these key instructions:
“First, take a square and construct the perpendicular bisector of its bottom edge. Then, using the lower-right vertex E as the center and the diagonal as the radius, draw a circle E. Next, use the two-scale ruler while keeping it flush against the lower-left vertex D. Slide the ruler so that the first scale mark moves along circle E, and continue until the second scale mark passes through the perpendicular bisector. From there, proceed with the standard constructions for perpendicular bisectors and centers. Fill in all omitted ruler-and-compass steps. Note: using a compass will produce a trajectory for moving points, but only leave marks where necessary. Finally, add a feature to export the result as a GIF.”
This test serves as an effective benchmark for instruction following because it imposes multiple high-level logic and semantic barriers:
1. Recognition and Handling of Uncommon Terminology
The “two-scale ruler” (or marked ruler) is a relatively obscure concept in mathematical construction. The model must not only identify it as a straightedge with two fixed-scale marks but also understand its kinematic constraints during the construction: sliding while staying in contact with a specific point, and ensuring a specific mark traces a particular path. This requires the model to simulate rigid-body motion in its reasoning chain—an extremely demanding task.
2. Dense Multi-Object Referencing and Spatial Mapping
Every step in the construction description simultaneously involves at least three geometric objects (e.g., point D, circle E, the perpendicular bisector, the scale marks). The model must precisely track the spatial relationships among these objects and translate them into front-end drawing code (e.g., coordinate calculations for Canvas or SVG). Any misinterpretation of a referent leads to a corrupted final trajectory.
3. Ambiguous Natural Language and Implicit Constraints
The prompt uses informal, imprecise language that contains many implicit constraints the model must infer:
- Unit length inference: The prompt never specifies the square’s side length, but the ultimate goal of constructing a regular heptagon implies that the square must be a unit square, and the distance between the two-scale ruler’s marks is likewise taken as the unit length. Otherwise, scaling would prevent the heptagon from closing correctly.
- Definition of “necessary marks”: The prompt asks for marks “only where necessary,” without defining what is necessary. The model must deduce that this refers to the critical paths that determine final intersections and geometric features—not continuous rendering of the entire sliding motion. This tests the model’s ability to grasp deep user intent.
Engineering Value for Developers: From Vibe Coding to Production Practice
Although the geometric test is mathematically specialized, the underlying “natural-language compliance” has direct implications for everyday development work. Current interactions between developers and large models often fall into the category of “vibe coding”—providing more or less clear instructions to generate code snippets. To move toward true “wish coding”—where a model can build complex systems from vague business descriptions—high instruction-following ability is a non-negotiable foundation.
In typical product scenarios, product managers or business stakeholders rarely communicate in precise programming syntax or structured pseudocode. When they describe requirements with domain jargon, ambiguous boundaries, and complex state transitions, a model that can accurately capture the core logic and fill in technical details dramatically reduces cross-team communication overhead and boosts development efficiency.
For enterprise deployments, such high-compliance models are often paired with general-purpose cloud compute services. For instance, on cloud platforms like Baidu AI Cloud, developers can deploy models with strong reasoning capabilities using container services, store generated front-end assets and GIF outputs in object storage, and use message queues to handle asynchronous long chain-of-thought inference tasks. This creates an end-to-end intelligent code generation and validation pipeline.
Practical Recommendations for Evaluating and Improving Model Interaction
Based on the above analysis, development teams should build richer, more realistic test suites when evaluating and adopting large models:
- Design adversarial ambiguous prompts: Deliberately omit non-essential parameters in the prompt to test the model’s ability to reverse-infer and complete logic based on the final objective.
- Introduce cross-domain term combinations: Mix terms from different fields (e.g., geometric construction with rigid-body physics) to assess the model’s breadth of knowledge and cross-domain logical mapping.
- Multi-object state tracking tests: Create scenarios with multiple dynamic entities and their mutual constraints to verify the model’s consistency in maintaining state across long text generation.
Conclusion
A large model’s instruction-following ability is not merely a measure of its command execution but a profound test of its world-model construction and logical reasoning depth. Only when a model truly understands the complex spatial operations and physical constraints implicit in natural language can it accurately reproduce user intent in its output—and thereby unlock transformative productivity in real engineering practice.
