Replicating LLM Applications in Practice: From Requirements to Delivery

    This article presents a methodology for evaluating AI coding models by replicating a mature conversational web application. It covers experiment design with controlled variables, staged credential injection, deliverable breakdown, scoring dimensions, common defects, and engineering standards for moving AI-assisted development from demo to stable delivery.

    1. Background: Why Replicating a Mature Product Is a Strong Capability Test

    When a model family opens up its weights and reasoning capabilities, the community’s first instinct is usually not training but rather: “Can we turn it into a usable conversational product?” This may look like nothing more than building a UI, but it actually tests multiple facets of model capability at once: long-document understanding, UI structure extraction, state management design, API integration, cross-platform adaptation, and the closed-loop ability to self-verify after receiving real credentials. For this reason, using “replicate a mature conversational web application” as an evaluation task is closer to real engineering delivery than a pure algorithm problem.

    Note that this article does not evaluate any specific vendor or product. It discusses methodology only: how to design the task, how to standardize execution, how to quantify fidelity, and how to uncover hidden defects. Model capability descriptions are expressed in neutral terms such as “a certain class of models,” “AI coding tools,” and “general-purpose conversational applications.”

    2. Experiment Design: Controlling Variables Matters More Than Piling on Models

    The value of the original practice lies not in “how many models were used” but in the fact that it controlled the variables: the same requirements prompt, the same API documentation entry point, the same timing for supplementary information, and the same acceptance criteria. The reusable design principles are as follows.

    1. Single task objective. Produce one deliverable set and avoid changing requirements midway.
    2. Unified input. The requirements description, reference page entry point, and API documentation entry point are identical for all test subjects.
    3. Staged injection. The first round provides only the requirements; the second round provides the calling credentials, used to observe behavioral differences “after getting the keys.”
    4. Fixed acceptance. Score across four categories: feature checklist, visual consistency, interaction completeness, and robustness.

    Recommended prompt skeleton (illustrative, containing no real URLs or credentials):

    1. Role: Senior product manager + front-end architect
    2. Task: Replicate a general-purpose conversational web application (single-page application)
    3. Input: Reference page entry point (provided by the tester), API documentation entry point (provided by the tester)
    4. Deliverables:
    5. 1) Product specification: feature checklist + feature structure diagram (tree)
    6. 2) High-fidelity replica: UI, interactions, and state consistent with the reference implementation
    7. 3) Enhanced version: optimize the experience while keeping the information architecture stable
    8. Constraints: Do not fabricate APIs; mark unconfirmed capabilities as pending integration
    9. Execution: Read the docs first, then produce the structure, then write the code; gogogo

    The second round adds only one sentence: the calling credentials are configured in environment variables, please integrate and test them yourself. This single sentence significantly changes the behavior distribution, as detailed later.

    3. Deliverable Breakdown: What Each of the Three Outputs Tests

    The product specification tests abstraction ability. A qualified document should include global layout regions, the data model for sessions and messages, the state machine for streaming output, attachment and multimodal entry points, the parameter panel, sharing and export, and authentication and quota notices. The feature structure diagram should use a tree hierarchy rather than a block of prose, making it easier to map to a component tree later.

    The replica tests fidelity. The real difficulty lies not in the home page but in the details: whether the input box automatically sticks to the bottom on narrow screens, whether long messages collapse, whether code blocks have copy buttons and horizontal scrolling, whether the button state correctly rolls back after generation is stopped, and whether sessions are restored after a refresh.

    The enhanced version tests judgment. The low-quality approach is to pile on features randomly; the high-quality approach is to first state “which changes do not break the original information architecture,” then give the rationale for the changes and a rollback switch.

    4. Key Difference: Behavioral Divergence After Receiving Credentials

    Under a standardized execution protocol, test subjects exhibit two types of strategies in the second round. The first type performs only minimal connectivity verification and stops once the request succeeds. The second type performs boundary and exception verification, such as overly long input, concurrent requests, error code branches, and stream interruption and reconnection, thereby exposing defects and going back to fix them. The latter is closer to real delivery, because most production failures come from edge cases rather than the main path.

    The engineering takeaway is direct: an evaluation task must include a “credential injection” stage; otherwise, what you are testing is only code generation, not integration and self-verification ability.

    5. Evaluation Dimensions and Quantitative Suggestions

    A 100-point scale is recommended, with weights adjustable according to team goals:

    • Feature coverage 30: whether the core flow is closed-loop, and whether missing items are explicitly marked.
    • Visual consistency 20: layout grid, spacing, font size hierarchy, dark mode.
    • Interaction completeness 20: streaming rendering, interruption, retry, keyboard shortcuts.
    • Robustness 20: exception code handling, input validation, empty and error states.
    • Documentation quality 10: whether the structure diagram matches the implementation.

    Fidelity can be scored with the help of automatable methods, such as screenshot structure comparison of key regions and tree similarity calculation of component hierarchy, to reduce subjective bias.

    6. Common Defect Checklist (Can Be Used Directly as an Acceptance Table)

    1. Streaming output does not handle interruption, and the UI stays stuck in “generating.”
    2. The session list and current message state are out of sync, and content is misaligned after switching.
    3. Only the desktop version is implemented, and the input box is obscured by the keyboard on narrow screens.
    4. Error branches are missing, and there is no prompt at all when the API fails.
    5. The documentation is inconsistent with the implementation, and the structure diagram remains at the initial draft.
    6. Credentials are hard-coded into the front-end build, creating a leakage risk.

    7. Actionable Engineering Standards

    Credentials should only go through environment variables or a key management service, and no plaintext may appear in the front-end build. On the calling side, timeouts, retries, and rate limiting should be uniformly encapsulated. Logging services should record the request chain but desensitize it. Monitoring and alerting should cover error rate and time to first token. If throughput needs to scale, stateless services can be elastically scaled out using a container platform, message queues can smooth out peaks, and object storage can host attachments. The above are all general capability categories, and specific choices should be evaluated by the team itself.

    8. Conclusion

    “Replicating a mature application” is a good task because it compresses product abstraction, UI fidelity, API integration, and exception handling into a single delivery. What truly separates the field is often not whether the first screen looks good, but whether one is willing to do deep verification after receiving credentials. Solidifying controlled variables, staged injection, and quantitative acceptance into the process is what allows AI-assisted development to move from demo to stable delivery.