Replicating a Multi-Model Chat Application: An End-to-End Engineering Practice

    This article treats building a chat-style web application on top of exposed model APIs as a reproducible engineering experiment rather than a simple UI clone. It covers experiment design with controlled variables, a two-round prompting strategy where credentials are provided only in the second round, quality standards for three deliverables (functional documentation with a structure diagram, a high-fidelity page, and an independently optimized page), common defect patterns and how to locate them with a defect matrix, and recommendations for turning the workflow into a repeatable pipeline. The key takeaway is that clear constraints and rigorous acceptance criteria, not model choice alone, determine whether model and tooling potential becomes deliverable, maintainable software.

    1. Background and Problem Definition

    Once a model vendor exposes capabilities such as conversation, deep retrieval, file parsing, speech synthesis, and speech recognition through APIs, a natural question follows: can developers use these general-purpose capabilities to independently build a fully functional conversational web application that feels close to the original? This looks like a UI replication task, but it is in fact an end-to-end technical validation spanning requirement abstraction, information architecture, frontend fidelity, API integration, state management, and quality acceptance.

    The approach in the source material is representative: six combinations of “model + coding execution framework” produce three types of deliverables under identical constraints — a product functional document with a structure diagram, a high-fidelity page, and a version of the page independently optimized afterward. The two-round prompt setup matters as well: the first round provides only requirements, and the second round adds access credentials. This design makes it possible to observe how different combinations behave once resources are actually available.

    Note that this article does not evaluate any specific vendor product. Instead, it abstracts the practice into a general engineering question: with capabilities exposed as APIs and models acting as tools, how do you organize a reproducible, measurable, and comparable application-building experiment?

    2. Experiment Design: Making the Comparison Meaningful

    Comparing multiple models and execution frameworks is only meaningful if variables are controlled. Fix the experimental conditions along these dimensions:

    • Unified input: the same requirement description, the same API documentation description, and the same acceptance criteria.
    • Unified rounds: the first round states only the goal and constraints; the second round adds credentials and accessible resources.
    • Unified deliverables: functional document, structure diagram, replicated page, and optimized page — none can be skipped.
    • Unified environment: the same runtime, the same dependency versions, and the same screen size matrix (several desktop and several mobile tiers).
    • Unified scoring: fidelity, functional completeness, code maintainability, defect density, and optimization rationale are each scored separately.

    The “credentials only in the second round” design is especially worth keeping. It reveals the strategy each combination adopts once it has a real, reachable target: some do only minimal connectivity checks, while others proactively run boundary tests such as oversized input, malformed files, concurrent requests, empty states, and error code handling, surfacing defects early. This difference is not simply a matter of stronger or weaker capability; it results from the execution framework’s default strategy interacting with the model’s tendencies.

    3. Prompt Engineering: Writing the Two Rounds

    The first-round prompt should focus on “role + goal + deliverables + constraints.” Example (illustrative description, not executable code):

    1. Role: Senior product manager and frontend architect
    2. Goal: Replicate a general-purpose conversational AI web application
    3. Input: Target site description, capability API documentation description, optional page browsing tool
    4. Deliverables:
    5. 1) Product functional document, including an information architecture diagram
    6. 2) High-fidelity replicated page, covering both desktop and mobile
    7. 3) An independently optimized page; common industry enhancements are allowed
    8. Constraints: Do not invent APIs; all capabilities follow the documentation; structure first, code second

    The second-round prompt only adds credentials and the acceptance baseline, for example: “Credentials are ready; complete the integration and self-check.” What to watch at this point: whether abnormal inputs are constructed proactively, whether error codes and fallback paths are verified, whether the mobile layout is checked, and whether basic accessibility validation is performed.

    4. Quality Standards for the Three Deliverables

    4.1 Product Functional Document and Structure Diagram

    A qualifying document should include user roles, core task flows, information architecture, a page inventory, a component inventory, state machines (session, message, attachment, voice), API dependencies, and error handling strategy. The structure diagram should have at least three layers: entry layer, session layer, and capability layer.

    4.2 High-Fidelity Replicated Page

    Fidelity is not only about looking similar. Three things matter: whether the layout grid and spacing form a coherent system; whether interaction feedback is complete (loading, empty, error, disabled); and whether responsive breakpoints are sensible, with the mobile input area stable in position and size.

    4.3 Independently Optimized Page

    Optimization must be justified and can build on common industry practices: conversation grouping and search, message editing and regeneration, attachment previews, keyboard shortcuts, theme switching, accessibility labels, export and sharing, and observability instrumentation. Avoid piling on features that add no value.

    5. Common Defects and How to Locate Them

    • API misuse: treating parameters that do not exist in the documentation as available capabilities. This is a serious problem and should be blocked during review.
    • Missing states: only the success path is implemented, with no handling for failure or empty states.
    • Responsive degradation: on mobile, the input area is obscured, buttons are too small, or scroll locking misbehaves.
    • Poor maintainability: overly long single files, styles coupled with logic, and missing type constraints.
    • Careless acceptance: after receiving credentials, only verifying that “it returns a sentence” without covering boundaries.

    For diagnosis, maintain a defect matrix registered by “functional module × defect type × severity level,” keeping reproduction steps and screenshots so stability can be compared across combinations.

    6. Recommendations for Engineering Adoption

    To reuse this method in a real project, turn the experimental workflow into a pipeline: templatized requirements, versioned prompts, automated deliverable collection, a structured scoring sheet, and visualized results. Use a container platform to keep the runtime consistent, connect logs and metrics to a logging service with monitoring and alerting, archive artifacts in object storage, and decouple asynchronous tasks with a message queue. If voice and file parsing are involved, design timeout, retry, and fallback strategies separately.

    At the team level, write “documentation first, structure first, acceptance first” into your standards. Models and execution frameworks are only accelerators; what truly determines delivery quality is whether constraints are clear, whether acceptance is strict, and whether the team is willing to run one more round of deep testing after resources arrive.

    7. Conclusion

    Treating “replicate a conversational application” as a controlled experiment delivers value well beyond the interface itself: it simultaneously tests requirement abstraction, API comprehension, frontend engineering, and quality awareness. Two-round prompting, unified deliverables, structured scoring, and a defect matrix together form a reusable methodology. For developers, the most important conclusion is not which combination is best, but this: only under strict constraints and rigorous acceptance does the potential of models and tools truly turn into deliverable, maintainable software.