Benchmarking Four Models with a Fixed Harness: Understanding Agent Efficiency Gaps

    This article presents a controlled benchmark that compares four lightweight models (plus a long-context reference model) inside a completely fixed agent harness, so that only the underlying model changes. It shows that all models eventually passed acceptance, yet total runtime varied by nearly 5x. The article breaks down agent latency into turn count, inference time, tool execution, waiting, retries, and recovery, then analyzes four key variables: action turns, tool-call parameter accuracy, service stability and retry backoff, and context management. It also outlines a reproducible evaluation methodology and practical selection advice, including using total cost per task rather than unit price alone.

    1. Experiment Design: Locking Down Every Variable Except the Model

    In the engineering practice of agent applications, a common mistake is evaluating “model capability” and “framework capability” as if they were the same thing. To reach conclusions that can be properly attributed, all non-model variables must be fixed first. The control conditions for this benchmark were:

    • The execution framework (harness) was completely fixed, with no swaps and no parameter tuning;
    • Task goals, input materials, and context window contents were kept identical;
    • The browser and toolchain environment were identical, as were network and permission policies;
    • Acceptance rules were defined upfront, and pass criteria did not change across models;
    • The only variable was the underlying LLM. Four were lightweight models below roughly 300B parameters, plus one long-context model as a reference.

    The value of this design is that the results can be attributed directly to behavioral differences on the model side, rather than to the scheduling quality of the framework.

    2. Results Overview: All Four Finished, but at Very Different Costs

    All four models eventually passed acceptance. The real differences showed up in process metrics:

    Model Type Full Rerun Needed Internal Auto-Retry Cumulative Time to First Success
    Model A No None ~17 minutes
    Model B Yes (first round failed) Yes ~1 hour 12 minutes
    Model C No 3 times ~88 minutes
    Model D Default policy failed twice in a row; succeeded after extended backoff Yes ~1 hour 04 minutes

    It is important to stress that these numbers come from a single controlled experiment. They illustrate the phenomenon and the attribution method, and do not constitute a performance conclusion about any specific product. What deserves attention is that the runtime gap approached 5x, while the binary “did it finish” metric had no discriminating power at all.

    3. Why “Completing” Is Not the Same as “Completing Efficiently”

    Agent execution is a closed loop of “model—tool—environment,” and total time can be roughly decomposed as:

    1. T_total ≈ N_turn × (T_infer + T_tool + T_wait) + T_retry + T_recovery

    Where:

    • N_turn: number of action turns, i.e., how many “think—call—observe” cycles the model needs;
    • T_infer: single-turn inference latency;
    • T_tool: actual tool execution time, such as page loading, builds, or API responses;
    • T_wait: queueing and rate-limit waiting;
    • T_retry / T_recovery: cost of failed retries and state recovery.

    The advantage of lightweight models usually shows up as a smaller T_infer. But if N_turn rises significantly, or T_retry gets triggered, total time can quickly overtake. This explains why a “fast model” is not necessarily the fastest in a real agent pipeline.

    4. Deep Dive into Four Key Variables

    4.1 Action Turns: The Most Overlooked Multiplier

    Turn count is a multiplicative term with the largest marginal impact. Turn inflation usually comes from three behaviors: overly fine-grained task planning, repeated trial-and-error with tool parameters, and backtracking caused by misreading observation results. The detection method is straightforward: count tool calls per unit task and the share of invalid calls. If invalid calls exceed 30%, the model is “guessing” rather than “reasoning.”

    4.2 Tool-Call Quality: Parameter Accuracy Determines Pipeline Length

    Tool-call failures are often not because the model “can’t do it,” but because parameter structures are not rigorous: missing fields, wrong types, invalid paths, or missing required context identifiers. Each failure adds an extra round of observation and correction. The engineering response is to tighten the input schema constraints of tools and return structured, actionable hints in error responses instead of natural-language errors.

    An illustrative tool error response design:

    1. {
    2. "ok": false,
    3. "error_code": "INVALID_PARAM",
    4. "field": "selector",
    5. "expected": "non-empty string",
    6. "hint": "provide a visible text or role-based locator"
    7. }

    4.3 Service Stability and Retry Backoff: Compressing Long-Tail Latency

    The fourth model’s behavior illustrates a typical problem: the default retry policy was too aggressive, failing repeatedly under rate limiting or service jitter and amplifying the waiting. A sound approach is exponential backoff with jitter, plus a maximum retry cap and an overall budget:

    1. delay = min(base × 2^attempt, cap) + random_jitter

    At the same time, distinguish “retryable errors” (rate limits, timeouts, 5xx) from “non-retryable errors” (invalid parameters, insufficient permissions). The latter should terminate immediately and be returned, avoiding pointless consumption.

    4.4 Context Management: Long Context Is Both Capability and Cost

    The long-context model reduced retrieval and summarization turns in material-heavy tasks, but brought higher single-turn latency and a more sensitive “lost in the middle” problem. The practical recommendation is layered context: keep system constraints resident, maintain task state in a structured form, and trim historical observations on demand, keeping only fragments relevant to the current subgoal.

    For benchmark conclusions to be credible, the evaluation itself must be engineered:

    1. Fix the acceptance script; success requires all checks to pass, avoiding subjective judgment;
    2. Record process metrics, not just outcomes: turns, tool-call counts, failure counts, retry counts, and per-stage timing;
    3. Repeat each model multiple times, and report the median and dispersion; single-run data serves only to illustrate phenomena;
    4. Apply uniform timeout and budget caps to prevent individual samples from dragging on indefinitely;
    5. Report in layers: capability (did it finish), efficiency (time and turns), and stability (failure rate and recovery ability).

    6. Conclusions and Implementation Advice

    Positioning a model as low-cost or high-speed describes only one facet of capability. Real agent efficiency is determined jointly by action turns, tool-call accuracy, service stability, and context management. For model selection:

    • Replace simple unit-price comparison with “total cost per unit task = total time × resource unit price + failure recovery cost”;
    • For turn-sensitive tasks, prioritize optimizing tool contracts and error feedback rather than blindly switching models;
    • Bring retry and backoff strategies into configuration management, routing by error type;
    • When deploying on platforms such as Baidu AI Cloud, container platforms can host the execution environment, while logging services and monitoring/alerting systems collect process metrics, and object storage archives materials and artifacts, making evaluation sustainable, auditable, and repeatable.