Replicating LLM Applications: Evaluation Methods and Engineering Best Practices

    This article presents a practical framework for replicating a conversational AI application using large language models. It covers how to break down the target application into verifiable capabilities, design controlled-variable evaluations with two prompt rounds, and define acceptance criteria for three deliverables: a product feature document, a high-fidelity replica page, and an improved page. It also outlines common failure modes, mitigation strategies, and engineering recommendations for turning the output into a maintainable project.

    1. Background: Why Replicating a Conversational Application Is Worth Doing

    When an open-source model community releases a set of interfaces covering conversation, deep-thinking retrieval, file input, speech synthesis, and speech recognition, and states that developers can use them to build a fully functional conversational application, the first question many teams ask is not “Can it run?” but “Can it match the live product almost exactly?” The value lies not in copying a UI, but in stress-testing three things at once: the model’s ability to decompose complex requirements, the agent framework’s execution stability on long tasks, and the rigor of the team’s own acceptance system.

    This article does not evaluate or recommend any specific vendor’s product. Instead, it abstracts the original scenario into a general engineering problem: given the public entry points and interface documentation of a mature conversational AI application, how can an LLM produce three deliverables — a product feature document with a structure diagram, a high-fidelity replica page, and an improved page — and how can their quality be judged using a consistent standard? The same method applies to rebuilding internal tools, benchmarking competitor capabilities, and rapid prototype validation.

    2. Capability Breakdown: What Does the Target Actually Include

    Before starting, “replication” must be broken down into verifiable granularity; otherwise, evaluation results degrade into subjective impressions. Build a checklist across four dimensions.

    • Core conversation flow: new session, multi-turn context retention, streaming message output, stop generation, regenerate, message editing and branching.
    • Input and attachments: text input, long text and file upload, attachment parsing status, retry on failure, and error messages.
    • Capability toggles: switching and status display for deep-thinking mode, web retrieval mode, voice input, and voice playback.
    • Account and sharing: login state, conversation history list, rename and delete, share link generation and access control.

    Write the checklist as a table labeled “must have / recommended / optional,” and use it as the anchor for all subsequent comparisons. In practice, what truly separates solutions is often not the core flow but the edge cases: error states, empty states, loading states, and mobile adaptation.

    3. Evaluation Design: Controlling Variables Matters More Than Stacking Models

    The original practice used six combinations of “model + agent framework,” with the same two rounds of prompts for all. The key advantage of this design is controlled variables: identical tasks, identical inputs, and identical acceptance criteria, with differences coming only from the model and framework strategies. A few points should be added in practice.

    The first-round prompt only describes the requirements and the publicly accessible entry points, with no keys provided. This reveals whether the model proactively asks questions, whether it produces documentation before writing code, and whether it plans the directory structure on its own. The second round provides credentials to observe how the model self-tests. A typical divergence appears here: some combinations only run the simplest path after receiving credentials, while others construct boundary cases, exposing issues such as interrupted streaming output, failed attachment parsing without rollback, and share links being invisible in a logged-out environment.

    The structure of the two prompt rounds is shown below:

    1. # Round 1: Requirements
    2. You are a senior product manager and front-end engineer. Based on the public entry points and interface documentation:
    3. 1) Produce a product feature document including a feature list and a product feature structure diagram;
    4. 2) Implement a high-fidelity replica page with layout and interactions as consistent as possible;
    5. 3) Produce an improved page that may introduce general best practices.
    6. Do not fabricate interfaces; mark uncertain fields as to be confirmed.
    7. # Round 2: Credentials and Self-Testing
    8. API credentials have been placed in environment variables. Complete end-to-end self-testing,
    9. covering at least: normal multi-turn conversation, very long input, attachment failure, reconnect after network loss, and mobile viewport.
    10. Fix any issues found and run regression tests.

    4. Acceptance Criteria for the Three Deliverables

    To make conclusions reproducible, define quantitative and semi-quantitative metrics for each deliverable.

    Product feature document: whether it covers all “must have” items; whether the structure diagram has clear hierarchy; whether it marks state machines and exception branches; whether it distinguishes front-end interactions from back-end capability dependencies.

    Replica page: layout fidelity (grid, spacing, font hierarchy), interaction consistency (keyboard shortcuts, scrolling behavior, focus management), responsive behavior (position and size of the input area on narrow screens), and accessibility (contrast, semantic tags, keyboard reachability).

    Improved page: whether improvements are justified rather than a pile of features; whether it introduces general capabilities such as conversation retrieval, message branching, export, and accessibility enhancements; whether it keeps the information architecture understandable and avoids treating “more” as “better.”

    A practical technique is to record operation videos and compare them frame by frame, while running automated checks with the same set of scripts to reduce misjudgments based on “looks about the same.”

    5. Common Failure Modes and How to Avoid Them

    • Interface hallucination: fabricating nonexistent parameters or paths. Mitigation: enforce “mark as uncertain if unsure” in the prompt and verify against the documentation during code review.
    • Narrow test coverage: only validating the ideal path. Mitigation: provide a minimal acceptance test set and include exception states in the definition of done.
    • Mobile layout breakage: perfect on desktop, misaligned on narrow screens. Mitigation: include a viewport matrix in build validation.
    • Missing share and login states: share links must be validated in a different browser or a logged-out environment, or they are easy to miss.
    • Documentation-implementation drift: writing documentation first and then changing code without synchronization. Mitigation: generate documentation from structure and routing information to maintain a single source of truth.

    6. Engineering Implementation Recommendations

    Only by incorporating the replication output into a standard engineering structure can it truly be handed to a team. A recommended layering: an interface adaptation layer handling authentication, retries, timeouts, and rate limiting; a session state layer handling context trimming and persistence; a rendering layer distinguishing streaming fragments from final messages; and an observability layer using logging services and monitoring alerts to record time to first token, failure rate, and parsing latency. If files and voice are involved, they can be routed to object storage and streaming processing pipelines respectively, avoiding large files blocking the main thread.

    For team collaboration, having one agent handle documentation and structure while another handles implementation and self-testing, followed by human acceptance, is often more stable than a single long task. For context management, use an “outline + sharded tasks” approach: reserve long context for key decisions and delegate details to searchable local files.

    7. Conclusion

    The answer to “Can it be replicated?” depends on whether the evaluation design is rigorous, whether the acceptance criteria are quantifiable, and whether exception states are treated as first-class citizens. For developers, the real takeaway is not a similar page, but a reusable method: break down capabilities first, control variables next, unify acceptance criteria, and engineer the output. If deployment in the cloud is needed, general capabilities such as container platforms, object storage, logging services, and monitoring alerts can be used for deployment and operations; general product categories from Baidu AI Cloud may also serve as a reference for hosting selection.