Multi-Model Collaboration in Replicating an AI Assistant Web Page: Practical Methods and Evaluation

    This article describes how to evaluate multiple AI models on an end-to-end task: replicating an AI assistant web page. It covers a two-stage prompt design, a recommended workflow from requirement analysis through testing, boundary and error test cases, and a scoring framework. Readers get a method for comparing AI coding agents on product development capability, not only on code generation.

    1. From Page Replication to Full Engineering Capability Evaluation

    Asking a model to replicate an AI assistant web page looks like a front-end task. In practice, it covers requirement understanding, product design, interaction implementation, API integration, error handling, and quality verification.

    If the only criterion is whether the page looks similar, the result can be a visually similar demo that cannot be used reliably. A more useful test also checks whether the model can:

    1. Understand the core features of the target product;
    2. Break a vague requirement into executable tasks;
    3. Produce a product feature document and page structure;
    4. Generate a runnable front-end codebase;
    5. Handle model calls, key configuration, and error states;
    6. Proactively fix defects based on test results;
    7. Propose reasonable improvements without changing the core product positioning.

    For this reason, this type of experiment is better defined as an end-to-end product building capability test for AI development agents, rather than a single code generation comparison.

    2. Unified Test Design

    To keep differences in task descriptions from affecting the results, all models should run under the same conditions and receive the same two-stage prompts.

    Stage 1: Provide the Complete Requirements

    The first prompt describes the product goal, page format, and deliverables. The task can ask the model to produce the following:

    • A product feature specification;
    • A page structure or information architecture diagram;
    • An interactive AI assistant web page;
    • An improved page design based on the original requirements.

    The distinction between the “replica version” and the “improved version” needs emphasis.

    The replica version focuses on reproducing the information architecture, page layout, main interactions, and visual style. Its purpose is to evaluate the model’s ability to observe, summarize, and implement. The improved version asks the model to apply general product experience to optimize interaction flows, information density, error messages, response states, and mobile adaptation. Its purpose is to assess whether the model can think proactively at the product level.

    If the two versions are mixed, it is hard to tell whether the model is reproducing the requirements or changing them without permission. The task document should therefore state the boundaries of each deliverable clearly.

    Stage 2: Provide API Access Information

    The second prompt gives the model the necessary API access information, such as the endpoint, authentication key, or test environment details. This has two benefits.

    First, static page generation can be evaluated separately from real API integration. Without access information, the model mainly works on the interface and project structure. With access information, it must handle configuration, request sending, response parsing, and exception handling.

    Second, the model’s behavior after it finds problems can be observed. Some models, after configuring the key, send one simple request, confirm that the page returns content, and stop. Others keep testing empty input, long text, consecutive requests, abnormal responses, and network failures, then modify the code based on the results.

    These behaviors reflect differences in task strategy and quality awareness, not only differences in coding speed.

    To make the results more comparable, the experiment should be split into the following steps.

    1. Requirement Analysis and Scope Confirmation

    The model should first identify the product’s target users, core scenarios, and minimum viable features. A basic AI assistant web page usually includes at least:

    • An input area for conversation;
    • A message display area;
    • Send, stop, or regenerate actions;
    • Loading and streaming output states;
    • A clear or new conversation function;
    • An entry point for key or API configuration;
    • Error messages and a retry mechanism;
    • Basic display of response formats.

    At this stage, the model should not start writing code immediately. It should first output the feature list, page structure, and key interaction flows. This reduces repeated revisions later and lets evaluators judge whether the model understood the task.

    2. Generate the Product Document and Structure Diagram

    A qualified product document should not only list button names. It should also explain the trigger conditions, state changes, and error handling for each feature.

    For example, after a user sends a message, the page may pass through these states:

    1. Idle
    2. ↓
    3. User submits a question
    4. ↓
    5. Request in progress
    6. ↓
    7. Streamed content or full response received
    8. ↓
    9. Result displayed
    10. ↓
    11. User can ask follow-up questions, copy the response, or regenerate it

    If the request fails, the page should enter an error state. It should clearly tell the user the reason for the failure, whether the request can be retried, and whether the current input will be preserved.

    The structure diagram can use a tree format:

    1. AI Assistant Page
    2. ├── Top navigation
    3. │ ├── Product name
    4. │ ├── Settings entry
    5. │ └── New conversation
    6. ├── Main content area
    7. │ ├── Welcome state
    8. │ ├── User messages
    9. │ ├── Assistant messages
    10. │ └── Loading and error states
    11. └── Bottom input area
    12. ├── Multi-line input box
    13. ├── Attachment or extension actions
    14. ├── Send button
    15. └── Stop generation button

    Such a structure helps developers identify missing features quickly. It also tests whether the model can abstract the product structure from the visible page.

    3. Build the Basic Replica

    The replica should first ensure a complete functional loop. Pursuing complex visual effects too early is not recommended. A progressive approach works better:

    • Build the page skeleton first;
    • Then complete the message list and input box;
    • Then connect the API requests;
    • Finally add animations, themes, and detailed styling.

    In the implementation, page components, request logic, and state management should be separated appropriately. For example:

    1. Page layer: handles layout, interaction, and display
    2. State layer: manages messages, loading state, and error state
    3. Request layer: handles authentication, sending requests, and parsing responses
    4. Config layer: stores the API endpoint and access key

    If all logic is placed in a single page file, generation may be fast in the short term. Debugging and extension become difficult later.

    4. Build the Improved Version

    The improved version should not only change colors, corner radius, and fonts. It should reflect an understanding of the actual user experience.

    Common improvement directions include:

    • Showing example questions when the page first loads;
    • Formatting long answers with paragraphs, code blocks, and lists;
    • Supporting message copying and response regeneration;
    • Giving clear feedback when a wait takes a long time;
    • Preventing users from submitting the same request repeatedly;
    • Validating empty and overly long input;
    • Adjusting the input area and message layout for mobile devices;
    • Storing the access key locally and securely, so it does not appear as plain text on the page;
    • Explaining API errors in understandable terms instead of showing raw error messages.

    Valuable improvements reduce the effort users need to complete a task. Simply adding more features does not achieve that.

    4. The Second Round Shows the Most Differences Between Models

    After API access information is provided, the model’s focus shifts from generating code to verifying the system.

    This stage can use a shared set of test cases.

    Basic Request Test

    Enter a short, clear question and check:

    • Whether the request is sent successfully;
    • Whether a waiting state is shown;
    • Whether the response is displayed correctly;
    • Whether user messages and assistant messages can be told apart;
    • Whether multi-turn conversations keep context.

    Boundary Input Test

    Further tests include:

    • Empty input;
    • Input containing only spaces;
    • Very long text;
    • Special characters;
    • Rapid consecutive clicks on the send button;
    • Refreshing the page while a request is in progress;
    • Clicking stop during a request.

    These tests can expose many problems that a static demo cannot reveal.

    Abnormal Request Test

    Also simulate or observe the following cases:

    • An invalid key;
    • An incorrect API endpoint;
    • A network interruption;
    • The service returns unexpected data;
    • The response takes too long;
    • The API returns an error status.

    Strong models usually improve error handling after finding these issues. They do not only log “API call failed.”

    5. Interpreting Differences Among Models and Coding Agents

    In similar tests, model performance often does not depend entirely on parameter scale. The companion coding agent, task planning method, context management, and self-verification mechanism also significantly affect results.

    Task Decomposition

    Some models first build a task list, complete the items one by one, and check them against the list. Others start modifying files directly. The former suits complex projects better because it lowers the chance of missing features.

    Tool Use Strategy

    Models may use file search, code search, test runs, and browser checks. The number of tool calls does not indicate capability. Whether a model uses the right tools at key points often determines whether problems are found.

    Depth of Autonomous Testing

    A simple test usually only confirms that the page runs. A deeper test also checks API failures, state transitions, repeated submissions, response formats, and different screen sizes.

    The deeper approach is closer to a real development workflow. It also shows whether a model has a quality assurance mindset.

    Regression Verification After Changes

    Some models do not recheck existing features after fixing one problem. This can cause regressions, such as fixing the input box and breaking message display. Evaluation should therefore check whether the model reruns the full workflow after changes, not only the part it just modified.

    6. Building a Quantitative Evaluation System

    To avoid judging results by impression alone, scoring can use the following dimensions:

    Evaluation Dimension Focus
    Requirement understanding Whether core features and boundaries are extracted accurately
    Document quality Whether the feature description is complete and the structure is clear
    Page replication Whether layout, interactions, and information hierarchy are reasonable
    Engineering quality Component division, state management, and code maintainability
    API integration Whether configuration, authentication, requests, and response handling are correct