Building a Multi-Model Conversational App: A Technical Practice Report

    This article presents a technical approach to replicating and enhancing a conversational web application using multiple large language models and coding toolchains. It covers the test design across six model-and-tool combinations, key differences in autonomous verification behavior, prompt engineering structure, and the three required deliverables: a feature document with an information architecture diagram, a runnable streaming chat frontend, and a measurable enhanced version. It also outlines a layered acceptance and scoring method, common failure patterns, and general cloud deployment recommendations. Readers will find practical guidance on organizing AI coding workflows with verifiable standards.

    1. Background: Replication-Style Engineering in an Open-Source Ecosystem

    A recent industry discussion has focused on rebuilding a complete conversational application from publicly available open-source model capabilities. After model weights and technical materials are released, developer communities begin reconstructing the full stack: web interaction, session management, streaming output, and the API call chain. This is not simple copying, but a typical reverse-engineering exercise: starting from observable product behavior, inferring feature boundaries, information architecture, and API contracts, then implementing them with a general-purpose technology stack.

    At the same time, some users have reported that certain online services now enforce usage limits, such as daily conversation counts and maximum input length. This indirectly confirms that model inference resources are finite and cost-sensitive, making self-hosted applications, capacity planning, and degradation strategies practically meaningful.

    Setting aside specific product attributes, this article abstracts the topic into a general technical question: how to organize multiple large models and intelligent coding tools to collaboratively replicate and enhance a conversational application, and establish a comparable, reproducible evaluation method.

    2. Test Design: Six “Model + Toolchain” Combinations

    To observe the engineering performance of different combinations, a controlled experiment can be designed with six capability groups (described generically):

    1. A lightweight, high-speed model + a multi-agent collaboration mode;
    2. A high-reasoning model + a code-execution tool;
    3. A high-reasoning model (alternative strategy) + a code-execution tool;
    4. An ultra-long-context model (around 960K tokens) + a client-form tool;
    5. A standard long-context model + a client-form tool;
    6. A general commercial LLM + the vendor’s built-in application environment.

    Each group must produce three deliverables:

    • A product feature document and information structure diagram;
    • A runnable conversational web frontend;
    • An enhanced version improved based on self-assessment.

    Prompts are delivered in two rounds: the first round provides only the requirements and a reference entry point (a logged-in browsing environment); the second round adds API keys. The difference between the two rounds is the key window for observing a model’s “autonomous verification awareness.”

    3. Key Observation: What Models Do After Receiving the Keys

    The most valuable difference appeared in the second round. Some combinations, after obtaining the keys, performed only minimal connectivity checks (sending one request and printing the response) before declaring completion. Others proactively constructed more complete test cases: multi-turn context, ultra-long inputs, error codes, concurrent requests, stream interruption and reconnection, and thus found defects during self-testing and iterated on fixes.

    This shows that evaluating a model’s engineering ability requires more than checking “whether it can generate code.” It also requires examining:

    • Whether it has a verification-driven habit;
    • Whether it proactively covers boundary conditions;
    • Whether it can locate problems from failure messages rather than repeatedly tweaking prompts.

    It must be emphasized that the operating conditions must be unified: the same prompts, the same environment, and the same acceptance checklist are required for comparability.

    4. Prompt Engineering: Writing the “Product Manager” Role Clearly

    The first-round prompt of the original task can be abstracted into the following structure (illustrative):

    1. Role: Senior product manager + front-end architect
    2. Goal: Replicate a conversational web application
    3. Input: Target site entry (logged in), API documentation entry
    4. Available capabilities: Browser automation browsing, code read/write and execution
    5. Deliverables: Feature document, structure diagram, runnable page
    6. Constraints: Research first, then design, then implement; do not fabricate APIs

    The key points are threefold: clear role, accessible input, and verifiable deliverables. Missing any of these easily leads a model to “generate an interface from imagination.”

    5. Deliverable 1: Feature Document and Information Structure Diagram

    The feature document should include the following sections:

    • User roles and usage scenarios (anonymous/logged-in, individual/team);
    • Core task flows: create a session, send a message, receive streaming output, stop generation, retry, export;
    • Session management: list grouping, rename, delete, search, pin;
    • Input area capabilities: multimodal attachments, length limits, keyboard shortcuts, draft saving;
    • States and exceptions: rate-limit prompts, network interruption, authentication expiration, content policy blocking;
    • Non-functional requirements: first-screen latency, streaming token interval, availability targets, logging and monitoring instrumentation.

    The structure diagram can be expressed with Mermaid for easier review:

    1. graph TD
    2. A[Session List] --> B[Main Conversation Area]
    3. B --> C[Streaming Message Rendering]
    4. B --> D[Input and Attachments]
    5. D --> E[Request Orchestration Layer]
    6. E --> F[Auth and Rate Limiting]
    7. E --> G[Model Invocation Adapter]
    8. G --> H[Error and Retry Strategy]

    6. Deliverable 2: Frontend Implementation Essentials

    A usable conversational frontend should be split into three layers: “components + state + adapter”:

    1. Component layer: session sidebar, message list, Markdown rendering, code highlighting, input box;
    2. State layer: normalized storage of sessions and messages, optimistic updates, generating-state machine;
    3. Adapter layer: unified request encapsulation that hides differences between APIs.

    An illustrative streaming rendering implementation:

    1. async function streamChat(payload, onDelta, signal) {
    2. const resp = await fetch('/api/chat', {
    3. method: 'POST',
    4. headers: { 'Content-Type': 'application/json' },
    5. body: JSON.stringify(payload),
    6. signal
    7. });
    8. if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
    9. const reader = resp.body.getReader();
    10. const decoder = new TextDecoder();
    11. while (true) {
    12. const { done, value } = await reader.read();
    13. if (done) break;
    14. onDelta(decoder.decode(value, { stream: true }));
    15. }
    16. }

    Engineering practice also needs to handle: generation interruption (AbortController), scroll anchoring, duplicate content debouncing, and virtual lists for ultra-long text.

    7. Deliverable 3: How the Enhanced Version Delivers “Improvement”

    Enhancement should not mean “adding animations,” but should target measurable weaknesses:

    • First screen: route-level code splitting, lazy loading of fonts and icons;
    • Interaction: optimistic updates and rollback on failure for message sending;
    • Reliability: exponential backoff retries, timeouts, and circuit breaking;
    • Observability: instrumentation reporting time-to-first-token, error rate, and retry rate;
    • Cost: input length trimming, context summary compression, and cache reuse.

    8. Evaluation Method: Layered Acceptance and Scoring

    Four-layer acceptance is recommended:

    Layer Check Items Pass Criteria
    L1 Runnable Startup, build, basic conversation No blocking errors
    L2 Feature completeness Session management, streaming, stop Full coverage of main flows
    L3 Robustness Error codes, network loss, ultra-long input Clear degradation behavior
    L4 Engineering quality Layered structure, logging, maintainability Reviewable and extensible

    Scoring dimensions can be set as: requirement understanding 20%, feature completeness 25%, robustness 25%, code quality 20%, autonomous verification 10%. “Autonomous verification” is used to distinguish “submit right after writing” from “test before submitting.”

    9. Common Failure Patterns and How to Avoid Them

    • Fabricating APIs: defining fields without reading the documentation. Avoidance: require an API contract summary first.
    • Static pages only: no state, no streaming. Avoidance: write the acceptance checklist into the prompt.
    • No testing after receiving keys: ending at minimal connectivity. Avoidance: require a self-test report and failing cases.
    • Context overflow: long sessions error out directly. Avoidance: sliding window + summary compression.
    • Infinite retries: amplifying failures. Avoidance: backoff + limits + circuit breaking.

    10. Cloud Deployment Recommendations (General Capability Perspective)

    To formally host this in the cloud, general capability categories can be combined: a container platform to host the frontend and gateway, object storage for static assets and attachments, a message queue for peak shaving, logging services and monitoring alerts for observability, a key management service to host credentials, and a gateway layer for authentication and rate limiting. This both controls inference costs and maintains stability during peak periods.

    11. Conclusion

    “Replicating a conversational application” is a high-quality comprehensive exercise: it simultaneously tests requirement abstraction, information architecture, API understanding, frontend engineering, and the self-testing loop. The value of comparing multiple model groups lies not in selecting a single winner, but in exposing the trade-offs of different strategies—some excel at rapid output, others at digging out defects. Putting acceptance criteria upfront and treating the self-test report as a deliverable is the key to making AI coding truly controllable.