Agent Efficiency Benchmark: Model Selection and Stability Practices

    This article compares four model types running the same AI coding task inside a fixed framework, and shows why raw model speed does not predict agent delivery speed. It covers the controlled experiment setup, per-group completion times and retry behavior, differences in UI output, and four efficiency levers: action rounds, tool-call quality, service stability and retry strategy, and context management. It closes with a reusable checklist for acceptance scripts, explicit retry and timeout settings, metrics files, state persistence, dual-viewport assertions, and a single repair round.

    1. Background: Why a Fast Model Benchmark Does Not Mean Fast Agent Delivery

    In real AI coding scenarios, a task is not a single forward pass of a model. It is a closed loop made up of the model, the framework, the toolchain, and the runtime environment. The latency users actually perceive includes model thinking, tool-call round trips, page rendering checks, failure retries, and context compression. Comparing only raw model throughput often leads to conclusions that contradict engineering practice.

    This article uses a controlled-variable approach. The framework layer is fixed to the same AI coding framework (referred to below as a DSH-type framework), while the task, assets, context window, browser automation capability, and acceptance rules all stay identical. Only the underlying model is swapped. Four models with typical positioning are compared: a multimodal fast type, a lightweight balanced type, a long-context type, and a general-purpose control type. To avoid pointing at specific products, they are referred to as A/B/C/D below.

    2. Experiment Design: Lock Down the Variables to See the Real Differences

    The task is a collaboration system for a creative studio. The input is only a few openly licensed images, seed data for members and assets, and seed data for versions and comments. No existing pages can be reused. The model must build five states on its own: project overview, inspiration board, asset locating and commenting, version approval, and publish preview. It must also support permission differences across three roles — creative director, designer, and client — including asset drag and drop, comment anchoring, version switching, approval and rejection, with state preserved after refresh.

    The shared constraints are as follows:

    1. Context window: 262K
    2. Task budget: 200K tokens
    3. Browser capability: automated browser tools (with screenshots and DOM assertions)
    4. Viewport checks: desktop 1440x1000 / mobile 390x844
    5. Repair rounds: 1 round only
    6. Deliverables: code + first-pass screenshots + run logs + review notes + metrics file

    The key point of this design is that acceptance means “runs, is interactive, and persists state,” not “looks right.” Any implementation that relies on hardcoded fake data or omits state management will be exposed during refresh and role switching.

    3. Results: All Four Groups Finished, but the Process Is What Matters

    All four groups eventually passed acceptance, but their paths were completely different:

    • Group A (multimodal fast type): finished in about 17 minutes, passed on the first round, no full rerun.
    • Group B (lightweight balanced type): failed the first attempt, about 1 hour 12 minutes in total including the rerun.
    • Group C (long-context type): no full rerun, but triggered 3 internal automatic retries, about 88 minutes in total.
    • Group D (general-purpose control type): failed twice in a row under the default retry policy, then finished after adjusting backoff parameters, about 1 hour 4 minutes to first success.

    The conclusion is clear: model positioning describes only one facet of capability. Real efficiency is determined together by the number of action rounds, the number of tool calls, service stability, and context management.

    4. UI Output Differences: Four Engineering Orientations

    Group A produced a light editorial style with the lightest structure, where project status, assets, and member relationships are readable at a glance, suitable for quick review. Group B used a dark and off-white contrast, serif headings, and a permission matrix, with the best brand feel and mobile consistency. Group C produced a dark professional workbench with high integration of navigation, progress, roles, delivery, approval, and the asset canvas, and the highest information density and engineering completeness. Group D produced an archive-system style, where thin-line tables and work thumbnails form a restrained creative workbench.

    This shows that under the same task, a model’s “aesthetic prior” significantly affects the shape of the output, while engineering completeness depends more on the constraints and checks provided by the framework.

    5. Root-Cause Analysis: Four Efficiency Levers

    1. Number of action rounds. How many rounds of “read files — modify code — run checks” a task is split into directly determines total duration. Too many rounds usually means insufficient planning capability or unclear feedback signals.
    2. Tool-call quality. Whether all relevant files are read at once, and whether assertions replace visual judgment, determines round-trip cost.
    3. Service stability and retry strategy. Exponential backoff, jitter, and a maximum retry limit need to be configured explicitly; the default policy easily hits walls repeatedly in long tasks.
    1. # Example: explicit backoff configuration (pseudocode)
    2. retry:
    3. max_attempts: 5
    4. base_delay: 2s
    5. multiplier: 2.0
    6. jitter: 0.3
    7. retry_on: [timeout, rate_limited, 5xx]
    1. Context management. A 262K window does not mean unlimited stacking. The 200K budget must be allocated across requirements, code, logs, and screenshot descriptions, and compressing history in time is key.

    6. Reusable Practice Checklist

    • Fix the acceptance script first, then choose the model, to avoid “changing the standard while building.”
    • Set retries and timeouts explicitly for long tasks, and record the reason for each retry.
    • Require a metrics file as a deliverable, turning duration, rounds, and tool-call counts into comparable data.
    • Prefer a unified state layer for state persistence to avoid losing state on refresh.
    • Include both mobile and desktop viewport assertions as must-pass items.
    • Give only one repair round to force first-pass quality.

    7. Conclusion

    Model speed is the starting point; engineering efficiency is the result. Once the framework, acceptance, and retry strategy are standardized, model selection becomes comparable. The general practices around model services and observability at Baidu AI Cloud also confirm the same point: a stable call chain and clear metrics are the real foundation of agent efficiency.