Evaluating Next-Generation Code Models Through Prompt Adherence
What does "prompt adherence" really mean for large reasoning code models? This article uses a deliberately obscure construction task—constructing a regular heptagon with a two-marked ruler—to show why instruction following, implicit constraint inference, and process integrity matter more than benchmark rankings, and how to build a rigorous evaluation framework around them.
Evaluating Next-Generation Code Models Through Prompt Adherence
In recent discussions around a new generation of high-parameter reasoning models, the metric that should matter most to engineering teams is not leaderboard position but the leap in “prompt adherence.” Adherence here does not simply mean returning code in the requested format or producing a runnable page. It means the model’s ability to reconstruct the spatial relationships, physical constraints, specialized terminology, and ambiguous semantics hidden behind natural language—in the absence of a strict formal specification—and to carry the user’s true intent stably through to the final artifact.
This is especially critical for long-chain-of-thought models: the longer the reasoning chain and the more intermediate states it passes through, the easier it is to drift from the global goal while every individual step still looks reasonable. Conversely, if a model can maintain constraint consistency in a complex drawing task, it shows that it is no longer just completing text but building a verifiable internal world model.
Why “Constructing a Regular Heptagon with a Two-Marked Ruler” Is a Good Stress Test
The original test prompt asks for a web page that performs a construction: “construct a regular heptagon using a two-marked ruler.” Start with a square and draw the perpendicular bisector of its bottom edge; with the bottom-right vertex as center and the diagonal as radius, draw a circle; then take a ruler bearing two fixed marks and keep it pressed against the bottom-left vertex, sliding it until the first mark lies on the circle and the second mark passes through the perpendicular bisector; finally, complete the standard straightedge-and-compass steps such as bisecting lines and locating centers, keep only the necessary traces, and provide the ability to export the process as an animated image.
What makes this task “obscure” is not the heptagon but the two-marked ruler. Classical straightedge-and-compass construction restricts tools to an unmarked straightedge and a compass; a two-marked ruler allows two fixed-distance marks on the ruler to simultaneously constrain two geometric objects—effectively introducing a neusis-style sliding alignment that can construct figures impossible under classical rules. The prompt also deliberately uses colloquial phrasing: it never states the square’s side length, yet by limiting the goal to a regular heptagon it implies the starting square must be a unit square. It never defines “necessary traces,” yet demands that compass arcs be kept only at key intersections. It never specifies the ruler’s mark spacing, yet expects the model to infer from the “unit length” context that the two marks are one unit apart.
Harder still is multi-object co-reference: the square’s four vertices, the perpendicular bisector, the circle’s center and radius, the ruler’s two marks, the target intersections, and the later circumcenter—nearly every step involves three or more objects at once. A model doing only local pattern matching will easily produce a page that “has a square, a circle, and a heptagon” but is geometrically invalid.
So the task does not test “can it write front-end code”; it tests the ability to compile natural language into a geometric constraint system. Everyday engineering communication works exactly this way: stakeholders rarely provide formal specifications, saying instead “keep it flush with this edge,” “don’t leave extra helper lines,” “don’t make the animation too fast,” “make it shareable at the end.” If every exchange had to be converted into a strict DSL, you might as well write the program by hand. A model’s value lies in absorbing the ambiguity and producing verifiable results.
From Prompt to Specification: Turning Vague Language into Invariants
The first step of a high-quality implementation is not writing code but establishing coordinates and invariants. Set up a unit square ABCD with D at the bottom-left (0,0), C at the bottom-right (1,0), A at the top-left (0,1), and B at the top-right (1,1). The perpendicular bisector of the bottom edge DC is x = 1/2. The prompt says to draw a circle centered at the bottom-right vertex with the diagonal as radius, so the center is E = (1,0), the radius is the square’s diagonal √2, and the circle equation is (x−1)² + y² = 2. The two-marked ruler can be abstracted as a line through the fixed point D carrying two marks M1 and M2 at a fixed distance of 1; adjust the line’s angle θ so that M1 lies on circle E and M2 lies on the line x = 1/2. Let M1 = t·u and M2 = (t−1)·u or (t+1)·u, depending on the order of the marks, with unit vector u = (cosθ, sinθ). The solution must come from solving the constraints, not from visually dragging the canvas: |M1 − E| = √2, M2x = 1/2, |M1M2| = 1, with D, M1, M2 collinear. Once the key direction is found, the circumcircle can be constructed by standard steps: erect a perpendicular bisector from an existing chord or axis of symmetry, intersect it to find the center O, then construct the seven equal division points.
The semantics of “necessary traces” deserve special emphasis here. A compass in a real construction sweeps through a continuous trajectory, but a drawing only preserves the arcs that contribute to the conclusion. If a web animation renders every trial sweep, it looks lively but violates “construction discipline.” A sound implementation should distinguish three layers: a probe layer, used only for numerical solving or drag previews, never inked; a construction layer, retaining key arcs, intersections, and bisectors; and a result layer, showing the heptagon and its circumcircle. During playback, the probe layer can fade in and out, the construction layer commits ink only after its constraints are verified, and the result layer is highlighted last. This design follows directly from the prompt’s “leave traces only where necessary,” and it is the dividing line between models that genuinely understand the constraint and those that don’t.
Implementation Path: A Deterministic Geometry Kernel with Declarative Rendering
To avoid “pixels look right, math is all wrong,” decouple the geometry kernel from rendering. The kernel should accept only primitives—points, lines, circles, marked rulers—and output objects with provenance labels, such as point M1 from constraint(circleE, ruler) or line perpBisector(DC). The rendering layer handles Canvas or vector drawing, and the export layer samples frames to produce the animation. A schematic structure:
type Primitive = Point | Line | Circle | MarkedRulertype Constraint =| On(obj: Point, target: Circle|Line)| Distance(a: Point, b: Point, value: number)| Collinear(points: Point[])| PerpendicularBisector(line: Line, segment: Segment)solve(constraints): ConstructionStep[]render(steps, policy: {keepNecessaryTrace: true})exportFrames(steps, fps, duration): AnimatedImage
The key is not the interface names but the principle: every visible object must be traceable to its constraint source. A grader can then perform deterministic verification: is the square’s side length 1; is the perpendicular bisector x = 0.5; is the circle’s radius √2; is the distance between the two ruler marks 1; does M1 lie on the circle and M2 on the bisector; are the heptagon’s vertices concyclic with adjacent arc-length error below a threshold; does the exported animation show the construction order rather than flashing the final result. Given the same prompt, different runs should produce isomorphic solutions, and any mirror or rotational differences must be explicitly normalized in the judgment.
For animation export, avoid depending on any platform-specific component and use a generic frame-capture approach: fix the canvas size and timeline, render frame by frame to an offscreen buffer, and encode into a looping frame sequence. Pay particular attention to color quantization and frame intervals: geometric lines are high-contrast thin lines, and a naive global palette can cause flickering; process background, helper lines, and result lines on separate channels, or use an intermediate vector description and rasterize afterwards. For evaluation, the animation is not decorative flair but the evidence chain that the “process is legal”: if the complete heptagon appears from the first frame, the coordinates may be correct, but the requirement to “complete the construction process” has failed.
Scoring Dimensions: From “It Runs” to “It’s Trustworthy”
A layered scoring rubric is recommended. Layer one, runnability: no script errors, interactions don’t block, export works. Layer two, geometric correctness: judge by numerical residuals rather than eyeballing, with core constraint errors controlled to the 1e-6 to 1e-9 range and adaptive thresholds accounting for floating-point error. Layer three, prompt coverage: did the model recognize the unit square, understand a two-marked ruler rather than a plain straightedge, complete the omitted bisector and center-finding steps, and distinguish necessary from redundant traces. Layer four, explainability: can key objects be hovered to reveal their provenance, can steps be replayed, and can a failure pinpoint which constraint was violated. Layer five, engineering robustness: window resizing, high-DPI pixel ratios, frame-rate degradation on low-performance devices, and memory release on repeated exports.
These dimensions separate “vibe coding” from genuine intent fulfillment. The former aims to quickly produce a demo with the right atmosphere and smooth interactions—fine for exploring UI feel. The latter demands semantic closure: even a plain interface must satisfy provable constraints. Many models look spectacular in vibe coding because tolerance is high, feedback is immediate, and aesthetic goals are vague. But in “wish coding”—wanting the model to accurately implement the rules in your head—tolerance collapses. The two-marked ruler task compresses the aesthetic space to almost nothing, forcing the model to expose its gaps in understanding: it may know an approximate heptagon construction without realizing it depends on the unit scale; it may animate the sliding ruler while letting the mark spacing drift with zoom; it may keep every trace, violating “necessary traces”; or it may fake alignment with visual snapping while M2 never actually passes through the bisector numerically.
Implications for Models and Toolchains
For model users, the takeaway is not “write a trickier prompt” but to build reusable evaluation assets. Prompts should embed implicit units, obscure terminology, multi-object references, selective traces, and export requirements; judgments should abandon screenshot aesthetics and return to coordinate residuals; reports should distinguish “runtime failure, constraint failure, semantic omission, and process fabrication.” For model designers, tasks like this expose three capability boundaries: scale inference—whether the model can infer the initial unit from the final goal; tool semantics—whether it can map words like “mark,” “flush against,” and “passes through” into distance, incidence, and collinearity constraints; and plan consistency—in long-chain reasoning, later steps must not silently alter assumptions acknowledged earlier. For engineering adoption, if such capabilities are to turn requirements into prototypes, the human-machine protocol should be a closed loop of “vague input → confirmed specification → verifiable execution → diff replay”: the model first restates the implicit conditions it understood, the user confirms units and constraints, executable results are generated, and finally a validator—not the human eye—signs off.
Ultimately, judging whether a new high-parameter model has genuinely advanced should not stop at “better at chatting” or “better at building pages.” The real test is whether it can translate imprecise natural language into uncompromising geometric facts. The heptagon is merely the vehicle; what is actually measured is the model’s joint ability to reconstruct complex spatial operations, physical constraints, specialized terminology, and ambiguous semantics. When a system can, without a formal requirements document, proactively fill in units, recognize a two-marked ruler, control construction traces, export process evidence, and submit to a numerical judge, it moves closer to the partner that everyday development actually needs: not one that makes your interface pretty, but one that reliably builds the part you didn’t say out loud but knew for certain.
