Why LLM Coding Performance Varies: Model Choice Sets the Ceiling, Usage Determines the Experience

    Large language models (LLMs) often spark heated debates about their coding capabilities whenever a new version is released. However, actual performance varies widely depending on how developers interact with the model. This article explores the spectrum between "wish-based" prompting (vague goals) and "imperative" prompting (detailed commands), and explains why the latter tends to mask underlying model differences. We introduce Agentic Coding as the critical middle ground, where humans define verifiable boundaries and agents work autonomously within them. To successfully transition from Level 2 (L2) to Level 3 (L3) automation, developers must master five core engineering capabilities: task decomposition, context management, tool invocation, test-driven verification, and rollback mechanisms. We also provide a practical framework for objectively evaluating LLM coding performance using custom benchmarks and clear acceptance criteria.

    1. Introduction: Is It the Model’s Gap, or the Usage Gap?

    Whenever a new large language model (LLM) is released, developer communities often engage in heated debates about its coding capabilities. Some teams find that new models write code significantly better, while others feel they perform “about the same” as previous generations or competing models.

    Both experiences can be true. The actual performance of a model on coding tasks depends not only on the model itself but also on the nature of the tasks it faces. The same model, used in different ways, can show vastly different capabilities. In other words, model capability sets the upper limit, while the usage pattern determines how close you get to that limit.

    This article addresses two questions:

    • Why are the performance gaps between different models amplified or reduced under different usage patterns?
    • What engineering capabilities should developers and teams focus on to more consistently translate model capabilities into code quality?

    2. Wish-Based vs. Imperative: The Root Cause of Diminished Model Differences

    Broadly speaking, there are two extremes in how people interact with LLMs: “wish-based” and “imperative.”

    2.1 Wish-Based: Opening a Blind Box with Vague Goals

    “Wish-based” prompting means giving the model only a broad goal and expecting it to deliver usable results end-to-end. For example:

    1. Help me build a user permission management system.

    This request contains a large amount of undefined information for the model:

    • Scope of Requirements: Should it use an RBAC or ABAC model? Should permission granularity be at the menu, button, or data row level? Is multi-tenancy required?
    • Technology Stack: Which language and framework should be used? Where should permission checks be placed—at the gateway, middleware, or business logic layer?
    • Non-functional Requirements: What are the performance goals, security/compliance requirements, and audit log retention periods?
    • Acceptance Criteria: What constitutes “done”?

    The model can only guess the most common combination based on its training distribution. Consequently, the same prompt can yield vastly different implementations across different models or at different times. More critically, without executable acceptance criteria, the quality of the output can only be judged by subjective human perception, leading to highly random results.

    2.2 Imperative: Humans Think, Models Execute

    “Imperative” usage is the opposite. Developers break down requirements into specific, clearly bounded instructions before handing them to the model. For example:

    1. Add a has_permission(user, resource, action) function to the auth module. All input parameters are strings, returning a boolean. Load permission data from the permission table and cache it in-process for 60 seconds. Add unit tests for the following scenarios: has permission, no permission, resource does not exist, and cache expiration reload.

    In this type of task, the primary work lies on the human side:

    • Requirement Understanding: Understanding business rules;
    • Architecture Design: Determining module boundaries;
    • Task Decomposition: Breaking the goal into clear, specific instructions;
    • Result Verification: Validating the model’s output.

    The model acts more like a fast-executing “robotic arm”: the actions are defined by humans, and it simply needs to execute them accurately.

    2.3 Why Imperative Usage “Levels the Playing Field” Between Models

    There are three reasons why imperative usage tends to make different models perform similarly:

    1. Ambiguity is eliminated upfront. Requirement boundaries, interface signatures, input/output formats, and acceptance methods are all explicitly written in the instructions, so the model no longer needs to guess.
    2. Cognitive load is shifted. Understanding and planning are done by humans, while the model only handles implementation. This is precisely where current code generation models excel and are most homogeneous.
    3. Verification costs are reduced. Tasks are small enough that problems are usually obvious at a glance, making error correction very easy.

    In one sentence: When tasks are sliced finely enough, the differences between models naturally appear small. This does not mean model capabilities are identical; rather, the differences are structurally compressed at this level of granularity.

    2.4 The Hidden Costs of Imperative Usage

    The stability of imperative usage comes at the cost of significant human effort. This cost is often hard to notice:

    • Humans become the bottleneck. The time spent on decomposition, writing instructions, and reviewing outputs grows linearly with the number of tasks.
    • Communication overhead exists. Finer granularity means more instructions, leading to a higher probability of context switching and instruction conflicts.
    • Amplifying implicit biases. Decomposition relies on personal experience. The model faithfully executes instructions, which means any design flaws in the instructions are amplified as-is.
    • Difficult to scale. The ceiling of development efficiency remains the speed at which humans can read and think.

    3. The Real Dividing Line: Completing Verifiable Work Within Boundaries

    Wish-based prompting excludes humans from the process, while imperative usage requires humans to handle almost all thinking. Between these two extremes lies a more engineering-valuable middle path:

    Humans define clear goals and boundaries, allowing an AI agent to autonomously plan, execute, and self-correct within a controllable scope until it passes objective verification.

    This “human-in-the-loop, agent-within-boundaries” pattern is often called Agentic Coding in the industry. Its key lies not in “full automation,” but in “verifiability”:

    • Wish-based has no verification: You can only judge whether it’s done based on human feelings;
    • Imperative relies on human verification: Every step requires human confirmation;
    • Agentic relies on machine verification: The goal comes with automatically executable acceptance criteria, which the agent uses to determine if it is finished.

    3.1 A Minimal Viable Task Contract

    A qualified task description should contain at least four parts: goals, acceptance criteria, boundary constraints, and rollback methods:

    1. # task.yaml: Task contract for the agent
    2. goal: Add "cancel order" capability to the order service
    3. scope:
    4. include: ["src/order/", "tests/order/"] # Allowed areas to modify
    5. exclude: ["src/payment/", "migrations/"] # Forbidden areas
    6. acceptance: # Automatically executable acceptance criteria
    7. - "python -m unittest discover -s tests/order -v"
    8. - "bash scripts/lint.sh"
    9. constraints:
    10. - "Only allow cancellation when order status is 'pending payment'"
    11. - "Do not add any external dependencies"
    12. - "Functions must include type annotations and docstrings"
    13. rollback: "Task is performed on a separate branch; if verification fails, simply discard the branch to roll back"

    This task contract simultaneously addresses three engineering questions:

    • Why can agents handle this type of task well, while wish-based prompting often fails? Because the goal is defined as a decidable condition.
    • Why don’t humans need to intervene step-by-step? Because the acceptance criteria can automatically provide feedback.
    • What happens if something goes wrong? Because boundaries are clear and changes can be rolled back.

    4. Levels of Automation in Human-AI Collaboration

    The industry often borrows the tiered thinking of autonomous driving to characterize human-AI collaboration patterns. The following table divides AI-assisted programming into six levels, L0 through L5:

    Level Division of Labor Typical Form Required Core Capabilities
    L0 Pure Manual Writing code by hand; intelligent tools only complete a line or block of code via Tab Basic coding
    L1 Scattered Assistance Conversing with the model about a specific function, error, or design issue, with humans judging whether to adopt it Asking questions and code review
    L2 Human Directs, AI Executes Humans decompose tasks, write detailed instructions, review diffs, and manually run tests Prompt engineering, code review
    L3 Human Defines Goals, AI Executes Autonomously Humans provide goals and acceptance criteria; the agent autonomously plans, modifies multiple files, runs tests, and self-corrects; humans perform periodic reviews and merges Task decomposition, context management, tool use, test design, rollback
    L4 AI Leads, Human Supervises The agent can autonomously advance multiple tasks for extended periods; humans review plans, set priorities, and handle exceptions System design, runtime monitoring, risk management
    L5 Fully Automated From requirements to delivery, everything is done by AI; humans only set business goals Still in the exploratory stage

    From industry practice, most developers are currently between L1 and L2: even those proficient in conversational programming still spend their time asking questions, copying code, tuning prompts, and looking at diffs. At this stage, human involvement is highest, AI contribution is relatively limited, and differences between models are most easily amplified.

    4.1 Why L3 is the Critical Dividing Line

    The biggest change moving from L2 to L3 is the role of the human: shifting from an “executor who directs step-by-step” to a “leader who defines goals and sets boundaries.” This shift brings three fundamental differences:

    • Larger task scale. An agent handles far more code in a single task than conversational programming allows. Humans cannot review every line, so they must rely on automated verification.
    • Different failure modes. L2 problems are mostly “written incorrectly”; L3 problems might be “drifting off course, modifying out of bounds, or getting stuck in repeated revisions.” Therefore, constraints and circuit breakers are needed.
    • Different capability requirements. Writing a good prompt only keeps you at L2; crossing over to L3 relies on software engineering capabilities.

    In other words, being stuck at L2 is not because your prompts aren’t long enough or clever enough, but because the “fundamental engineering skills” of task decomposition, context management, tool invocation, test design, and rollback mechanisms have not yet been filled in.

    5. Five Core Capabilities for Crossing L3

    5.1 Task Decomposition: Turning Vague Goals into Verifiable Subtasks

    The goal of decomposition is to ensure each subtask can be independently verified. A qualified subtask should meet three conditions:

    • Single objective;
    • Completion can be determined by tests or check scripts;
    • Clear dependencies.

    At the same time, the “vertical slice” principle should be followed: each slice can be independently delivered and produce value, rather than extracting the data layer first, then the service layer, and finally connecting the interface. Using “adding cancellation capability to the order service” as an example:

    Step Content Verification Method
    1 Add baseline tests: Supplement tests for the existing ordering flow before cancellation and confirm all pass Unit tests
    2 State machine: Constrain order statuses to enumerable transition rules and reject invalid transitions State transition tests
    3 Cancel interface: Implement cancellation logic and connect it to the state machine Unit tests + Interface tests
    4 Wrap-up: Handle type checking and static analysis warnings, and update API documentation Static checks + Documentation review

    Adding baseline tests first is to prevent the agent from accidentally breaking existing behavior during the refactoring process. Starting from a single feature and expanding gradually also makes it easier to independently roll back each step.

    5.2 Context Management: Determining What the Agent “Knows”

    Context is a finite resource that determines how well an agent “understands” your project. In practice, you can organize it across four levels:

    1. Project Conventions: Tech stack, directory structure, naming conventions, test commands, and prohibited actions;
    2. Architectural Constraints: Module boundaries, dependency directions, and key interface contracts;
    3. Task-Relevant Code: Files directly related to the current task and their callers;
    4. Historical Decisions: Reasons for design trade-offs, known pitfalls, and failed attempts.

    These conventions should be solidified in the project repository so that the agent reads them before starting a task:

    1. # PROJECT_GUIDE.md
    2. ## Technical Conventions
    3. - Business code uses Python 3.11 with complete type annotations; public functions must have docstrings.
    4. - Data access is unified through the storage layer; business code must not directly construct SQL.
    5. ## Directory Standards
    6. - src/<module>/: Business implementation; tests/<module>/: Corresponding unit tests.
    7. ## Commands
    8. - Unit tests: python -m unittest discover -s tests -v
    9. - Static checks: bash scripts/lint.sh
    10. ## Prohibited Actions
    11. - Do not add external dependencies; do not modify src/payment/ or database migration files.
    12. - When fixing a bug, you must first add a failing test case that reproduces the problem.

    Two extremes must be guarded against:

    • Insufficient information: The agent improvises without understanding project conventions, producing code that clashes with the existing style;
    • Information overload: Stuffing the entire repository into the context, causing key constraints to be drowned out.

    A better approach is on-demand retrieval: let the agent first locate relevant modules, then read interface definitions and call chains, rather than loading all files at once.

    5.3 Tool Invocation: Capability Boundaries and Permission Boundaries

    Agents can “do things on their own” because they can call tools: reading/writing files, executing commands, searching codebases, and accessing external interfaces. Tools give them capability but also introduce risk, so permissions should be divided into three tiers:

    Risk Level Operation Examples Strategy
    Low Reading files, code search, running unit tests and static checks Auto-approve
    Medium Modifying business code, installing dependencies, changing configurations Restrict scope, work on a separate branch
    High Deleting data, executing database migrations, deploying, sending external requests Must require human confirmation

    Tool invocation should also follow two principles:

    • Least privilege: Only open the tools and directories necessary to complete the task;
    • Actionable failures: Tools return clear, structured error information (such as test failure logs), allowing the agent to self-correct based on that.

    Many people underestimate the importance of tool design. A script that can return a structured test report is often more effective than ten lines of “please check carefully.”

    5.4 Test Design: The Agent’s “Source of Truth”

    In Agentic Coding, the role of testing has fundamentally changed:

    • In imperative usage, tests are just an appendage to the deliverable;
    • In agentic usage, tests are the only objective basis for the agent to judge whether it “did it right,” equivalent to a reward function.

    If acceptance signals are vague, the agent may fall into two dilemmas: either it repeatedly modifies code without converging, or it “improvises” outside the tests, refactoring unrelated code along the way.

    A recommended collaboration approach is “test-first”: first have humans and agents work together to convert requirements into test cases, confirm the tests can indeed reproduce the problem or describe the expected behavior, and then let the agent implement the code. This has at least two benefits:

    • Acceptance criteria are determined before coding, avoiding “reverse-engineering requirements from code”;
    • Prevents the agent from writing an implementation that “just barely fools the tests” to pass them.

    Layered verification can expose problems earlier:

    1. Type checking and static analysis: Catch low-level errors at compile time;
    2. Unit tests: Cover core logic and boundary conditions;
    3. Integration tests: Verify collaboration between modules;
    4. Smoke tests: Confirm end-to-end main flows are usable.

    5.5 Rollback Mechanisms: Putting “Brakes” on Autonomy

    Agents with autonomy also have the potential to “make mistakes and keep making them.” Rollback mechanisms ensure that any single failure is contained within a controllable scope:

    • Isolation: Each task is performed on an independent branch or in a separate working copy;
    • Small-step commits: Each verifiable progress is committed separately, with clear commit messages describing the intent of the change;
    • Automatic braking: If consecutive verification failures show no progress, stop and hand over to a human to avoid infinite retries;
    • One-click rollback: If verification fails, directly discard the current changes and return to the last verified state.

    It should be noted that rollback targets code and configuration changes. Data-level misoperations (such as incorrectly executing a migration script) often require backup and recovery mechanisms as a fallback; the two cannot replace each other.

    These five capabilities are not mutually independent:

    1. Task decomposition determines the granularity at which the agent handles problems;
    2. Context management determines the information it has;
    3. Tool invocation determines its capability boundaries;
    4. Test design provides it with feedback;
    5. Rollback mechanisms provide a safety net.

    The absence of any one of these will become a bottleneck constraining overall effectiveness.

    6. Selection and Evaluation: How to Objectively Measure “Model Differences”

    Once the relationship between model differences and usage patterns is clarified, model selection becomes more actionable.

    6.1 Moving Beyond “Ad-Hoc Trials”

    Trying out a few models with wish-based prompts often yields conclusions that are neither stable nor reproducible. A reliable approach is to build a small-scale evaluation set for your team:

    1. Sampling: Select 20-50 tasks from real projects, covering bug fixes, feature development, refactoring, and code review;
    2. Stratification: Divide by difficulty into “completion—single function—cross-file—module-level” to avoid tasks being too simple and losing differentiation;
    3. Standardization: Each task has objective, automatically executable acceptance criteria;
    4. Controlling variables: Use the same task descriptions, contexts, and parameters, and try to run each task multiple times under identical conditions;
    5. Metrics: Pass rate is only the starting point; you also need to track other metrics in the table below.
    Metric Meaning What It Reflects
    Pass Rate Percentage of tasks passing acceptance criteria Overall reliability
    First-Pass Rate Percentage of tasks passing without human intervention Instruction-following and planning ability
    Average Correction Rounds Number of feedback cycles needed from draft to pass Self-correction efficiency
    Human Takeover Rate Percentage of tasks requiring a human to take over to complete Boundaries of autonomy
    Change Scope Compliance Rate Whether changes exceeded allowed boundaries Constraint adherence ability
    Average Time and Cost Time and token consumption per task Input-output ratio

    Evaluation results are best presented stratified by difficulty. Only by seeing “at what difficulty level human takeover is needed” can you judge whether the model can handle L3 tasks.

    6.2 A Lightweight Evaluation Framework

    The following example script illustrates the basic structure of an evaluation framework:

    • Maintain a README and a verify script for each task;
    • Apply the model’s output patch in an isolated environment;
    • Run the acceptance script;
    • Automatically aggregate metrics such as pass rate.
    1. import json
    2. import subprocess
    3. import tempfile
    4. from pathlib import Path
    5. TASKS_DIR = Path("tasks")
    6. def run_task(task_dir: Path, ask_model) -> dict:
    7. """ask_model(prompt) takes a task description and returns a patch in unified diff format."""
    8. prompt = (task_dir / "README.md").read_text(encoding="utf-8")
    9. with tempfile.TemporaryDirectory(prefix="agent_eval_") as tmp:
    10. work = Path(tmp)
    11. # Use an independent code snapshot to ensure isolation between evaluations
    12. subprocess.run(["cp", "-r", "repo/.", str(work)], check=True)
    13. diff = ask_model(prompt)
    14. patch = subprocess.run(
    15. ["patch", "-p1", "--fuzz=0", "-i", "-"],
    16. cwd=work, input=diff, text=True, capture_output=True,
    17. )
    18. if patch.returncode != 0:
    19. return {"task": task_dir.name, "passed": False, "stage": "apply"}
    20. # The verify script must complete tests and static checks and express results via exit codes
    21. result = subprocess.run(
    22. ["bash", "verify.sh"], cwd=work, capture_output=True, text=True,
    23. timeout=600,
    24. )
    25. return {
    26. "task": task_dir.name,
    27. "passed": result.returncode == 0,
    28. "stage": "verify",
    29. "log": (result.stdout + result.stderr)[-2000:],
    30. }
    31. if __name__ == "__main__":
    32. # For example, read a list of models from tasks/, evaluate them one by one, and output a JSON report
    33. report = [run_task(task, ask_model) for task in TASKS_DIR.iterdir()
    34. if task.is_dir()]
    35. print(json.dumps(report, ensure_ascii=False, indent=2))

    With this framework, the basis for model selection shifts from “how good was the experience this time” to “under our task distribution, which tier of difficulty has a lower pass rate and human takeover rate.”

    7. Common Misconceptions

    1. Blaming “the model isn’t good enough” as the primary cause. Most failures stem from vague task descriptions, lack of acceptance criteria, insufficient context, or uncontrolled permissions. Switching to a stronger model often just delays the exposure of the problem.
    2. Piling on overly long prompts for wish-based tasks. This is essentially manually simulating the agent’s responsibilities in natural language: writing clear goals, constraints, acceptance criteria, and rollback methods. It’s better to solidify these into task contracts and project convention files to make them reusable and maintainable.
    3. Treating freedom as capability. Letting an agent modify dozens of files in one go often leads to widespread rework. Task granularity should match verification capability: the finer the verification, the larger the tasks you can assign.
    4. Measuring output by “lines of code generated.” Code is a liability; only changes that pass verification and are maintainable have value.

    8. Conclusion

    Back to the opening question: How big is the gap between different models in coding?

    • Under wish-based prompting, the gap is amplified by requirement ambiguity and lack of acceptance criteria;
    • Under imperative usage, the gap is compressed by fine-grained decomposition;
    • In Agentic Coding, the gap depends more on whether tasks are verifiable and whether developers possess the engineering capabilities of decomposition, constraint, verification, and rollback.

    Therefore, rather than repeatedly trial-and-erroring across multiple models, it’s better to first fill in the basic skills required to move from L2 to L3:

    • Pick a few real tasks and write clear goals and acceptance criteria;
    • Organize a project convention file;
    • Set up an automated testing and rollback pipeline.

    Once this “verification loop” is established, the true differences between models on your tasks will naturally emerge through data.