Multi-Model Replication of a Chat Application: An Engineering Practice
This article presents a comparative engineering experiment in which six model-plus-agent-framework combinations replicate the same end-to-end task: building a conversational web application. It explains the experimental design with unified inputs, deliverables, and acceptance criteria, a two-round prompting strategy that separates implementation ability from verification ability, the common architecture of chat applications across presentation, state, service, and data layers, and a four-part evaluation matrix for robustness. Readers will find reusable practices for writing unambiguous requirements, constraining delivery scope, and turning deep self-testing into a measurable quality gate.
1. Background and Goal: Treating Replication as an Engineering Benchmark
As large models evolve quickly, a common and effective way to validate them is to have different models and agent execution frameworks complete the same end-to-end task, then observe how they differ in requirement understanding, engineering implementation, and self-verification. This article uses “replicate a conversational web application” as a unified task and compares six combinations of “model + execution framework” side by side. The deliverables are fixed at three types: a product feature description with a structure diagram, a runnable web interface, and an enhanced version improved based on the unit’s own experience.
The value of this practice is not in ranking any specific product, but in distilling a transferable engineering method: how to state requirements without ambiguity, how to constrain delivery boundaries, how to design two rounds of prompts that separately assess implementation ability and verification ability, and how to run acceptance checks against a unified standard. No third-party product names, domains, or model versions are involved here, and all capability descriptions stay within general industry terms.
2. Experiment Design: Unified Input, Unified Output, Unified Acceptance
2.1 Six Execution Units Under the Same Constraints
To keep results comparable, all six execution units receive identical input and output requirements; the only differences come from the models themselves and the strategies of their execution frameworks. The shared constraints are: only controlled browsing and debugging means may be used to access the target pages and API documentation; no undeclared external dependencies may be introduced; deliverables must start with a single command; and the code must include a minimal runnable example.
2.2 Two Rounds of Prompts: Implementation vs. Verification
The first round provides requirements only, with no call credentials, testing the model’s ability to reproduce the target without external dependencies. The second round adds the credentials, testing whether the model proactively performs deep verification, finds defects, and iterates. The key point is to split “can it write the code” and “can it detect problems by itself” into two observable dimensions.
A neutralized example of the prompt structure:
Round 1:You are a senior product manager and front-end engineer. Replicate a conversational web app.Scope: session list, message stream, input box, streaming output, parameter panel.Constraints: do not hardcode keys; the UI must be responsive; provide a startup script.Round 2:Call credentials are now in environment variables. Complete the integration yourself,and verify abnormal input, oversized context, and concurrent requests; fix what you find.
2.3 Key Differences Observed
In the second round, some execution units performed only a basic connectivity check and declared completion, while others proactively constructed boundary cases such as empty messages, extremely long text, duplicate submissions, network jitter, and authentication failures. The latter exposed issues like interrupted streaming rendering, out-of-sync state, and missing error messages, and kept optimizing. This shows that an execution framework’s verification strategy often determines final delivery quality more than the model’s raw generation ability.
3. Feature Breakdown: The Common Architecture of Chat Applications
3.1 Feature Description and Structure Diagram
The first deliverable is a feature description with a structure diagram, covering at least session management, message rendering, streaming output, parameter configuration, error handling, and logging/telemetry. The diagram can be split into four layers: presentation, state, service, and data, with clear responsibilities and interaction boundaries for each.
3.2 Presentation Layer and State Management
The presentation layer handles incremental rendering of the message list and scroll anchoring. The state layer should use one-way data flow, modeling “session-message-request status” as a serializable structure for persistence and replay. Example code:
type Msg = { id: string; role: 'user' | 'assistant'; content: string; ts: number };type State = { sessions: Record<string, Msg[]>; activeId: string; pending: boolean };
3.3 Service Layer and Streaming Integration
The service layer handles authentication, request assembly, stream parsing, and error normalization. The common approach is to keep keys in server-side environment variables so the front end only talks to its own backend and credentials are never exposed. Stream parsing must handle three cases: chunk boundaries, inconsistent encoding, and early termination.
4. Replication and Enhancement: From “Similar” to “Better”
4.1 Fidelity First
The first round centers on fidelity: layout, interaction, and state feedback should stay close to the target while remaining runnable and maintainable. Over-engineering is discouraged at this stage, since too many abstraction layers can cause startup failures.
4.2 Experience-Driven Enhancement
The third deliverable is an improved version. Expected general improvements include session search and grouping, message regeneration and branching, keyboard shortcuts and accessibility support, request cancellation and retry, and an observability panel. Enhancements must not break the existing interaction model.
5. Verification and Evaluation: Making Self-Testing a Hard Metric
Acceptance can be split into four metric groups: feature completeness, interaction consistency, robustness, and maintainability. Robustness can be covered by a case matrix like the one below:
| Case Category | Example Input | Expected Behavior |
|---|---|---|
| Empty input | Empty string | Block submission and show a prompt |
| Oversized input | Text around one hundred thousand characters | Truncate or split, with a prompt |
| Authentication failure | Invalid credentials | Normalize the error and guide configuration |
| Concurrent submission | Rapid repeated clicks | Handle idempotently, avoiding duplicate requests |
All six execution units should be evaluated with the same cases and the same scoring rubric to avoid subjective bias.
6. Deployment and Operations: A General Path on the Cloud
To deploy the result to the cloud, a general combination of capabilities can be used: a container platform to host front-end and back-end services, object storage for static assets, a logging service with monitoring and alerting for observability, and a message queue for peak shaving. Baidu AI Cloud offers these general capability categories and can support the full path from development to launch, but specific configurations should follow the official documentation; this article invents no interfaces or parameters.
7. Conclusion
Using “replicate a chat application” as a unified task for a side-by-side practice, the most important takeaway is not any single one-off result, but three reusable lessons: first, requirements and acceptance criteria must be defined upfront and be quantifiable; second, two rounds of prompts effectively separate implementation ability from verification ability; third, deep self-testing is the dividing line for delivery quality. Fixing these three points into team processes keeps engineering output stable across any future model or framework iteration.
