Evaluating Prompt Instruction Following in Large Language Models: Methods and Metrics

    This article breaks down how to evaluate prompt instruction following in large language models, moving beyond answer accuracy toward how faithfully a model reconstructs user intent from ambiguous natural language. It covers design principles for high-discrimination test cases, a worked example based on an obscure geometric construction task, a five-dimension scoring model with automated checks, a regression-oriented evaluation pipeline, and common failure modes with practical improvements. Readers will learn how to turn subjective impressions of instruction following into reproducible engineering metrics.

    1. Why Instruction Following Has Become a Key Metric

    As parameter counts keep growing and chain-of-thought traces get longer, “can the model answer a single question correctly” is no longer the scarcest capability. What really determines whether a model can enter a production workflow is whether it can take a piece of colloquial, imprecise natural language—full of omissions and default assumptions—and reliably turn it into a result that matches the user’s true intent. This is the core meaning of instruction following: not repeating the instruction back, but faithfully reconstructing intent in the final artifact after understanding spatial operations, physical constraints, technical terminology, and fuzzy semantics.

    For developers and enterprise users, the value of this capability is direct. In everyday collaboration, humans cannot always communicate with a model in strictly formalized language; if you first had to write requirements as compilable pseudocode, you might as well just write the code. So the focus of evaluation should shift from “knowledge Q&A accuracy” to “how faithfully natural language is turned into an executable artifact.”

    2. Design Principles: Building High-Discrimination Test Cases

    A high-quality instruction-following test case usually needs to combine four types of challenges at once:

    • Obscure terminology: the model cannot hit it from memory and must rely on contextual reasoning;
    • High-density, multi-object references: a single step involves three or more objects at once, testing reference resolution;
    • Ambiguity and omission: side lengths, spacing, and target constraints are not stated explicitly, so the model must fill them in, and the fill-ins must be self-consistent;
    • Automatically verifiable artifacts: results can be judged by a program, avoiding subjective scoring.

    Based on this, you can design a typical task: describe an obscure drawing procedure in natural language, require the generation of an interactive web page, and support exporting an animation. The advantage of this kind of task is that the final answer does not depend on whether the model “knows the answer,” but on whether it truly understood the procedure.

    3. Case Breakdown: Why an Obscure Drawing Procedure Is an Excellent Test

    Consider the following requirement (illustrative description): first construct a square and draw the perpendicular bisector of its base; then, using one vertex as the center and the diagonal as the radius, draw a circle; next, use a “two-mark ruler” pressed tightly against another vertex, sliding the first mark along the circle until the second mark passes through the perpendicular bisector of the base; then add the usual perpendicular bisector and center-determination steps, and finally construct a regular heptagon. Requirements: fill in all the omitted construction steps; show construction traces only where necessary; and provide the ability to export a GIF.

    The difficulty comes from four layers:

    1. Terminology layer: the two-mark ruler (a ruler with a sliding mark) is an obscure tool; if the model does not recognize it, it cannot translate the physical process of “slide—fit—align” into geometric constraints.
    2. Reference layer: each step simultaneously involves multiple objects such as vertices, the circle, the perpendicular bisector, and the mark lines; any single reference error breaks the whole chain.
    3. Implicit-constraint layer: the prompt never gives the side length of the square, but combined with the goal “construct a regular heptagon in the end,” it can be inferred that a unit side length must be used; the spacing between the two marks is assumed to be one unit; and “necessary traces” also require the model to define on its own what counts as necessary.
    4. Engineering layer: interactivity, animation, and export are also required, testing the model’s ability to organize multiple files, state management, and rendering logic.

    Only when the model fills in all of the above implicit premises and keeps them mutually consistent can the artifact possibly be correct. This is exactly the real purpose of testing natural-language instruction following.

    4. Scoring Dimensions: Turning Subjective Feel into Quantifiable Metrics

    A five-dimension score is recommended to avoid “looks right” judgments:

    • Constraint coverage: the proportion of explicit and implicit constraints that are satisfied;
    • Reference accuracy: whether multi-object operations point to the correct entities;
    • Terminology grounding: whether obscure concepts are correctly formalized;
    • Artifact runnability: whether it loads without errors and completes the interaction;
    • Result correctness: whether the final geometric relationships hold and the animation can be exported.

    Illustrative validation logic (pseudocode):

    1. score = 0
    2. if unit_square_side == 1: score += 0.15
    3. if perpendicular_bisector_exists: score += 0.10
    4. if circle_center_and_radius_correct: score += 0.15
    5. if neusis_alignment_satisfied: score += 0.25 # two-mark ruler alignment condition
    6. if heptagon_vertices_on_circle: score += 0.25
    7. if gif_export_works: score += 0.10

    The “two-mark ruler alignment condition” should be formalized as: there exists a straight line pressed tightly against the specified vertex, on which two mark points fall on the circle and on the perpendicular bisector of the base respectively, with a spacing equal to one unit. This can be solved and compared automatically, eliminating subjectivity.

    5. An Engineering Evaluation Pipeline

    It is best to make the evaluation a regression-capable pipeline rather than a one-off experience:

    1. Case library: layered by terminology obscurity, reference density, and number of implicit constraints;
    2. Sandboxed execution: run the generated artifact in an isolated environment, collecting console errors and rendered screenshots;
    3. Automated assertions: verify geometric relationships with numerical solving, and verify interaction and export with end-to-end scripts;
    4. Multiple sampling: generate the same case multiple times, compute pass rate and variance, and observe stability;
    5. Regression dashboard: combine logging services and monitoring alerts to run trend analysis on pass-rate fluctuations.

    On Baidu AI Cloud, artifacts can be hosted on object storage, sandboxed execution can be carried by a container platform, and a message queue can smooth out traffic spikes, forming reusable evaluation infrastructure.

    6. Common Failure Modes and Improvements

    • Terminology misreading: treating the two-mark ruler as an ordinary ruler, so the alignment condition is missing; improvement: add an explicit checkpoint for “tool capability boundaries” in the case.
    • Reference drift: confusing the circle’s center with a vertex midway; improvement: require the artifact to output a list of intermediate objects for auditing.
    • Implicit constraints not filled in: directly using an arbitrary side length; improvement: make “inferring premises from the target constraint” a separate scoring item.
    • Too many traces: keeping all auxiliary circles; improvement: compare against a “necessary trace set” as a set comparison.
    • Demo only, no export: the animation is missing; improvement: make export success rate a hard gate.

    7. Conclusion

    The essence of instruction following is a model’s ability to complete “intent reconstruction” from fuzzy natural language. Building automatically verifiable tasks from obscure terminology, multi-object references, and implicit constraints turns this ability from a subjective impression into an engineering metric. For teams that want to do model selection and continuous regression, this method can be implemented directly as an evaluation pipeline and built into a stable, reproducible evaluation system on top of the relevant general capabilities of Baidu AI Cloud.