How to Evaluate AI Coding Agents: A Practical Benchmark Based on Replicating Web Applications

    Evaluating AI coding agents with simple code completion or single-file generation no longer reflects real engineering capability. This article presents a practical, reproducible method for benchmarking agents on a demanding task: replicating the web client of a real, mature conversational web product. It covers how to design control groups that separate model capability from agent harness capability, how to define verifiable deliverables, and why a two-round prompting strategy that withholds and then grants runtime credentials is revealing. The main finding is that performance differences often come not from the prompts but from the harness's task orchestration and verification strategy — in particular whether the agent self-tests after completion, explores edge cases, and closes the loop on defects. Scoring dimensions, engineering recommendations, and a note on running such evaluations on a stable, operable engineering foundation are included.

    Why “Replicate a Web Application” Is a Strong Capability Test

    When assessing AI coding agents, simple code completion or single-file generation is no longer enough to reveal real engineering skill. What actually separates agents are complex tasks that require multiple rounds of interaction, cross-file collaboration, and build-as-you-verify behavior. Asking an agent to reproduce the web client of a real, mature conversational web product is a representative example of this kind of hard benchmark task.

    Three things make it a genuine litmus test:

    • Ambiguous requirements. To match an existing product exactly, the agent must proactively observe, decompose, and reconstruct interface and interaction details rather than passively waiting for a precise specification.
    • Multiple deliverables. The task requires documentation, runnable code, and an improvement proposal at the same time, so it measures end-to-end delivery rather than snippet generation.
    • A demanding verification loop. Replication quality can only be judged by actually running the result. Whether the agent can start the application itself, and whether it can discover its own defects, largely determines success or failure.

    Test Design: Making the Evaluation Fair and Reproducible

    For results across agents to be comparable, the test design must keep variables controllable, instructions uniform, and scoring objective. The evaluation framework can be built along the following dimensions.

    Control Groups

    Select several combinations of model plus agent harness as control groups. Two concepts need to be kept distinct:

    • Model: the underlying reasoning and generation capability.
    • Harness: the execution environment built around the model, including tool invocation, context management, task orchestration, and multi-agent collaboration mechanisms.

    The same model paired with different harnesses can perform very differently; different models paired with the same harness reflect the model’s own planning and execution ability. Only by combining the two into multiple control groups can model capability and harness capability be decoupled and analyzed separately.

    Deliverable Definition

    Clear, acceptable deliverables are the foundation of the evaluation. This class of task typically specifies three outputs:

    1. Product feature documentation and feature structure diagram: which functions the target application has, and how the modules are organized.
    2. High-fidelity replica: as close as possible to the original product in both functionality and UI/UX.
    3. Improved and optimized version: built on the replica, with additional, more sensible features and interactions proposed autonomously, informed by research into comparable products.

    Two-Round Prompt Strategy

    The most transferable idea in this evaluation design is the use of two prompt rounds:

    • Round one: issue the requirements. Acting as a senior product and engineering role, state the goal, constraints, available tools, and the three deliverables, and require the agent to complete analysis and implementation on its own.
    • Round two: provide the key credentials. For example, share the model invocation key so the agent gains the ability to actually run, access the network, and verify.

    The clever part of this design is that it brings “whether the agent proactively uses the capability once granted” into scope. The difference in an agent’s initiative before and after receiving the key exposes its strategic inclination directly.

    Key Observation: Execution Strategy Is the Dividing Line

    A striking pattern emerged in practice: after receiving the credentials, different agents adopted sharply different behavioral strategies, and this directly determined the quality of the final delivery.

    Shallow Verification

    Some agents performed only the most basic connectivity test after gaining invocation ability — for example, sending one simple request to confirm it worked, then declaring the task complete. The problems with this approach are:

    • It verifies that the system “works,” not that it “works well.”
    • It lacks checks of boundary conditions, abnormal inputs, concurrency, and state management.
    • Many hidden defects remain, so the replica looks finished but is actually fragile.

    Deep Verification

    Other agents proactively ran deeper tests: constructing multiple kinds of input, covering exception paths, and repeatedly comparing interaction details against the original product, which allowed them to find and fix defects and to identify shortcomings and iterate.

    The value of this strategy is that it reflects an engineering mindset of self-review — not passively satisfying instructions, but actively pursuing delivery quality.

    The Root Cause: Harness Orchestration, Not the Prompt

    It is worth emphasizing that this difference is usually not caused by different prompts (the test instructions were identical), but by different strategic designs in the agent harness’s task orchestration and verification stages. Whether a “self-test after completion” step is built in, whether multi-agent division of labor is encouraged, and whether tool invocation results are checked in a closed loop all significantly affect the final output. This is also why the evaluation needs to decouple the model from the harness.

    Evaluation Dimensions: Quantifying Replication Quality

    To turn subjective impressions into comparable conclusions, a scoring system can be built from the following dimensions:

    • Feature completeness: whether all core functions of the target application are covered, and whether anything is missing.
    • UI fidelity: how closely layout, styling, and interaction feedback match the original product.
    • Runnability: whether the code starts smoothly and whether the core paths work end to end.
    • Self-test depth: whether tests were constructed proactively, whether real defects were found, and whether fixes were closed out.
    • Reasonableness of improvements: whether new features in the optimized version genuinely address experience pain points rather than piling on irrelevant capabilities.
    • Documentation quality: whether the feature documentation and structure diagram are clear, accurate, and useful for guiding further development.

    Among these, self-test depth is the soft metric that best reveals the gap, and the key to distinguishing “can deliver” from “delivers well.”

    Engineering Practice Recommendations

    Based on the evaluation approach above, several reusable practices emerge:

    1. Make “self-test after completion” a hard requirement. State at the requirements stage that the agent must run verification before delivery, cover exception scenarios, and write the verification results into the delivery notes.
    2. Prefer harnesses with a closed tool loop. Whether the agent can genuinely access the network, invoke services, execute commands, and read runtime results determines whether it can correct itself.
    3. Use multi-agent collaboration for complex tasks. Splitting analysis, implementation, testing, and optimization across different roles is often more robust than a single agent working serially.
    4. Adopt two-round or incremental interaction. Providing requirements first and then gradually granting capabilities makes it possible to observe an agent’s initiative and strategic maturity.
    5. Build an objective scorecard. Breaking vague impressions into checkable, scorable items makes conclusions across control groups reproducible and comparable.

    Conclusion

    Using “replicate a conversational web application” to evaluate AI coding agents is an excellent benchmark method that balances difficulty with verifiability. What truly separates agents is not only the underlying model, but the harness’s strategic design for task orchestration, verification loops, and self-correction. When selecting tools, rather than focusing only on model benchmark scores, developers should treat “does the agent dig into problems proactively once it has the capability” as the core observation point.

    For enterprise scenarios, this kind of capability ultimately needs to land on a stable, operable engineering foundation. With general-purpose cloud capabilities from Baidu AI Cloud — such as container platforms, logging services, and monitoring and alerting — an agent’s execution, testing, and performance tracking can be brought into a unified engineering workflow, so that evaluation evolves from a one-off experiment into sustainable capability building.