Replicating a Chat Application with Multiple LLMs: A Technical Evaluation Methodology
This article presents a reproducible methodology for evaluating how different large language models and agent execution frameworks replicate a mature chat application under unified constraints. It covers the experimental design based on controlled variables, a two-round prompting strategy that separates implementation from verification, quality standards for three required deliverables, and common defects with practical debugging approaches. Developers can apply this framework to UI migration, prototype rebuilding, and automated regression testing.
1. Background and Problem Definition
When a vendor exposes capabilities such as conversational AI, deep retrieval, file input, speech synthesis, and speech recognition through APIs, and explicitly states that developers can use them to build a fully functional chat application, an engineering-relevant question emerges: under unified constraints, which combination of large language model and agent execution framework can more reliably “replicate” a mature chat product?
Here, “replication” does not mean building a simple chat box. It involves three layers of deliverables:
- Product feature documentation and a feature structure diagram: describing which modules the target product has and how they nest;
- A high-fidelity version: matching the original product’s interface layout, interaction paths, and state feedback as closely as possible;
- An improved version: enhancing usability and engineering robustness based on an understanding of the product logic.
This article does not evaluate any specific vendor or model. Instead, it abstracts the problem into a reproducible evaluation methodology: given the same target, the same prompts, and the same acceptance criteria, observe the differences between models and execution frameworks across the chain of “understanding, planning, implementation, self-testing, and correction.”
2. Unified Experiment Design: Controlling Variables Matters More Than Stacking Models
Many evaluations produce unreliable conclusions because variables are not controlled. To make conclusions engineering-meaningful, at least the following dimensions must be fixed:
- Same target: the same type of web application to replicate (a conversational product);
- Same input: the same requirements description and the same entry point to the API documentation;
- Same deliverables: all three outputs are mandatory;
- Same interaction: a unified two-round prompt, where the first round provides only requirements and the second round provides access credentials;
- Same execution: browsing and automation capabilities are allowed to read pages and documentation, but no additional private scripts are provided.
Under this design, different “model + execution framework” combinations can be compared horizontally, for example:
- Combination A: characterized by long context and multi-agent collaboration;
- Combination B: characterized by an intensive reasoning mode plus a code execution sandbox;
- Combination C: characterized by an ultra-long context window;
- Combination D: characterized by a standard context plus a desktop client;
- Combination E: characterized by a general high-capability model plus the vendor’s own toolchain.
The point of this grouping is not ranking, but exposing strategy differences. Some combinations only perform minimal connectivity verification after receiving credentials; others proactively construct boundary inputs, check error-code branches, and verify stream interruption recovery, discovering defects early and revising the code accordingly.
3. Prompt Engineering: The Psychological and Engineering Value of Two-Round Instructions
The first-round prompt only describes the role and goal, without any access credentials, to observe the model’s autonomous planning capability. A usable template is as follows:
You are a senior product manager and front-end engineer. Based on a publicly accessibleconversational product, complete three tasks:1) Produce product feature documentation, including a module list and a feature structure diagram;2) Implement a high-fidelity web interface that closely matches the target's layout and interactions;3) Build an improved version on top of the replica to optimize the experience.Requirement: provide the implementation plan and directory structure first, then write code;do not fabricate non-existent APIs.
The second-round prompt then adds credentials and acceptance requirements:
Access credentials and the documentation entry point are now provided. Complete end-to-endintegration and cover at least: normal conversation, ultra-long input, abnormal interruption,empty response, and authentication failure.Fix any problems you find directly and run regression verification.
The key value of the two-round design is that it separates “can it write code” from “can it verify code.” In engineering practice, the latter often determines delivery quality.
4. Quality Standards for the Three Deliverables
4.1 Product Feature Documentation and Structure Diagram
A qualified document should cover modules such as session management, message input, attachments and file parsing, retrieval augmentation, voice input and synthesis, settings and account, and sharing and export, and express hierarchical relationships in a tree structure. An example is shown below:
Chat Application├── Session Area│ ├── Session list / rename / delete│ └── Message stream (streaming rendering, quoting, copying)├── Input Area│ ├── Text input / multi-line auto-resize│ ├── Attachment upload and parsing status│ └── Voice input and playback├── Capability Toggles│ ├── Deep retrieval│ └── File Q&A└── System Layer├── Authentication and quota└── Logging and monitoring
4.2 High-Fidelity Version
The acceptance focus is not “whether it looks like a screenshot,” but whether the state machine is complete: loading state, empty state, error state, rate-limited state, long-text scrolling and scroll-to-bottom behavior, mobile input box position and sizing, and message resending after reconnecting from a network outage. The most common failure in high-fidelity replication is implementing only the ideal path.
4.3 Improved Version
Improvements should be explainable and measurable, for example: making attachment parsing progress explicit; segmenting and pre-reading summaries for ultra-long input; adding pause and retry to streaming output; and providing a clear degradation strategy when quota is limited rather than failing silently.
5. Common Defects and Debugging Approaches
- Verifying only the success path: missing error-code branches, leaving the UI with no feedback when rate-limited;
- State desynchronization: streaming output and message list states are inconsistent, producing “half-finished messages”;
- Missing mobile adaptation: the input box is obscured by the keyboard or drifts in size;
- Broken sharing flow: cross-session isolation causes a share link to fail in another environment;
- Fabricated APIs in prompts: the model invents non-existent fields, which all surface during integration.
The recommended approach is to build a minimal acceptance checklist, write each item as an automatically executable test case, and have the execution framework run regression after each round of changes.
6. Conclusion
The real difficulty in replicating a mature chat application is not generating pages, but completing a verifiable engineering loop under constraints. Two-round prompts, unified deliverables, and an explicit acceptance checklist are the three pieces of infrastructure that turn “model capability” into “deliverable quality.” For developers, this methodology can be directly applied to internal platform UI migration, prototype rebuilding, and automated regression scenarios. It can also be combined with general capabilities such as the container platform, logging service, and monitoring and alerting offered by Baidu AI Cloud to form a continuously iterable engineering pipeline.
