Replicating an Intelligent Chat Web UI with Multiple Large Language Models: A Practical Guide
This article details an engineering experiment where multiple large language models (LLMs) are used to replicate an intelligent chat web client. The process evaluates full-stack LLM capabilities—including requirement analysis, code generation, and API integration—through three progressive deliverables and a two-round prompt strategy. We share key findings from a horizontal evaluation and provide a reusable methodology for AI-driven application development and model selection.
Replicating an Intelligent Chat Web UI with Multiple Large Language Models: A Practical Guide
I. Why Replicate?
When an LLM vendor fully opens its model capabilities and API documentation, an interesting phenomenon quickly emerges among developers: since the APIs are public and the web UI features are observable, can we let an LLM replicate the vendor’s own chat product?
While this sounds like a joke, it is actually an excellent engineering experiment. A mature intelligent chat web client inherently encompasses multiple dimensions of work: product analysis, frontend engineering, API integration, state management, and UI/UX design. Having an LLM accomplish this task is equivalent to conducting a “full-stack stress test” on the model’s comprehensive capabilities:
- Requirement Understanding: Can it browse the target page and summarize a complete list of features?
- Documentation Writing: Can it produce a well-structured product feature report and architecture diagram?
- Code Generation: Can it output a runnable, interactive frontend page?
- API Integration: Can it read API docs and correctly implement core capabilities like streaming chat output?
- Self-Iteration: After receiving API keys, can it autonomously test, identify defects, and fix them?
Based on this experiment, this article comprehensively introduces the task design, prompt construction, methodology for horizontal multi-model evaluation, and key conclusions drawn from practice. All specific models and products mentioned have been abstracted into generic descriptions; the focus is on the reusability of the methodology itself.
II. Task Breakdown: Three Deliverables
The replication task is explicitly broken down into three progressive deliverables with increasing difficulty:
1. Product Feature Document and Structure Diagram
The model is required to act as a senior product manager, browse the target webpage, and output a product report detailing the functional modules included, along with a feature structure diagram (usually expressed as a text tree or diagram code). This step tests the ability to “understand a product” and serves as the requirement baseline for subsequent replication.
2. 1:1 Replicated Chat Webpage
The generated frontend page must be highly consistent with the original page in terms of functionality and visual design. This includes: session list, multi-turn dialogue, streaming output, deep-thinking toggle, web search toggle, input box position and dimensions, and mobile responsiveness. Fidelity is the most intuitive scoring criterion.
3. Improved Version Based on Its Own Understanding
This step lifts constraints, allowing the model to search the web for best practices and autonomously add features it deems valuable, such as a prompt template library, conversation export, theme switching, message regeneration, and code block copying. This step tests product judgment, not just execution.
The three deliverables form a complete chain of “analysis → replication → innovation,” which perfectly corresponds to the three levels of requirements that engineers handle daily.
III. Prompt and Interaction Strategy Design
The entire test adopts a standardized two-round prompt process to ensure consistent conditions for all models.
Round 1: Requirement Description. Clearly define the role (senior product manager), the target object (chat web client and API documentation), and the three deliverables. The model is instructed to “clear existing memory and external tool dependencies, and start executing immediately.” Role setting combined with a clear deliverable checklist is key to driving long-chain tasks.
Round 2: Inject API Keys. After the model completes the static page, it is informed of the available API keys and required to integrate real conversational capabilities. The observation value of this round is extremely high—it exposes differences in behavioral strategies among different models after “receiving resources.”
Two typical behaviors can be observed in practice:
- Shallow Self-Testing Type: Some models only perform the simplest connectivity verification after receiving the keys (sending a message and confirming a response) before declaring completion. The page may retain unhandled edge cases, such as streaming interruption, empty input, or long text truncation.
- Deep Self-Testing Type: Other models proactively construct multiple test cases, simulate exception scenarios, and fix bugs after discovering them, followed by regression verification. For example, upon finding content cross-talk during rapid session switching with streaming output, they proactively introduce request cancellation and state isolation logic.
It must be emphasized that this difference is not necessarily a direct reflection of model capability, but rather reflects different task strategies between the model and its execution environment (harness). As evaluators, all we can do is unify the input conditions and faithfully record behavioral differences.
IV. Evaluation Dimensions and Key Findings
To horizontally compare six “model + execution environment” combinations, it is recommended to score them across the following dimensions:
| Dimension | Evaluation Points |
|---|---|
| Report Completeness | Are features exhaustively listed? Is the structure diagram reasonable? |
| Replication Fidelity | Consistency of layout, interaction, and responsiveness with the original page |
| Functional Usability | Is the core path genuinely usable after API integration? |
| Self-Testing Depth | Does it proactively identify and fix defects? |
| Innovation Quality | Do the new features in the improved version provide real value? |
Several key findings are worth recording:
First, the model that replicates a product best is not necessarily the vendor’s own model. Intuitively, using a vendor’s own model to replicate their product should offer the most advantage. However, in actual testing, the most stable overall performance came from another general-purpose flagship model. Its product reports were more detailed (e.g., noting easily missed points like “sharing links requires verification in a different browser”), and the replicated version was precise down to the position and size of the mobile input box, matching the original perfectly. This indicates that replication capability depends on general code and product understanding skills, rather than a “bloodline relationship.”
Second, long-context capability significantly aids product analysis tasks. Models with ultra-long context windows produce more comprehensive reports with fewer omissions after reading through the entire page structure and API documentation. However, long context does not automatically equate to stronger engineering implementation; final fidelity still depends on code generation quality.
Third, agent team collaboration modes are more stable in long tasks. The approach of assigning “analysis, coding, and testing” to different sub-agents for collaboration generally outperforms single-model one-shot outputs in terms of completion and stability across multi-round tasks. This is especially suitable for long-chain scenarios with multiple deliverables.
Fourth, behavioral differences under unified operations are important signals in themselves. The defect rate of deliverables from deep self-testing models is significantly lower. This suggests that when using code generation models in production environments, we should prioritize solutions capable of “self-verification and repair” loops, or mandatorily add testing phases in the workflow.
V. Methodology: Reusable Engineering Insights
By abstracting this experiment into a general methodology, we can derive several insights applicable to any “AI replication/imitation application” scenario:
- Analyze Before Coding: Requiring the model to produce a product document before writing code forces it to establish a requirement baseline, which significantly reduces feature omissions.
- Two-Round Resource Injection: Providing requirements first and keys later cleanly separates the “static construction” and “integration testing” phases, making it easier to locate issues.
- Unify Conditions, Record Faithfully: Maintain consistent inputs during horizontal evaluations; the differences in model behavioral strategies are valuable data in themselves.
- Use Fidelity as a Hard Metric: Pixel-level and interaction-level fidelity is more distinguishable than subjective feelings. Combined with real-device verification (including mobile), it exposes true gaps.
- Test Product Judgment with the Improved Version: Letting the model autonomously add features is an effective way to evaluate its ability to transition from execution to creation.
VI. Conclusion
“Letting AI replicate AI products” may seem like a fun experiment, but it is actually a high-density stress test of an LLM’s full-stack capabilities. It simultaneously covers five stages: requirement understanding, documentation writing, frontend engineering, API integration, and self-iteration. Any weakness in these stages will be thoroughly exposed in the final deliverable. For developers, this evaluation framework of “three deliverables + two-round prompts + multi-dimensional scoring” is fully transferable to their own model selection and agent workflow design, helping to find the right model combination for engineering deployment at a lower cost.
