Replicating a Multi-Model Chat Application: A Technical Practice Guide

    This article presents a reusable engineering workflow for building a full-featured conversational web application using multiple model and AI coding harness combinations. It covers the three-deliverable approach (functional documentation, high-fidelity replica, and enhanced version), a two-round prompting strategy, common information architecture for chat apps, fidelity and self-verification practices, integration and acceptance checklists, a weighted evaluation framework, and common pitfalls to avoid. Readers will learn how to evaluate AI-assisted development beyond first-pass visual similarity and how to turn a working prototype into a deliverable product.

    1. Background and Problem Definition

    Once a team exposes large language model (LLM) chat capabilities through an API, a natural question follows: can an AI coding tool be used to quickly build a conversational web application that is feature-complete and close to a mature product in experience? The value of this exercise is not in copying a specific product, but in testing whether a general engineering method holds up—from requirement clarification and information architecture design to UI reproduction, capability enhancement, integration, and acceptance.

    The approach in the source material is representative: select multiple combinations of “model + AI coding harness,” produce three types of deliverables under the same constraints, and compare the results. The three deliverables are a product functional specification with a feature structure diagram, a high-fidelity conversational interface, and an enhanced version built on an understanding of the original design. This article abstracts that approach into a reusable technical workflow and fills in evaluation dimensions and engineering details the original left open.

    Note that this article does not evaluate or recommend any specific vendor product. The subject is the general technical problem of replicating and enhancing a conversational application.

    2. Overall Approach: Three Deliverables and Two Prompting Rounds

    2.1 Three Deliverables

    • Product functional document and structure diagram: defines the page inventory, functional modules, interaction states, and dependencies. It acts as the contract for downstream development.
    • High-fidelity replica: stays as close as possible to the reference implementation visually and interactively, used to verify reproduction capability.
    • Enhanced version: improves information architecture and experience based on an understanding of the original design, used to verify design judgment.

    2.2 Two-Round Prompting Strategy

    The first round provides only requirements and constraints, testing the model’s information gathering and planning ability. The second round adds runtime conditions such as API keys, testing self-verification and repair ability. The key design here is “constraint equivalence”: all combinations use the same requirements, the same acceptance criteria, and the same runtime environment to avoid variable contamination.

    A neutralized prompt skeleton example:

    1. You are a senior product manager and front-end engineer. Based on the general form of publicly available conversational applications, complete:
    2. 1) Produce a product specification: page structure, functional modules, state transitions, with a feature structure diagram;
    3. 2) Implement a high-fidelity chat interface: conversation list, message stream, input area, attachment upload, settings panel;
    4. 3) Build an experience-enhanced version on top of that understanding: improved information hierarchy, keyboard shortcuts, error messages, and accessibility.
    5. Constraints: no dependency on any proprietary API; use a generic HTTP streaming interface; plan before coding; self-test after completion.

    3. Key Finding: Fidelity and “Self-Verification Depth” Are Different Things

    A pattern recurred across the comparisons: some combinations, once given runtime conditions, performed only the most basic connectivity check and stopped as soon as it ran. Others proactively constructed boundary inputs, checked stream interruption, and verified long-context handling and attachment parsing, exposing defects and iterating on fixes. The former delivers faster but carries more hidden defects; the latter is slower but closer to a usable state.

    This yields one engineering conclusion: when evaluating AI-assisted development, do not look only at the first-pass fidelity. Also look at self-verification depth. Fidelity determines the initial similarity; self-verification depth determines whether it can be delivered.

    4. Feature Breakdown: The Common Information Architecture of Chat Applications

    Regardless of the reference implementation, a mature chat application typically includes the following modules, which can serve as the skeleton of a feature structure diagram:

    • Conversation management: create, rename, pin, archive, delete, group.
    • Message stream: multi-turn context, role distinction, code block highlighting, table and formula rendering, citation tracing.
    • Input area: multi-line auto-sizing, attachment and file parsing, shortcut to send, stop generation.
    • Generation control: streaming output, interruptible, retry, branching and version comparison.
    • Settings and account: model and parameter selection, theme, data and privacy toggles.
    • Sharing and collaboration: read-only links, permissions, and expiry.

    The structure diagram is best expressed in three layers: presentation layer (pages and components), interaction layer (states and events), and service layer (conversation storage, model invocation, file processing).

    5. Engineering Essentials for High-Fidelity Reproduction

    1. Measure before writing: use browser automation or page snapshots to extract key dimensions and hierarchy before applying styles, avoiding “reproducing by feel.”
    2. Tokenize the design: abstract colors, spacing, corner radii, and shadows into variables to ensure consistency and simplify theme switching.
    3. Responsive first: mobile input box position, bottom safe area, and virtual keyboard occlusion are frequent failure points.
    4. Complete states: empty, loading, error, rate-limited, and stream-recovery states all need corresponding UI.
    5. Accessibility: semantic tags, focus order, contrast, and keyboard reachability.

    Illustrative style variables:

    1. :root{
    2. --bg:#ffffff; --fg:#1f2328; --muted:#6a737d;
    3. --radius:12px; --gap:16px; --composer-max-height:200px;
    4. }
    5. @media (max-width:640px){
    6. .composer{ padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    7. }

    6. Enhanced Version Design: From “Looking Right” to “Working Well”

    Enhancement should not be a pile of features, but trade-offs around high-frequency pain points:

    • Information hierarchy: adjustable ratio between the conversation list and the message area; secondary metadata in long conversations collapses automatically.
    • Input experience: draft auto-save, attachment progress visualization, retry on failure.
    • Generation experience: interruptible and resumable answers, key conclusions surfaced first, one-click copy for code blocks with runtime environment notes.
    • Trust and control: expandable citation sources, a trail of parameter changes, second confirmation for sensitive actions.
    • Performance: virtual scrolling, incremental rendering, request merging and deduplication.

    7. Integration and Acceptance: Turning “It Runs” into “It Ships”

    After receiving API keys in the second round, run a minimal but effective acceptance checklist:

    1. 1 Cold start: first-screen rendering, empty-conversation guidance
    2. 2 Basic flow: send—streaming response—end state
    3. 3 Interrupt and retry: stop during generation, resume after stream break
    4. 4 Input boundaries: very long text, special characters, oversized attachments
    5. 5 Multi-turn consistency: context retention, role distinction
    6. 6 Sharing and permissions: read-only link, acceptance from a browser in another location
    7. 7 Errors and rate limits: error code messages, backoff retry

    Details like “accept the share link from a different environment” are often a hidden threshold beyond fidelity and are easy to overlook.

    To reduce subjectivity, use a weighted scorecard to compare “model + tool” combinations side by side:

    Dimension Weight What to Observe
    Fidelity 25% Layout, dimensions, component completeness
    Self-verification depth 25% Whether boundaries are proactively constructed and fixed
    Documentation quality 15% Completeness of the structure diagram and state descriptions
    Enhancement reasonableness 20% Whether real pain points are solved rather than features piled up
    Engineering standards 15% Tokenization, accessibility, error handling

    Scoring should be done independently by two or more people, then averaged, with points of disagreement recorded for later review.

    9. Common Pitfalls and How to Avoid Them

    • Context bloat: long conversations and many files crowd the window, requiring segmented summaries and on-demand loading.
    • Hallucinated APIs: the model may invent nonexistent parameters, so defer to a generic protocol and apply contract validation.
    • Environment differences: key injection, cross-origin access, proxy, and rate-limiting policies must be stated explicitly in the prompt.
    • Over-engineering: the enhanced version tends to introduce low-frequency features, so rank by usage frequency and payoff.
    • Missing acceptance: without a checklist-based self-test, defects surface all at once after delivery.

    10. Conclusion

    “Replicating a conversational application” looks like a front-end task, but it is in fact a combined exercise in requirements engineering, information architecture, protocol integration, and automated acceptance. The core lesson from the multiple runs is this: fidelity sets the starting point, self-verification depth sets the finish line. Design prompts to be “constrainable and verifiable,” split deliverables into three layers—document, replica, enhancement—and combine them with quantitative scoring and checklist-based testing. Teams can then reliably reuse this method on top of general capabilities from cloud platforms such as Baidu AI Cloud (for example, container platforms, log services, monitoring and alerting, and object storage), continuously improving the delivery quality and maintainability of AI-assisted development.