Multi-Model Replication of Web Applications: An Engineering Practice
This article presents a vendor-neutral engineering approach for replicating a conversational web application using multiple model and agent-harness combinations. It covers the experimental setup with controlled variables, a two-round prompt design that separates requirements from resource injection, the behavioral differences observed after the second round, and a four-dimension acceptance rubric for quantifiable comparison. Readers will find reusable prompt templates, common pitfalls, and practical recommendations for turning one-off demos into repeatable delivery through CI integration.
1. Background and Problem Definition
As large models and agentic coding frameworks mature, “describe requirements in natural language and let the model produce a runnable application” has moved from demos into real engineering practice. A typical scenario is this: given the interface and interaction patterns of an existing product, ask the model to replicate its core functionality within a limited time and then improve on it. Such tasks look simple, but they test the model’s requirement understanding, architecture design, code generation, self-testing, and iteration, as well as the outer agent harness’s task orchestration and tool-calling capabilities.
This article uses “replicate a conversational web application” as a unified task and abstracts a product-agnostic engineering method: six “model + agent framework” combinations produce three types of deliverables under identical inputs and workflows, followed by a standardized horizontal comparison. The result is a reusable evaluation and optimization path. No third-party product, model, or tool names are involved, and all capability descriptions stay within general industry terms.
2. Experiment Design: Controlled Variables and Deliverables
Meaningful horizontal comparison depends on controlling variables. This practice fixed the task, the number of input rounds, the deliverable list, and the acceptance criteria, changing only the “model + framework” combination.
The six combinations can be abstracted as the following types (all described generically):
- A lightweight, fast model + a multi-agent collaboration framework;
- A high-reasoning model + a code-execution framework (configuration A);
- A high-reasoning model + a code-execution framework (configuration B);
- A long-context model + a standard-context model + the official client;
- A general-purpose balanced model + a vendor client;
- Another general-purpose balanced model + a vendor client.
Three types of deliverables are required:
- Product feature documentation and structure diagrams: information architecture, page modules, state transitions, and interface boundaries;
- A replicated web page: visually and interactively as close to the reference as possible;
- An improved web page: experience and engineering optimizations based on the model’s own judgment.
Inputs are split into two prompt rounds: the first provides only requirements and constraints, with no keys; the second adds the key configuration needed to run. The purpose is to observe whether the model proactively enters a verification and optimization phase once the “runnable” condition is met, rather than stopping as soon as the code is written.
3. Prompt Design: The Two-Round Method and Structured Templates
The core idea of the two-round prompts is to decouple “requirement definition” from “resource injection.” Round one focuses on WHAT; round two focuses on RUN & VERIFY.
Round-one template example (structured pseudocode):
[Role] You are a senior full-stack engineer.[Goal] Replicate a conversational web application and produce an improved version.[Constraints] Do not specify any third-party service; use ENV variables as key placeholders.[Deliverables] 1) Feature doc + structure diagram 2) Replicated version 3) Improved version[Acceptance] Starts locally; core flow works end to end; basic self-test notes included.
Round-two template example:
[Added] Keys are injected into environment variables; complete the configuration and actually run it.[Requirements] Cover at least: startup, core interactions, exception branches.[Output] Test results, issues found, fix records.
The value of this design is that it observes “can it write code” and “can it verify code” separately. In practice, some combinations perform only minimal runnable verification after receiving the keys, while others proactively expand test depth, uncover boundary issues, and fix them. This directly reflects differences in model and framework strategy.
4. Execution Observations: Differences Appear After Round Two
Under the unified workflow, output quality diverged noticeably after the second round, falling into three behavior patterns:
- Minimal verification: confirms the service starts and the page opens, then stops, with no exception-path coverage;
- Structural verification: checks main modules and state transitions, and can spot obvious interaction defects;
- Deep iteration: proactively constructs exception inputs, boundary lengths, concurrency, and failure-rollback scenarios, then locates, fixes, and retests issues.
This difference cannot be attributed simply to “model strength.” It results from the combined effect of model strategy and the outer framework’s orchestration strategy. Whether the framework provides file read/write, command execution, log review, and failure retry directly determines whether the model can complete the “verify - discover - fix” loop.
5. Unified Acceptance Criteria: Making Comparison Quantifiable
To avoid subjective “looks good” judgments, a four-dimension acceptance table is recommended:
- Functional completeness: whether the documentation, replicated version, and improved version are all present;
- Runnability: whether it starts as documented and whether the core flow works;
- Verification depth: the proportion of test cases covering normal, exception, and boundary paths;
- Iteration quality: whether a traceable “issue - fix - retest” record exists.
Illustrative scoring table:
| Dimension | Weight | Scoring Focus |
|---|---|---|
| Functional completeness | 25% | All three deliverables present and consistent |
| Runnability | 30% | Starts successfully; core flow passes |
| Verification depth | 25% | Exception and boundary coverage |
| Iteration quality | 20% | Issue closure is traceable |
6. Common Issues and Engineering Recommendations
- Requirement ambiguity: the first-round prompt must state “do not specify a concrete service; use environment variables as key placeholders,” otherwise the model tends to introduce non-replaceable external dependencies;
- Insufficient verification: explicitly requiring “at least cover startup, core interactions, and exception branches” in round two significantly improves verification depth;
- Missing structure diagrams: asking for the information architecture and state transitions before writing code reduces rework;
- Improvements without basis: require the improved version to explain item by item “what changed, why, and the expected benefit” to avoid changing things for the sake of change.
For enterprise adoption, this workflow can be embedded in a CI environment: the pipeline injects keys, runs startup and self-tests, and collects logs, while monitoring, alerting, and log services keep a unified record. The model and framework combination can be swapped, but the acceptance criteria and closed-loop process stay stable. Only then does “multi-model replication” evolve from a one-off demo into a repeatable delivery capability.
