Multi-Model Collaboration for Web App Replication: A Technical Practice Report

    This article presents a hands-on study of how multiple large language models, each paired with a different execution harness, collaborate under identical constraints to replicate a conversational web application. It explains the six model-plus-harness combinations, the two-round prompting strategy that separates design from integration, and why verification depth and collaboration constraints determine delivery quality. Readers will find a reusable four-layer breakdown of replication tasks, practical self-check and acceptance checklists, context and multi-agent strategies, and engineering guidance for productizing the workflow on Baidu AI Cloud with secure credential handling.

    1. Background and Goals

    As general-purpose large models keep advancing, a common engineering question has emerged: can several models with different reasoning and execution strategies collaborate under the same constraints to deliver a medium-complexity, end-to-end artifact? This practice uses “replicate a conversational web interface” as a shared task for three reasons. First, the scope is clear and the requirements can be fully described in natural language. Second, the deliverable is verifiable, since the UI structure, interaction flow, and documentation can be cross-checked. Third, the task spans product abstraction, frontend implementation, and quality verification, making it easy to compare execution strategies side by side.

    This article does not evaluate or recommend any specific third-party product. Instead, it abstracts the original scenario into a general technical problem: given a reference interface and API documentation, how can models reliably produce a structured requirements document, a runnable frontend page, and an enhanced version that improves on the reference based on their own judgment?

    The unified deliverable has three parts:

    1. A product requirements document and structure diagram describing information architecture, module boundaries, and state transitions.
    2. A high-fidelity replica of the reference interface, emphasizing visual and interaction consistency.
    3. An enhanced version built on the replica, emphasizing experience optimization and engineering robustness.

    2. Experiment Design: Six Model and Harness Combinations

    The experiment combines a model with an execution framework (harness), for six groups in total. The harness handles task orchestration, tool invocation, file I/O, command execution, and result self-checking; the model handles intent understanding, task decomposition, and code generation. To stay neutral, the groups are described by strategy type rather than product name:

    • Combination A: a lightweight, fast model + a multi-agent team collaboration mode;
    • Combination B: a long-context model + a standard execution harness;
    • Combination C: a strong reasoning model + a code-execution-oriented harness;
    • Combination D: a strong reasoning model + a code-execution-oriented harness (different reasoning tier);
    • Combination E: a long-context model + a client built-in execution environment;
    • Combination F: a general-purpose model + a general conversational client.

    The operating rules were identical: all combinations used the same prompts, the same reference target, and the same acceptance criteria. The only variable was the model and harness strategy. This is critical; otherwise the conclusions would be polluted by operational differences.

    3. Two-Round Prompting: Progressive Authorization from Requirements to Credentials

    The experiment used two rounds of interaction.

    The first round provided only the requirements and the reference entry point, with no invocation credentials, to observe planning and implementation ability without external dependencies:

    1. Assume you are a senior product manager tasked with replicating a conversational web interface.
    2. The reference interface and API documentation entry points have been provided by the user, and you can browse and read them.
    3. Produce: a requirements document with a structure diagram, the replicated page, and an improved version of the page.

    The second round disclosed the invocation credentials, to observe behavioral differences once real integration capability was available. The intent was to separate “design capability” from “integration capability,” preventing models from skipping architectural thinking by relying on external calls in the first round.

    A notable difference appeared in practice: some combinations only performed basic connectivity checks after receiving credentials, such as confirming that requests could be sent and pages could return; others proactively constructed boundary cases, such as very long inputs, concurrent requests, error-code branches, empty responses, and timeout scenarios, exposing implementation defects and entering a self-correction loop. Since the operating rules were identical, this difference can only be attributed to differing strategy orientations of the models and harnesses.

    4. Key Differences: Verification Depth Determines Delivery Quality

    Using “verification depth” as the core evaluation dimension explains the divergence more clearly.

    Shallow verification follows a “done means done” pattern, covering only the main path. Its advantages are speed and low token consumption, which suit the prototyping stage; its risk is leaving behind defects in error handling, state consistency, and accessibility.

    Deep verification treats verification as part of design, proactively constructing counterexamples and writing fixes back. Typical actions include:

    • Stress-testing scrolling and virtual rendering of the message list in long sessions;
    • Race-condition testing of the input box’s disable and interrupt logic during streaming output;
    • Exhaustively checking the mapping from error codes to user-facing messages;
    • Comparing the structure diagram against the actual component tree for consistency.

    The engineering recommendation is to make verification depth explicit in prompts and acceptance checklists rather than hoping for spontaneous model behavior:

    1. Before submitting, run the following self-checks and output a report:
    2. 1) The main path plus three exception paths;
    3. 2) Consistency between the structure diagram and the component hierarchy;
    4. 3) Accessibility of key states (loading / empty / error / streaming);
    5. 4) A list of unresolved issues with reasons.

    5. A General Breakdown of Replication Tasks

    Regardless of the model and harness used, high-quality replication can be split into four layers.

    The first layer is information architecture restoration. Extract navigation hierarchy, main region divisions, and action entry points from the reference interface to form a structure diagram, then map it to a component tree. Documentation and code must share the same source, or maintenance will quickly rot.

    The second layer is interaction state modeling. A conversational interface has at least six states: idle, typing, requesting, streaming output, error, and timeout. The state machine should define transition conditions explicitly instead of stacking scattered boolean variables.

    The third layer is API adaptation. Based on general API documentation conventions, abstract session creation, message appending, streaming reception, and termination into a unified adapter layer so that UI code is decoupled from transport details:

    1. Adapter layer responsibilities:
    2. - Unified request wrapping and credential injection
    3. - Streaming chunk parsing and incremental rendering
    4. - Mapping from error codes to user-facing messages
    5. - Timeout, retry, and interruption policies

    The fourth layer is autonomous improvement. Improvements should not be arbitrary beautification but should target measurable goals, such as time to interactive first screen, rendering stability in long sessions, keyboard accessibility, and clarity of error messages.

    6. Multi-Agent Collaboration and Context Strategy

    The value of multi-agent collaboration lies in role separation: a product role owns structure and documentation, an implementation role owns code, and a verification role owns counterexamples and regression. To avoid the trap that “more agents means slower and more expensive,” three constraints are needed: clear delivery boundaries, a single source of truth (structure diagram and documentation from the same source), and conflict-resolution rules before merging.

    Context strategy also affects results. Long context helps load the full documentation and codebase at once, reducing retrieval round trips; standard context relies more on retrieval and summarization. A practical compromise is layered context: keep only the structure diagram and API contracts globally, and load components and test cases locally on demand.

    7. Engineering Notes for Productizing on Baidu AI Cloud

    To productize the above capability, Baidu AI Cloud can be used with general service categories: a container platform to host the frontend and adapter services, object storage for static assets and documentation artifacts, a message queue to smooth the concurrency pressure of streaming requests, and logging plus monitoring and alerting to track error-code distribution and latency percentiles. Model capability is invoked through a unified model service access layer, with credentials managed by a key management service and strictly kept out of frontend code and plaintext prompts.

    The security baseline includes injecting credentials only on the server side, least privilege, request auditing, output content filtering, and compliance and rate limits on scraping the reference interface.

    8. Conclusion and Reusable Checklist

    The core conclusion is not that one combination is “stronger,” but that delivery quality is determined jointly by verification depth and collaboration constraints. The reusable checklist:

    1. Two-round prompting: design first, integrate later, separating planning from execution;
    2. Make the acceptance checklist explicit: main path plus exception paths plus consistency checks;
    3. Keep documentation and the structure diagram from the same source to avoid implementation drift;
    4. Decouple transport from the UI in the adapter layer to make backend replacement easy;
    5. Control cost and latency with layered context and role separation;
    6. Host credentials server-side and integrate general cloud capabilities for observability and governance.