Why AI Agents Score High in Benchmarks but Underperform in Production

    This article explains why large language model agents often look impressive in demos yet struggle with long-running, real-world tasks. It breaks the problem into three measurable dimensions—goal drift, passivity, and verbosity—and shows how to address each with explicit task contracts, decision boundaries, and output format rules. It also outlines a three-layer evaluation framework based on completion rate, clarification rate, and conclusion density, along with practical context and workflow governance techniques for making agent performance stable and reproducible.

    1. The Gap: From Impressive Demos to Engineering-Ready Systems

    Recent discussions about the latest generation of large models keep returning to the same contrast: in public evaluations and demo scenarios, models perform well on tasks such as 3D scene understanding, game logic generation, GUI operation, and code generation. Once they enter real projects, however, their completion rate on long-horizon tasks drops noticeably. One developer who subscribes to an AI coding service described a representative experience: he gave the agent an open-ended goal, and after running for about two hours, the model stopped and asked whether the naming convention for a certain audio file should be changed.

    This kind of feedback is not an isolated case. It can be grouped into a general engineering problem: a structural gap between an agent’s capability ceiling and its delivery floor. This article does not target any specific product. Instead, it abstracts the phenomenon into three observable and measurable capability dimensions and discusses how engineering practices can close the gap.

    2. Root Causes: Three Dimensions That Shape the Real-World Experience

    2.1 Goal Drift

    In long tasks, the model must stay aligned with the original goal while the context keeps growing. As tool-call logs, file contents, and error messages pile up, early instructions lose weight in the attention distribution. The model then tends to switch to “small tasks that can be completed locally,” showing up as repeated confirmation of minor details and frequent sub-goal switching.

    From an engineering perspective, this can be treated as a “constraint decay curve”: the longer the task and the messier the context, the weaker the constraints. The remedy is to make implicit constraints explicit—for example, by maintaining a persistent task contract file and forcing a re-read at every iteration:

    1. # task-contract.md
    2. Goal: Deliver an end-to-end working version of module X
    3. Non-negotiable constraints:
    4. 1. Do not modify shared interfaces under directory Y
    5. 2. All changes must pass the existing unit tests
    6. 3. When ambiguity arises, record the assumption and keep going; do not stop and wait for confirmation
    7. Definition of done: all tests green + the critical path is reproducible

    2.2 Passivity

    “Being able to do it” and “doing it well” are two different things. Passivity usually comes from an over-amplified tendency in the training objective to “reduce risk” and “avoid overstepping.” The model tends to hand decision-making back to the human to avoid irreversible operations. This is an advantage in production environments, but in long tasks it can turn into stagnation.

    A practical approach is to write down the boundary between “can decide autonomously” and “must escalate,” so the model has something to rely on instead of making on-the-spot judgments:

    1. AUTO_APPROVE = {"rename internal temp files", "add logs", "add unit tests"}
    2. ESCALATE = {"delete data", "change permissions", "publish externally", "change billing-related configuration"}
    3. def should_ask(action: str) -> bool:
    4. return action in ESCALATE

    Pair this with a “continue by default” principle: if an operation is not on the escalation list, the model should record the assumption and keep executing rather than interrupting the task.

    2.3 Verbosity and Defensive Wording

    The third pain point is that the model does not speak plainly. A typical evolution has three stages: early on, it invents abbreviations and odd terminology; in the middle stage, it adds heavy defensive preamble and disclaimers; later, it produces long, multi-paragraph arguments without a conclusion. Ask “why is the project slow,” and you get four paragraphs of analysis, when the correct answer may simply be “disk I/O is the bottleneck.”

    The fix is to constrain the output contract at both the prompt layer and the workflow layer:

    1. Response format constraints:
    2. 1. Lead with the conclusion in one sentence, no more than 40 words
    3. 2. Then give the evidence, up to 3 items, each no more than 2 lines
    4. 3. When expansion is needed, append a collapsible "Detailed analysis" section
    5. 4. Do not use disclaimers or preamble that carry no information

    3. Evaluation: Turning a “High Score” into Verifiable Floor Metrics

    Public leaderboards measure the capability ceiling; engineering deployment needs the delivery floor. A three-layer evaluation is recommended:

    • Task completion rate: on a fixed set of long tasks, the proportion that reaches the “definition of done” without human intervention.
    • Interruption and clarification rate: the number of times per unit time the agent stops on its own to ask questions. A high rate indicates unclear constraints or excessive conservatism.
    • Conclusion density: the ratio of “informative sentences / total sentences” in manually sampled responses, used to quantify verbosity.

    A schematic evaluation skeleton looks like this:

    1. def evaluate(agent, tasks):
    2. report = {"completion": 0, "asks": 0, "density": []}
    3. for t in tasks:
    4. result = agent.run(t.goal, contract=t.contract)
    5. report["completion"] += int(result.done_without_human)
    6. report["asks"] += result.clarify_count
    7. report["density"].append(result.info_ratio)
    8. n = len(tasks)
    9. return {"completion_rate": report["completion"] / n,
    10. "avg_asks": report["asks"] / n,
    11. "avg_density": sum(report["density"]) / n}

    4. Context and Workflow Governance: Making Capability Reproducible

    • Layered context: inject “task contract / code retrieval results / runtime logs” into separate zones, with the contract zone placed first and re-read every round to reduce decay.
    • Externalized memory: write decisions, assumptions, and to-dos into structured files in the repository instead of relying on conversation history.
    • Tool-result compression: summarize and structure logs and retrieval results before they enter the context, reducing noise that crowds out useful information.
    • Rollback-friendly design: small commits and branch isolation keep the cost of “pushing forward” controllable, which lowers the model’s tendency toward conservatism.
    • Human-in-the-loop gates: insert human confirmation only when the escalation list is triggered; keep everything else flowing automatically.

    If cloud resources are used to host such a pipeline, a combination of general-purpose capabilities can be adopted: object storage for task contracts and artifacts, a message queue to decouple long tasks, a container platform for sandbox execution, and logging plus monitoring and alerting for observability. Baidu AI Cloud offers corresponding product categories for these general capabilities and they can be combined as needed. This article does not cover any specific interfaces or parameters.

    5. Selection and Practical Recommendations

    To assess whether an agent is suitable for long tasks, do not rely only on demo videos and leaderboard scores. Run the floor metrics on your own task set: is the completion rate acceptable, does the number of clarifications converge, and does the response lead with the conclusion? For 3D and GUI tasks, additionally verify spatial consistency and operation reversibility; for coding tasks, focus on convergence speed under test-driven conditions.

    The conclusion is straightforward: the value of an agent does not depend on its peak performance in a demo, but on its stability in real projects. Writing constraints clearly, drawing boundaries explicitly, fixing the output format, and turning evaluation into floor metrics is the realistic path from a “high score” to high capability.