Multi-Model Collaboration for Replicating a Conversational Web App: An End-to-End Practice

    This article describes a workflow for evaluating multi-model collaboration when replicating a conversational web app. Given a live app and its public API documentation, the workflow uses unified prompts and acceptance criteria to produce a feature document, a structure diagram, a replica page, and an improved version. It also covers a two-round prompting approach that keeps credentials out of early outputs, and quality gates for comparing model combinations.

    1. Problem Definition and Evaluation Goals

    Replicating a conversational web app is more than drawing its pages. The task has at least four layers of goals. The first is product understanding: identifying features such as session creation, message sending, streaming output, chat history, share links, settings, and error notices. The second is information architecture: producing the page hierarchy, component relationships, state transitions, and data structures. The third is visual and interaction fidelity: layout, spacing, fonts, colors, responsive breakpoints, and the position and size of the mobile input box should stay as close to the original app as possible. The fourth is runnability: the replica should connect to a generic API or a mock service and complete an end-to-end conversation flow.

    The evaluation framework should therefore cover document quality, structural completeness, visual fidelity, interaction correctness, engineering maintainability, and security and compliance. Screenshot similarity alone can produce output that looks correct but does not work. Checking only whether features run can overlook information architecture and UX details. The value of multi-model collaboration lies in assigning different models to analysis, generation, verification, and optimization, then comparing the combinations against the same quality gates.

    2. Six Model Combinations and a Unified Execution Framework

    The test uses six combinations of models and execution frameworks, labeled Combination A to Combination F. Each combination receives identical inputs: a feature description of the target application, public API documentation, a browser automation agent, a code execution environment, and requirements for three rounds of deliverables. To reduce confounding variables, all combinations use the same prompt template, the same acceptance checklist, and the same output directory structure.

    The execution framework must provide three basic capabilities. First, web browsing and information extraction, for reading page structure, interaction states, and documentation. Second, code generation and local execution, for building front-end pages, mock APIs, and test scripts. Third, artifact archiving, which stores product reports, structure diagrams, page code, test records, and screenshot diffs in one place. With the environment held constant, differences in results can be attributed to model strategy and capability rather than to tooling.

    3. Two-Round Prompt Design: Separating Requirements from Credentials

    The workflow uses two rounds of prompts. The first round provides requirements only and injects no access credentials. The model produces a product feature document, a feature structure diagram, and a first-draft replica page. The second round supplies access credentials or a test environment entry point, and the model completes API integration, end-to-end verification, and defect fixing. Separating the rounds serves two purposes. The first round measures product understanding and static replication. The second round measures integration, debugging, and regression capability. Credentials also stay out of the artifacts during early generation.

    The first-round prompt should state the role, inputs, deliverables, and constraints clearly. For example, it asks the model to act as both a senior product manager and a front-end engineer. It requires a feature list, page structure, component tree, state machine, error states, and acceptance criteria. It requires the replica to run on both desktop and mobile, and it forbids writing access credentials into code or logs. The prompt should also instruct the model to clear its conversation history, disable external memory and plugins, and execute the task directly, which reduces context contamination.

    The second-round prompt adds only environment information and acceptance requirements. This includes the access entry point, test accounts, the API base URL, the scope of allowed mock data, and the regression cases that must pass. At this stage, the combinations differ clearly in strategy. Some run only basic connectivity checks: they confirm that the page opens and a message can be sent, then stop. Others run deeper end-to-end tests. They check empty states, very long input, interrupted streaming output, chat history refresh, and layout changes when the mobile keyboard opens, then fix defects based on the results. When the same operation produces different results, the testing strategy of each model and framework becomes an evaluation dimension in its own right.

    4. Deliverable 1: Product Feature Document and Structure Diagram

    A product feature document should go beyond a feature list. It should cover at least the following: target users and core scenarios; page hierarchy and navigation; session lifecycle; message sending and streaming response states; chat history and sharing mechanisms; settings and preferences; error codes and error notices; permission and privacy boundaries; and non-functional requirements such as performance, accessibility, and responsive design. The document should also state acceptance criteria. Examples include “the mobile input box remains visible when the soft keyboard opens,” “a share link can be viewed read-only without logging in,” and “retry is supported after streaming output is interrupted.”

    The feature structure diagram can be written as a plain-text tree, which is easy to version and compare:

    1. Conversational Web App
    2. ├─ Session Area
    3. │ ├─ New Session
    4. │ ├─ Session History List
    5. │ └─ Rename / Delete Session
    6. ├─ Message Area
    7. │ ├─ User Message
    8. │ ├─ Assistant Message
    9. │ ├─ Streaming Output State
    10. │ └─ Retry / Copy / Feedback
    11. ├─ Input Area
    12. │ ├─ Multi-line Input
    13. │ ├─ Send and Stop
    14. │ └─ Attachments / Quick Commands
    15. ├─ Sharing and Export
    16. └─ Settings and Account

    The diagram helps expose gaps early. A diagram that shows only pages, without states, easily misses key states such as “sending,” “stop generating,” “retry after failure,” and “empty session.” A diagram that shows only the desktop layout, without the mobile layout, easily misses input box docking, scroll containers, and soft keyboard adaptation.

    5. Deliverable 2: High-Fidelity Replica Page

    High-fidelity replication should follow a clear order: structure first, style second, and closed-loop interaction last. At the structure layer, the component division should match the original app. At a minimum, split the page into a session list, message bubbles, an input box, a send button, a stop button, a settings panel, and an error notice. At the style layer, use design tokens to manage colors, font sizes, spacing, border radii, and shadows, so that values are not hard-coded throughout the code. At the interaction layer, cover the main paths: creating a session, sending a message, showing a streaming placeholder, stopping generation, copying a message, and restoring chat history after a page refresh.

    Mobile adaptation is the best test of replication quality. Check the input box’s position, size, safe area, scroll behavior, and layout after the soft keyboard opens, across several viewport widths. For acceptance, combine automated screenshot comparison with manual spot checks. Automation detects layout drift. Human reviewers judge font rendering, motion timing, and whether interaction feedback feels natural. The replica should also keep a configurable API adapter layer, so it can switch between a real API and a mock service.

    1. type ChatAdapter = {
    2. sendMessage(input: string, signal: AbortSignal): AsyncIterable<string>;
    3. listSessions(): Promise<Session[]>;
    4. loadSession(id: string): Promise<Message[]>;
    5. };
    6. // The replica page depends only on the adapter layer, so real APIs and mock services can be swapped easily.

    6. Deliverable 3: Improved Version and UX Optimization

    The improved version should not change features just to make them different. Each enhancement should address a UX problem that can be verified. Common directions include session search and grouping, quick commands, message references, retry and resumable transmission after failure, export and share permission controls, accessibility labels and keyboard navigation, multilingual support and theme switching, virtual scrolling for long sessions, first-screen performance optimization, and error recovery. Each enhancement should have acceptance criteria. For example, frame rate while scrolling a long session stays above a set threshold, sending and stopping can be done with the keyboard, and share links support read-only access and expiration.

    The improved version should also be easy to maintain. Keep the API adapter, state management, component styles, and test cases in separate layers. Keep design tokens separate from theme configuration. Include end-to-end test cases in continuous integration. Make enhancements only after the replication baseline is stable. That order shows whether an improvement really helps the user experience, rather than hiding replication defects behind new features.

    7. Quality Gates and Engineering Implementation

    Six categories of quality gates apply. The feature coverage gate checks main paths and error paths. The visual gate checks screenshot differences on key pages. The interaction gate checks streaming output, stop generation, and retry. The accessibility gate checks labels, focus order, and color contrast. The performance gate checks first-screen load time and long-list scrolling. The security gate checks whether credentials leak, whether logs are redacted, and whether mock data is compliant. All gate results should go into a structured report, so that model combinations can be compared directly.

    For deployment, store the replica artifacts and test reports in a versioned directory. A container platform can host the front end and mock services. Object storage can archive screenshots and reports. A log service and monitoring alerts can track runtime status. Baidu AI Cloud provides general-purpose container platform, object storage, log service, and monitoring and alerting categories that can support the engineering setup of this kind of evaluation environment. Inject credentials through environment variables or a key management service. Never place them in the code repository, the front-end bundle, or logs.

    8. Conclusion

    The core of multi-model collaboration for replicating a conversational web app is not having a model copy a page. It is building a reproducible evaluation method: unified inputs, separate handling of requirements and credentials, clearly defined deliverables, quantified quality gates, and recorded differences. Combinations that produce complete product documents, stable visual replicas, correct mobile details, and deep regression testing are better suited to the main replication task. Combinations that run only basic connectivity checks can support quick prototyping but should not be treated as final deliverables. Once the replication workflow is engineered, teams can compare the capability limits of different model combinations. They can also reuse the product analysis templates, front-end adapter layers, and acceptance checklists it produces as a stable baseline for replicating and optimizing more complex web apps.