Web Page Replication with Multiple LLMs: A Technical Practice Guide
This article breaks down a reproducible experiment for evaluating how different LLMs and agent harnesses replicate web applications. It covers the six model-and-harness combinations, the two-round prompt design, a four-layer verification framework, a weighted scoring rubric, common defects with fixes, and practical engineering recommendations for turning AI-assisted development from a demo into a reliable deliverable.
1. Background and Problem Definition
As large models and agentic coding frameworks mature, more teams are trying to let models complete the task of going “from requirements to a runnable web page” end to end. A typical scenario is this: given the entry URL of a conversational product and its API documentation, the model is asked to produce three deliverables — a functional description with a structure diagram, a high-fidelity replica of the interface, and an improved version based on its own judgment.
This task looks simple, but it simultaneously tests the model’s multimodal observation, requirement understanding, front-end engineering, API integration, and self-verification abilities. This article does not benchmark any specific product. Instead, it abstracts the scenario into a general technical problem: how to design a reproducible experiment that evaluates performance differences across models and agent frameworks on web page replication tasks, and translates the findings into engineering practice.
2. Experiment Design: Six Model and Framework Combinations
The original practice selected six combinations of “model + harness (agent execution framework),” covering different context lengths, reasoning intensities, and client forms. Here, the harness refers to the outer execution system responsible for tool invocation, context management, task orchestration, and result validation. Model capability sets the ceiling; the harness determines whether that ceiling can be reached consistently.
The unified experimental constraints were as follows:
- Input materials: the target web page entry point and the API documentation;
- Tool conditions: browser automation was allowed to browse logged-in pages;
- Deliverables: a functional document with a structure diagram, a replicated page, and an improved page;
- Interaction rounds: two prompt rounds — the first provided only the requirements, the second added integration credentials.
The value of this design is that it splits “requirement understanding” and “integration validation” into two stages, making it possible to observe whether the model proactively performs deep testing after receiving real credentials, rather than only delivering something that superficially runs.
3. Prompt Structure and Key Constraints
The core of the first-round prompt is to clearly state the role, goal, constraints, and deliverables. An example structure is shown below:
Role: Senior product manager + front-end engineerGoal: Replicate a conversational web interfaceInput: Target page URL, API documentation URLTools: Browser automation may be used to access logged-in pagesDeliverables:1) Product functional specification + functional structure diagram2) High-fidelity replicated page3) Improved page based on best practicesConstraints: Do not rely on historical memory or preset skills; execute directly
The point of prompt engineering here is not polished wording but acceptance criteria. The functional document should be checkable item by item, the replicated page should be comparable point by point, and the improved page should explain the rationale for each change. If the prompt lacks acceptance criteria, the model will easily produce pages that “look right but do not respond to clicks.”
4. Execution Observations: Strategy Differences Matter More Than Capability Differences
After the second round supplied integration credentials, clear strategy differences emerged across the combinations. Some combinations performed only minimal connectivity checks, such as confirming that requests returned successfully. Others proactively constructed multi-turn conversations, invalid inputs, long text, session switching, and other scenarios, exposing boundary-condition problems and continuing to optimize.
This shows that evaluation cannot look only at “whether it runs” but must consider verification depth. It is recommended to divide verification into four layers:
- Static fidelity: layout, spacing, font size, colors, responsive breakpoints;
- Interaction fidelity: input, send, stop, retry, session management;
- API correctness: request structure, streaming output, error code handling;
- Robustness: empty input, extremely long text, network jitter, concurrent clicks.
5. Evaluation Dimensions and Scoring Suggestions
To make the conclusions reproducible, a weighted scoring table is recommended:
| Dimension | Weight | Key checkpoints |
|---|---|---|
| Documentation quality | 20% | Complete feature list, clear hierarchy in the structure diagram |
| Visual fidelity | 25% | Consistency across desktop and mobile |
| Functional completeness | 25% | Closed loop on core flows |
| Verification depth | 20% | Proactively finding and fixing defects |
| Reasonableness of improvements | 10% | Changes are justified and do not break usability |
Among these, “verification depth” is the most easily overlooked dimension, yet it best distinguishes delivery quality. An implementation that validates only the success path is often the first to fail under real traffic.
6. Common Defects and Fix Approaches
High-frequency issues in practice include: misaligned input fields on mobile, streaming output without incremental rendering, state not reset after session switching, missing error messages, and no debounce on repeated submissions. When fixing these, the priority should be to establish repeatable acceptance scripts, upgrading “visual comparison” to “checklist-based verification.”
// Example: submit debounce and state lockinglet sending = false;async function send(text) {if (sending || !text.trim()) return;sending = true;try {await request(text);} finally {sending = false;}}
7. Actionable Engineering Recommendations
- Break deliverables into a checkable list first, then let the model execute;
- In the two interaction rounds, give only credentials in the second round without adding new requirements, and observe whether the model proactively tests deeply;
- Adopt dual acceptance on both desktop and mobile for interface fidelity;
- Require the API layer to cover three paths: success, failure, and timeout;
- Deliver verification scripts together with the page to ensure regression is possible.
8. Conclusion
Replicating web pages with multiple models is essentially an “observable software engineering experiment.” Model differences certainly exist, but process design, acceptance criteria, and verification depth are what determine the stability of the results. Only by writing requirements clearly and making acceptance solid can AI-assisted development move from “works in a demo” to “reliable in delivery.”
