How to Replicate LLM Applications and Evaluate the Results: A Practical Framework

    This article presents a practical framework for replicating LLM-powered chat and voice applications as an engineering exercise. It defines three deliverables (a product feature document, a high-fidelity replica, and an improved version), explains a two-round prompting strategy with and without API keys, and lists five scoring dimensions such as structural fidelity, interaction consistency, and self-verification depth. It also covers quota-aware engineering practices and explains why evaluation results must be read together with the execution framework's strategy.

    1. Background: Once Model Capabilities Are Exposed as APIs, Replication Becomes a Practical Engineering Exercise

    A notable pattern has recently emerged in the industry: some model service providers now expose capabilities such as conversation, retrieval, file parsing, text-to-speech, and speech recognition through application APIs, and their documentation explicitly permits developers to build their own chat products on top of these interfaces, including clients that closely resemble the official experience. The underlying shift is that model capability is moving from a “single chat window” to a composable set of capabilities. Developers no longer face a black-box question box, but a group of atomic capabilities that can be orchestrated.

    The practical constraints that come with this are equally clear. As the number of trial users grows quickly, providers often apply rate limits through daily call quotas, maximum input length per request, and concurrency caps in order to balance service quality against inference cost. This does not reduce the value of the replication exercise; it pushes it in a more pragmatic direction: how to deliver a complete experience under a limited quota using engineering means.

    This article is not about any specific product. Instead, it abstracts the matter into a general technical question: given a set of conversation and voice-related API capabilities, how can you use an LLM together with AI coding tools to build a web application that matches the reference in functionality and can be optimized in experience, and then quantitatively evaluate the output produced by multiple models and execution frameworks?

    2. Task Definition: Three Deliverables Form a Complete Loop

    The first step in evaluation design is to break the vague request to “replicate something” into deliverables that can be accepted or rejected. Three types are recommended:

    1. Product feature document and structure diagram: describes which modules the target application has, the hierarchy and navigation between modules, and which API capabilities each module depends on.
    2. High-fidelity replica: stays consistent with the reference application in layout, interaction paths, and state feedback.
    3. Improved version: builds on an understanding of the original design and proposes and implements optimizations for usability problems.

    The three deliverables correspond to “comprehension,” “reproduction,” and “creativity,” and missing any one of them distorts the evaluation conclusion. A document alone shows the model is good at analysis but lacks engineering delivery; a replica page alone shows the model can imitate but lacks abstraction; an improved version alone shows the model leans toward subjective elaboration, making it hard to judge how deeply it understood the original requirements.

    3. Evaluation Design: Variable Control and Two Prompting Rounds

    For conclusions to be credible, variables must be controlled. The recommended approach is to fix the task, fix the deliverables, and fix the number of interaction rounds, changing only the combination of “model + execution framework.”

    First round: requirements only, no keys. The goal is to observe how the model behaves without execution conditions: whether it plans proactively, whether it produces the document before writing code, and whether it explicitly lists the information still needed.

    Second round: supply the API keys. The goal is to observe how strategies diverge once the model has execution capability. Two typical behaviors appear in practice: one performs only minimal connectivity verification and stops once calls return normally; the other proactively constructs boundary inputs, verifies exception branches, and checks how long text and file parsing behave, thereby exposing defects and going back to revise the implementation.

    This difference is not simply a matter of “who is smarter,” but of differing default orientations in the execution framework’s verification strategy. Evaluators should keep operations consistent and record the strategy difference itself as an observation item.

    A schematic prompt structure is shown below (neutralized, with no specific URLs or model names):

    1. Role: Senior product manager + front-end engineer
    2. Goal: Replicate a conversational web application and produce an improved version
    3. Input: Accessible entry point of the reference application (provided locally by the evaluator), API capability documentation
    4. Deliverables:
    5. 1) Product feature document + feature structure diagram
    6. 2) High-fidelity replica pages
    7. 3) Experience-optimized pages
    8. Constraints: Output the plan and file list first, then write code; I will provide the API keys in the second round

    4. Observation Dimensions: How to Judge Whether the Replication Is Good

    Scoring across five dimensions is recommended, rather than drawing conclusions from screenshots alone.

    • Structural fidelity: whether page hierarchy, navigation placement, and the relationship between the sidebar and the session list are consistent.
    • Interaction consistency: whether paths such as send, stop generation, regenerate, reference a file, and switch sessions form complete loops.
    • Responsive behavior: whether the position, size, and sticky-to-bottom behavior of the input box on desktop and mobile match. This is the most easily overlooked aspect and the one that best reflects attention to detail.
    • API orchestration: whether conversation, retrieval, file parsing, and voice capabilities are split and encapsulated by responsibility instead of being piled into a single call.
    • Self-verification depth: whether exception scenarios are constructed proactively and whether reproducible verification records are left behind.

    A practical technique is “acceptance in a different environment”: a shared link often works perfectly in the generator’s local environment, and problems appear only after switching browsers or networks, such as dependencies on local cache, cross-origin configuration, or login state. Adding this item to the acceptance checklist filters out a large number of “seemingly runnable” pseudo-completions.

    5. Interpreting Results: Profiles of Different Combinations

    Under uniform operations, each combination shows a stable profile. The most consistently strong performers usually share three traits: the document proactively notes acceptance caveats, the replica matches mobile details closely, and the core flows are complete and usable. Such results indicate the model is not only doing visual imitation but also inferring requirements.

    Another combination performs only the simplest verification after receiving the keys, producing something usable but unpolished; yet another tests deeply and iterates on fixes, ultimately surpassing others in implementation quality. This suggests that evaluation conclusions must be interpreted together with the execution framework’s strategy, otherwise framework differences are easily mistaken for differences in model capability.

    6. Engineering Recommendations

    To turn this kind of exercise into a deliverable project, four things should be added:

    1. Layered capability encapsulation: split conversation, retrieval, files, and voice into independent adapter layers to make replacement and quota-based degradation easier.
    2. Quota and degradation strategy: in the face of call limits, design queuing, caching, context trimming, and feature switches to keep core paths available.
    3. Observability: connect logging services and monitoring alerts, and record call latency, failure rate, and input length distribution to provide a basis for optimization.
    4. Security boundaries: keys must never be shipped to the front end or delivered to the client, and should be proxied and forwarded uniformly by the server.

    For cloud implementation, container platforms can host services, object storage can hold files, message queues can smooth traffic peaks, and logging and monitoring systems can provide observability. These general capability categories are sufficient to support a stable replicated application.

    7. Conclusion

    Replication may look like imitation, but it is in substance a complete engineering drill: from requirement abstraction to API orchestration, from front-end reproduction to automated verification. The capabilities Baidu AI Cloud emphasizes in model services and engineering practice, such as capability layering, observability, and stable delivery, align with the goals of this evaluation method. For developers, the real takeaway is not reproducing a particular page, but forming a transferable set of evaluation and delivery standards. That is what allows ideas to be turned into usable products reliably in an environment where model capabilities keep opening up.