Evaluating Multi-Model Efficiency for Complex Tasks in a Unified Agent Framework
This article presents a reproducible experiment for evaluating how different models perform on a complex product-building task under a fixed agent execution framework. It controls the framework, task description, assets, context budget, browser automation layer, and acceptance rules, then swaps four anonymous models to compare end-to-end completion time, first successful completion, full reruns, internal retries, action rounds, tool-call failures, context usage, artifact quality, and human intervention. The results show that agent efficiency is not determined by model speed alone; it is shaped by planning quality, tool-call reliability, retry strategy, and context management. The article also provides engineering recommendations for building repeatable agent efficiency evaluations and routing models by task complexity.
In agent engineering, model capability is often reduced to labels such as “fast,” “low-cost,” or “long-context.” In practice, real task efficiency is determined by more factors: whether the execution framework is stable, whether tool calls are reliable, whether the retry strategy is reasonable, whether context is managed effectively, and whether acceptance rules are clear. This article discusses a reproducible complex product-building experiment that examines how task completion efficiency and stability differ when only the model is changed under a unified execution framework. It also offers engineering evaluation methods and optimization recommendations.
1. Experiment Goal: Separating Model Differences from Framework Differences
Many agent evaluations conflate two categories of variables. One category includes the execution framework, tool adaptation layer, browser automation interface, and acceptance scripts. The other includes the model’s own planning, code generation, tool-calling, and context-management capabilities. If the framework is not unified, it is difficult to attribute final latency and success rates.
This experiment uses reverse controlled variables: it fixes the same agent execution framework, the same task instructions, the same set of assets, the same context budget, the same browser automation adaptation layer, and the same acceptance rules. Only four anonymous model types are swapped, referred to as Model A, Model B, Model C, and Model D. All four are relatively small-parameter candidate models, with Model D serving as a high-context control. The goal is not to rank specific products, but to answer a general question: in a complex front-end product-building task, which engineering metrics can actually explain efficiency differences?
2. Task Design: A Creative Collaboration System Without a Template
The experimental task is a creative studio collaboration system. The input contains only six public art image assets, project members, assets, versions, and comment seed data. There is no existing page to copy. Participants need to independently complete five core states:
- Project overview: display project progress, member relationships, asset overview, and the current version;
- Mood board: support image asset organization, drag-and-drop, and visual arrangement;
- Asset-positioned comments: allow comments to be positioned on assets and associated with specific areas;
- Version approval: support version switching, approval, and rejection;
- Publish preview: display the pre-publish preview state.
The pages also need to support three roles: creative director, designer, and client. Interactions require asset dragging, comment positioning, version switching, approval or rejection, and state must not be lost after refresh. Acceptance covers two viewports: desktop at 1440×1000 and mobile at 390×844. Each group saves a first-version screenshot, is allowed only one repair round, and must finally leave code, screenshots, logs, review records, and metric data.
The key difficulty of this task is not single-page layout, but state persistence, role permissions, cross-state data consistency, and responsive adaptation. The model must plan page structure, data models, interaction paths, and acceptance order on its own, which helps expose differences in action rounds, tool calls, and context management.
3. Controlled Variables and Metric Definitions
The experiment uses a unified context window of approximately 260K tokens and a task budget of 200K tokens. The browser side uses the same automation adaptation layer. Each group records the following metrics:
- End-to-end completion time: from task start to final artifact passing acceptance;
- Cumulative time to first success: time to first acceptance pass, distinguishing internal retries from full reruns;
- Number of full reruns: number of times the task is restarted from scratch after task-level failure;
- Number of internal automatic retries: automatic retries after a single tool call or action step fails;
- Effective action rounds: planning and execution rounds that actually advance the task;
- Tool-call count and failure rate: statistics for browser operations, file reads/writes, screenshot checks, and other calls;
- Context peak and compression count: whether context is used effectively;
- Artifact score: functional completeness, state persistence, mobile consistency, and visual consistency;
- Human intervention count: situations requiring manual correction of the environment or inputs.
It is important to note that end-to-end latency is not the only metric. A model may be fast per call but retry frequently. Another model may take longer overall but avoid full reruns and produce more stable artifact quality. Only by considering first success, retry cost, artifact quality, and human intervention together can we approximate real agent efficiency.
4. Anonymous Results: All Four Groups Completed the Task, but the Processes Differed Clearly
All four model groups eventually completed the task, but the process differences were more valuable than the final screenshots.
Model A completed the task fastest, in about 17 minutes. It had the lightest structure and used a light editorial style, making project status, assets, and member relationships readable at a glance. Its advantage was a short planning path and fewer effective action rounds, with no full rerun.
Model B failed on the first execution and took about 1 hour 12 minutes in total when including the full rerun. It had strong branding and mobile consistency, but the rerun cost caused by the first failure significantly increased total time. This shows that “single-round generation quality” and “failure recovery capability” must be evaluated separately.
Model C had no full rerun but executed with 3 internal automatic retries, taking about 88 minutes in total. It chose a dark professional workbench style, placing navigation, project progress, roles, delivery, approval, and asset canvas into a complete system. It had the highest information density and engineering completeness. Its latency mainly came from more tool calls and more complex page-state validation.
Model D used a gallery archive system style, with black serif headings, an off-white background, thin-line tables, and artwork thumbnails forming a restrained creative workbench. Its default retry strategy failed twice consecutively, and it completed after extended backoff, reaching first success at about 1 hour 4 minutes. This group shows that if the default retry strategy does not distinguish error types, it may produce many invalid waits during service fluctuations. Extended backoff can improve convergence probability but increases total time.
From the results, the fastest and slowest groups differed by about five times. This span is not determined only by model generation speed. It is amplified by action rounds, tool-call failures, retry strategy, and context management.
5. Difference Analysis: Real Efficiency Depends on Four Engineering Dimensions
1. Action Rounds Determine Planning Cost
In complex tasks, the model must first decompose states, data models, and acceptance order. Clearer planning leads to less ineffective exploration. Insufficient planning leads to repeated modifications across page structure, permissions, and state persistence. Model A had a short path, indicating a more direct connection between planning and execution. Model C made more tool calls, indicating a more complete engineering implementation path, but this also brought higher validation cost.
2. Tool-Call Failures Amplify Latency
Browser automation clicks, waits, screenshots, and element queries can all fail because the page is not yet stable. Effective tool calls advance the task, while failed calls and retries consume budget. Evaluation should distinguish “business actions” from “recovery actions”; otherwise, retry counts may be mistaken for model capability.
3. Service Stability and Retry Strategy Must Be Engineered
Retryable errors typically include timeouts, rate limits, and transient disconnections. Non-retryable errors include acceptance failures, logic errors, and permission errors. If the default retry strategy is too dense, it may increase service pressure. Exponential backoff with random jitter, retry caps, circuit breaking, and idempotent tool calls are more robust. The following is illustrative pseudocode:
def run_with_retry(task, model, max_rounds=3):state = init_state()for round_idx in range(max_rounds):try:result = agent_loop(task, model, state, budget="fixed")if validate(result):return resultexcept RetryableError as e:delay = min(base_delay * (2 ** attempt), max_delay) + jitter()sleep(delay)except FatalError:breakreturn fail_with_logs(state)
The key is not that more retries are always better, but error classification, backoff curves, retry budgets, and log observability.
4. Long Context Does Not Equal Effective Context
Long context can hold more code and logs, but without state externalization, summary compression, and pinning of key information, the model may still repeatedly read and repeatedly modify. A more effective approach is to persist project state, acceptance checklists, and change records into files or structured state so the model can read them on demand, rather than putting all history into context.
6. Engineering Recommendations: How to Build Reproducible Agent Efficiency Evaluations
First, fix the execution framework and acceptance scripts, and only swap the model under test to avoid framework differences contaminating conclusions. Second, build a layered task set covering simple pages, complex states, and multi-role permissions, and separately measure success rates and P95 latency. Third, record first-success time, full reruns, internal retries, and tool-call failure rates, not just total latency. Fourth, perform error classification and backoff design for retry strategies to avoid ineffective retries draining the budget. Fifth, include state persistence, context compression, and key artifact screenshots in acceptance to ensure reproducibility. Sixth, use anonymous blind review and multiple runs to reduce the impact of single-run variance.
For team model selection, positioning a model as low-cost or high-speed describes only part of its capability. Real agent efficiency also depends on action rounds, tool calls, service stability, and context management. A more reasonable approach is to build a continuous evaluation pipeline and route models by task complexity: use lightweight models for simple tasks, use models with stronger planning or more stable context management for complex tasks, and prepare fallback and circuit-breaking strategies for failure scenarios.
7. Conclusion
The complex-task experiment under a unified execution framework shows that all four model types can complete the task, but the process differences are significant: some complete quickly through short paths, some incur full reruns due to first failure, some complete through internal automatic retries with increased latency, and some converge only with extended backoff. Final efficiency is not a function of model speed alone. It is the combined result of planning quality, tool-call reliability, retry strategy, and context management. Only by engineering evaluation metrics, retry mechanisms, and state management can agents maintain interpretable, reproducible, and optimizable efficiency in complex product-building tasks.
