Engineering Practice and Evaluation Methodology for Recreating Web Products with AI Agents
This article presents a systematic methodology for using large language model–based AI agents to replicate an existing conversational AI web product. It covers task design with three deliverables, a two-round prompt engineering approach, quantitative evaluation dimensions, and practical recommendations for building a repeatable comparison environment. The goal is to help developers establish reliable workflows for model selection, capability validation, and agent process design.
Background: Large Models as “Full-Stack Developers”
With rapid advances in code generation capabilities of large language models, the idea of having an AI deliver a complete product in one pass has moved from demonstration to verifiable engineering practice. Replicating a mature conversational AI web interface—including a product analysis document, a high-fidelity reproduction, and an experience-optimized version—creates a comprehensive test scenario that simultaneously evaluates a model’s product understanding, coding ability, UI reproduction skills, and autonomous optimization capabilities.
The value of such a test lies not in the replication itself but in the standardized comparison framework it establishes: the same requirement, the same set of prompts, and different combinations of models and execution harnesses. The differences in output clearly expose the real capability level of each solution. This article systematically breaks down the methodology behind this practice to help developers build their own evaluation and deployment workflows.
Task Design: Three Deliverables Form a Complete Capability Loop
A high-quality product replication task typically requires the model to produce three types of outcomes in sequence, corresponding to the roles of a product manager, a front-end engineer, and an experience designer:
- Product feature report and structure diagram: The model must first “read” the target product, organize the feature list (conversation management, model switching, history records, settings, sharing capabilities, etc.), and present the information architecture as a structured hierarchical diagram. This stage assesses requirement comprehension and information abstraction.
- High-fidelity web page reproduction: The functionality and UI should match the original site as closely as possible, including layout, color scheme, interaction states, and responsive behavior. This stage tests the completeness of code implementation and attention to details, such as the position, size, and bottom-anchored behavior of the mobile input box being aligned with the official page.
- Self-optimized web page: The model is allowed to leverage its own understanding and research common UX design patterns to make incremental improvements to UI/UX and functionality—for example, adding conversation search, theme switching, quick commands, or message export. This stage evaluates the model’s product judgment and innovation capability.
These three deliverables form a closed loop: the report is the basis for replication, the replication is the baseline for optimization, and the optimization reflects the model’s upper bound.
Prompt Engineering: Division of Labor in Two Rounds
A key design decision in practice is to use two rounds of prompts rather than feeding all information at once:
- Round 1: Requirement injection. Start with a role setting of “senior product manager,” provide the target site URL and API documentation URL, state the three deliverables explicitly, and instruct the model to clear irrelevant context and begin work immediately. The role setting significantly improves the structural quality of the produced document; explicitly allowing the model to browse the reference page eliminates the distortion caused by guessing the UI from memory.
- Round 2: Key delivery. Provide the key required to call the real API only after the replication is complete. There are two benefits: first, it prevents the model from being distracted or creating security risks due to key issues in the first stage; second, it allows observation of the model’s testing strategy differences after integrating the real API—this is one of the most differentiating observation points in evaluation.
The behavioral differences among models in the second round are very obvious: some models, after receiving the key, only perform the simplest connectivity test (sending one message and confirming a response) and declare completion; more robust models construct multi-turn conversations, edge-case inputs, and abnormal disconnection scenarios, proactively discovering and fixing defects such as interrupted streaming output or state desynchronization. This “testing depth” difference is essentially an agent strategy difference rather than a pure capability difference. Therefore, during evaluation, human operation must remain consistent, keeping the variable controlled on the model side.
Evaluation Dimensions: Quantifying “Who Replicates Better”
To avoid subjective impressions dominating conclusions, it is recommended to build a scoring table based on the following dimensions:
- Report quality: completeness of the feature list, logical hierarchy of the structure diagram, and whether acceptance notes are included (e.g., cross-browser compatibility issues for shared links).
- Reproduction fidelity: layout consistency on desktop and mobile, coverage of interaction states (loading, streaming output, error prompts), and usability of core flows.
- Code quality: reasonableness of component decomposition, clarity of state management, and ease of replacing the interface wrapper.
- Testing depth: whether the model proactively constructs test cases after receiving the key, and whether it discovers and fixes defects.
- Optimization reasonableness: whether new features solve real pain points rather than piling up flashy but useless capabilities.
Based on practical experience with these dimensions, one interesting conclusion is: the model that best replicates a certain product is often not the model behind that product itself. The reason is that replication tasks rely more on front-end engineering ability, visual reproduction skill, and the collaboration quality of the agent execution framework, and have little to do with whether the product is “in-house.” This reminds us that model selection should be driven by task-specific testing rather than brand inertia.
Implementation Recommendations: Building a Reproducible Comparison Environment
To reuse this methodology within a team, the following practices are suggested:
- Fix the harness and toolchain: Provide each model with the same browser access and code execution environment to eliminate interference from execution framework differences. If multi-agent collaboration modes are used, record them as separate variables.
- Version control the outputs: Store each round’s deliverables (documents, code repositories, test logs) in object storage or a version control system, and retain execution traces through logging services for review and auditing.
- Run in isolated cloud environments: Deploy evaluation tasks on container platforms with on-demand scaling, and monitor task duration and resource consumption through alerting to reduce noise from local environment differences.
- Use dual review mechanisms: For fidelity metrics, use scripts to perform pixel-level or structural comparison; for experience metrics, introduce human cross-review to avoid bias from a single reviewer.
Conclusion
Using AI to replicate a mature web product may seem like “copying homework,” but in essence it is a standardized exercise for testing a model’s comprehensive engineering capabilities. The two-round prompt design, the decomposition into three deliverables, quantitative evaluation dimensions, and a reproducible execution environment together form the backbone of this methodology. For developers, what is truly worth accumulating is not a ranking from a single test, but this reusable framework for model selection, capability validation, and agent process design.
