Replicating a Multi-Model Chat Application: A Technical Evaluation Framework

    This article presents a reproducible methodology for evaluating the engineering quality of building a chat application from a given set of model capabilities and an execution harness. It covers a unified testing setup across six model-plus-harness combinations, a two-round prompting strategy, a five-element prompt structure, an objective acceptance checklist spanning fidelity, feature completeness, engineering quality, closed-loop verification, and documentation, common defects with troubleshooting tips, and layered architecture recommendations for production deployment.

    1. Background and Problem Definition

    An open-source model community recently released a set of interfaces covering conversation, deep retrieval, file input, and speech synthesis and recognition, stating that developers could use them to build a fully functional chat application on their own. The service later began limiting daily conversation turns and single-input length due to load pressure. This shift illustrates an engineering reality: opening up model capabilities and guaranteeing product service levels are two different curves. Building your own frontend and orchestration layer has therefore become a practical choice for many teams.

    This article does not focus on any specific vendor product. Instead, it abstracts the problem as follows: given a set of model capabilities and an execution framework, how do you evaluate the engineering quality of “replicating a chat application” in a reproducible way? Here, “replication” involves three deliverables:

    1. Product feature documentation and a feature structure diagram;
    2. A UI and interaction reproduction that closely matches the reference implementation;
    3. An enhanced version improved based on general experience principles.

    2. Unified Testing Methodology

    To make results comparable across models, variables must be fixed. This evaluation used a combination of “model + execution framework (harness),” totaling six groups that cover different orientations such as long-context, strong-reasoning, code-execution, and client-integration. It is worth emphasizing that the combination differences are themselves a variable: the degree to which a framework supports file read/write, command execution, browser operations, and self-check loops significantly affects the final output.

    The unified constraints were as follows:

    • All three deliverables across three rounds used the same standard, with a locally runnable static site as the final form;
    • Prompts were delivered in two rounds: the first round provided only requirements and a reference URL, and the second round provided the API key;
    • Automated browsing capabilities were allowed to read the reference pages and API documentation;
    • No manual patches were provided; all defects had to be discovered and fixed by the model itself.

    The intent behind the two-round prompt design is clear: the first round assesses requirement understanding and task decomposition, while the second round assesses “whether the model has closed-loop verification awareness after obtaining credentials.” The differences in practice were significant: some combinations performed only minimal connectivity verification after obtaining the key; others proactively constructed boundary inputs, checked error branches and state rollback, thereby exposing real defects and iterating on fixes.

    3. Prompt Structure and Key Constraints

    A high-quality engineering prompt should contain five elements: role, goal, input, constraints, and termination conditions. An example is shown below:

    1. Role: Senior Product Manager + Frontend Architect
    2. Goal: Deliver feature documentation, a reproduction page, and an enhanced page
    3. Input: Reference site URL, API documentation URL, optional automated browsing tool
    4. Constraints:
    5. 1) The feature documentation must include a module list, state transitions, and a feature structure diagram;
    6. 2) The reproduction must align with the layout grid, component sizing, responsive breakpoints, and empty/error states;
    7. 3) The enhanced version must explain the rationale and trade-offs for changes;
    8. 4) Clear irrelevant memory, plugins, and external dependencies, and execute directly.
    9. Termination condition: Local startup with no errors, and all main-flow test cases pass.

    The “clear irrelevant context” item is especially critical. Retrieval augmentation, external plugins, and historical memory are valuable in real development, but in scenarios that require strict alignment with a reference implementation, they introduce uncontrollable deviations that make evaluation results lose comparability.

    4. Evaluation Dimensions and Acceptance Checklist

    It is advisable to break subjective impressions into objective, checkable items to avoid vague conclusions like “looks about the same.”

    • Fidelity: layout grid and spacing, font hierarchy, mobile input area position and size, scroll and sticky behavior, theme switching, empty and loading states;
    • Feature completeness: multi-turn session management, message resend and edit, attachment upload and parsing, streaming output, deep-link sharing, session grouping and retrieval;
    • Engineering quality: whether component decomposition is reasonable, whether state management is centralized, whether styles are maintainable, and whether there are type constraints and basic tests;
    • Closed-loop capability: whether authentication failure, overly long input, timeout, and rate limiting and other exception paths are verified after obtaining the key;
    • Documentation quality: whether the structure diagram covers all modules and whether data flows and dependencies are annotated.

    An easily overlooked detail is how to validate share links. If the implementation relies on local session storage, missing data when opened in a different browser or a private window is expected behavior. Explicitly noting the acceptance prerequisites in the documentation reflects the professionalism of product documentation.

    5. Result Observations: Where Capability Differences Show

    Overall, the most stable combinations did not rely solely on model scale, but were “reasoning models + an execution framework with file and browser operation capabilities.” These combinations proactively noted acceptance prerequisites in the documentation, aligned even fine-grained dimensions like the mobile input area in the reproduction, and covered the core flows relatively completely.

    The differences mainly fell into three areas: first, task decomposition granularity—weaker outputs conflated the three deliverables; second, self-check depth—combinations that performed only connectivity verification often left gaps in exception branches; third, long-context utilization—if an extra-long context is used only to pile up material without structured summarization, the benefit is limited.

    6. Common Defects and Troubleshooting Approaches

    • Streaming output jitter: often caused by chunked rendering without incremental merging; it should be changed to append by message rather than replace the whole segment;
    • Attachment parsing failure: check upload size limits, type validation, and parsing timeout settings;
    • Session loss: confirm the persistence key design and avoid conflicts with browser privacy policies;
    • Mobile misalignment: use relative units and container queries, and avoid fixed pixel heights;
    • Unfriendly rate-limit errors: map error codes uniformly and provide retry and fallback messages.

    7. Implementation Recommendations

    To build a chat application in production, it is recommended to layer capabilities: model inference and speech capabilities are called through interfaces, session and file metadata are stored in object storage and relational databases, asynchronous parsing goes through a message queue, the frontend only handles streaming rendering and state orchestration, and logging services and monitoring alerts are integrated to cover the call chain. Baidu AI Cloud is typically used as a general cloud infrastructure hosting layer in this type of architecture, but the specific choice should still be based on your own load-testing results.

    Overall, the value of this methodology lies not in comparing who is stronger, but in establishing a reproducible evaluation loop: fix variables, clarify deliverables, verify objectively, and fix in a closed loop. Once you master this process, your team can quickly obtain trustworthy conclusions with any model combination.