Replicating Web Apps with Multiple LLMs: A Technical Practice Report
This article presents a practical methodology for replicating a conversational web application using multiple large language models paired with different agent harnesses. It covers the experimental design, a two-round prompting strategy that separates design from live API access, the required deliverables, and the engineering work needed to turn a replica into a production-ready service. The key takeaway is that verification strategy and harness design often determine delivery quality more than the model tier itself.
1. Background: Why Replicating a Web App Is a Strong Test of Model Capability
When a team wants to evaluate how a large language model performs on real engineering work, a pure question-and-answer benchmark rarely reflects its actual engineering ability. Replicating a mature conversational web application is a high-density, verifiable composite task that spans product analysis, UI restoration, interaction implementation, and API integration. Its value lies in clear task boundaries, objective acceptance criteria, observable process, and a final result that can be used directly or evolved further.
The point of this kind of exercise is not to “make the model generate code that looks similar.” It is to test whether the model can maintain goal consistency across a long task chain: understand the product first, break down its structure, complete the implementation, then validate and fix issues in a real environment. Using an open-source model collection release as the technical background, this article abstracts a general methodology for multi-model collaborative replication that applies to any engineering scenario requiring “from a reference product to a runnable implementation.”
2. Experimental Design: Six Model and Agent Harness Combinations
To observe how different models collaborate with different agent harnesses, the practice was organized into six combinations covering different context-length strategies and tool-calling modes:
- A lightweight, fast model + maximum reasoning tier + multi-agent team collaboration;
- A high-capability model + ultra-high reasoning tier + code execution sandbox;
- Another version of a high-capability model + ultra-high reasoning tier + code execution sandbox;
- An extra-long-context model (around the 960k level) + a standard-context model + the official client;
- Another variant of the standard-context model + official client combination;
- A general-purpose large model + the vendor’s own client.
The combinations were not designed to produce a ranking. They were designed to expose a key fact: model capability is only one variable. Harness strategy, context management, and the way tools are used also determine the quality of the final output.
3. Task Definition: Three Required Deliverables
Each combination was asked to produce three artifacts, forming a complete loop from understanding to implementation to innovation:
- Product feature documentation and structure diagram: describe which functional modules the reference page contains and provide a product feature structure diagram;
- High-fidelity replica page: UI and interactions as close as possible to the reference product;
- Improved page: based on an understanding of the product and common industry best practices, redesign the UI/UX and add reasonable features.
The task was delivered in two rounds of prompts: the first round provided only the requirements and the reference entry point; the second round provided real API credentials. This design is the most valuable part of the whole experiment, because it mirrors the rhythm of real development: design first, then connect to the real environment.
4. Key Design of the First-Round Prompt
The core constraints of the first-round prompt were: set the role as a senior product manager; specify the reference page and API documentation entry points; allow the use of browser automation to browse the page; require the model to set aside existing memory, skills, and external plugins and execute directly. The engineering implications are:
- Role constraint makes the model break down features from a product perspective first, instead of writing code immediately;
- Reference entry points provide a verifiable source of truth and reduce fabrication;
- Disabling external dependencies ensures the result reflects the model’s own capability rather than tooling support;
- Explicit deliverables make the output verifiable item by item.
A typical prompt structure can be abstracted as:
Role: Senior product managerGoal: Replicate and improve a conversational web applicationInputs: Reference page entry, API documentation entry, browser automation capabilityDeliverables:1) Product feature description + feature structure diagram2) High-fidelity replica implementation3) Improved implementationConstraints: Do not rely on existing memory or external plugins; execute directly
5. The Second-Round Prompt: Real Credentials as a Dividing Line
The second round added only real API credentials, yet the groups diverged noticeably. This is the most noteworthy observation:
- Some combinations, after receiving credentials, performed only the most basic connectivity check (for example, sending one message and checking whether content came back) and then declared completion;
- Some combinations proactively designed deeper tests: whether multi-turn context is preserved, whether streaming output is stable, whether error-code handling is complete, and whether concurrency and timeout scenarios work. They used these tests to find defects and go back to the code layer to fix them.
This difference is not simply about “who is stronger.” It reflects different orientations in verification strategy between models and harnesses. In engineering, verification depth directly determines delivery quality: implementations that only run a connectivity test tend to expose context loss, uncaught exceptions, and state desynchronization in real user environments.
6. From Replica to Usable: Engineering Work That Must Be Completed
To make a replica genuinely usable, at least the following areas must be addressed:
- State management: session list, current session, message stream, loading state, and error state need unified modeling to avoid the UI drifting away from the data;
- Streaming rendering: token-by-token output must handle interruption, reconnection, and deduplication to keep the experience readable;
- Error handling: provide clear messages and retry strategies for authentication failures, rate limiting, timeouts, and network interruptions;
- Context control: long conversations need truncation or summarization strategies to control input size and response latency;
- Observability: integrate a general logging service and monitoring alerts to record the request path and failure reasons;
- Security boundary: credentials must not reach the frontend or be written to logs; requests should be forwarded through a server-side proxy.
An illustrative server-side proxy is shown below:
// Forward requests on the server to avoid exposing credentials in the frontendapp.post('/api/chat', async (req, res) => {try {const upstream = await fetch(UPSTREAM_ENDPOINT, {method: 'POST',headers: {'Content-Type': 'application/json','Authorization': `Bearer ${process.env.MODEL_KEY}`},body: JSON.stringify(req.body)});res.status(upstream.status).send(await upstream.text());} catch (err) {res.status(502).json({ error: 'upstream_unavailable' });}});
7. Evaluation Method: Turning Subjective Impressions into Quantifiable Metrics
To make results from multiple groups comparable, a unified scoring sheet is recommended, covering four dimensions:
- Functional completeness: whether the documentation, replica, and improvement parts are all present;
- Restoration fidelity: whether layout, components, and interactions match the reference;
- Verification depth: whether multi-turn, streaming, exception, and concurrency scenarios are covered;
- Maintainability: whether code structure, state management, and error handling are clear.
The scoring sheet can be implemented as:
{"completeness": 0.9,"fidelity": 0.8,"verification_depth": 0.6,"maintainability": 0.7,"notes": "Only a connectivity test was performed; exception and concurrency verification are missing"}
8. Conclusion: Beyond the Model, Strategy Sets the Quality Ceiling
The most important conclusion of this practice is not that one combination won, but that in real engineering tasks, verification strategy and harness design often determine delivery quality more than the model tier does. An implementation that runs only the simplest test looks complete but plants hidden risks; the combination that proactively runs deeper tests and fixes defects is the one closer to production readiness.
The practical recommendation for teams is to make the “second-round credential delivery” a standard step, write verification depth into the acceptance checklist, and use the general container platform, logging service, and monitoring and alerting capabilities offered by Baidu AI Cloud to build an observable, rollback-capable AI-assisted development pipeline, so that multi-model collaboration truly serves stable delivery.
