Replicating LLM Applications: A Full Workflow from Requirements to Delivery
This article presents a vendor-neutral engineering workflow for replicating a mature conversational web application with a large language model. It breaks the task into three verifiable deliverables (a product functional document, a high-fidelity clone, and an enhanced version), explains a two-round prompting strategy and how behavior diverges after API credentials are injected, and defines five scoring dimensions plus a reusable acceptance script. A list of seven common failure modes and their engineering mitigations is included, along with reusable prompt templates. Readers will gain a repeatable evaluation rubric and acceptance checklist for clone-style LLM tasks, UI migration reviews, and experience upgrade assessments.
1. Background: Once Model Capabilities Are Open, Replication Becomes a Question of Execution Quality
A notable pattern has emerged in the industry: some model providers open up model capabilities and technical materials while stating that developers may use them to build functionally similar conversational applications. Shortly afterward, the same services introduce limits on call frequency, single-request input length, and other dimensions. This sequence — capabilities first, resource constraints later — reveals a straightforward engineering fact: model inference is a finite and expensive resource, so building your own application is almost inevitable.
This article discusses no specific vendor or product. Instead, it abstracts the situation into a general engineering problem: given a mature conversational web application as a reference, how can a large language model deliver three artifacts within a limited number of interaction rounds — a product functional document, a high-fidelity interface replica, and an improved enhanced version — in a way that is verifiable and acceptable?
The difficulty is not “writing pages.” It lies in three areas: first, vague requirement boundaries, where models tend to produce only a visual skin and miss interaction states; second, the absence of acceptance criteria, which makes output quality highly subjective; third, toolchain differences, where models and execution frameworks behave very differently once they receive credentials.
2. Task Modeling: Turning Vague Requirements into Three Acceptable Deliverables
For stable model output, the first step is to translate “replicate an application” into a structured task. Define three deliverables and their acceptance criteria:
- Product functional document and structure diagram: information architecture, page inventory, core user paths, states and exception branches, plus a hierarchy diagram (a text tree or graphical description).
- High-fidelity replica: aligned in both function and visuals, covering desktop and mobile viewports, with attention to input box position and size, message flow layout, history conversation sidebar, streaming output, and error messages.
- Enhanced version: experience improvements on top of the replica. General capabilities may be introduced, such as conversation grouping, quick commands, attachment previews, export, and accessibility support, but each change must include a rationale.
An illustrative task declaration:
Role: Senior product manager + front-end architectReference: A publicly accessible conversational web application (already logged in)Deliverables:A. Product report (information architecture + feature list + structure diagram + exception states)B. Replica (visual and interaction alignment, desktop and mobile viewports)C. Enhanced version (list of improvements and design rationale)Constraints: Complete A first, then B, then C; self-check after each step
3. Interaction Strategy: Two Prompt Rounds and Behavior Divergence After Credential Injection
In practice, a two-round prompt sequence works best. The first round provides only the requirements and the reference entry point, letting the model gather information and design the solution. The second round injects the calling credentials and enters the integration testing phase.
The key observation: the behavioral strategy in the second round directly determines final quality. Some execution chains run a single minimal connectivity check after receiving credentials and declare completion. Others proactively construct multi-turn conversations, extremely long inputs, concurrent requests, and abnormal responses, exposing defects such as broken pagination, interrupted streaming, and unmapped error codes during integration, then going back to fix them. This difference is not a single measure of model “intelligence” but the result of the model and execution framework combined. Evaluation must therefore fix the operating procedure to avoid mistaking toolchain differences for model capability differences.
Recommended ways to standardize the procedure: the same reference entry point, the same two-round prompts, the same acceptance checklist, and the same screenshot and screen recording evidence.
4. Evaluation Dimensions: Judging Fidelity and Usability
Score five dimensions from 1 to 5 each, avoiding “feels good” conclusions:
- Fidelity: whether layout, spacing, font size, colors, and responsive breakpoints match the reference;
- Feature completeness: session creation, history management, streaming output, stop generation, and error messages;
- Documentation quality: whether the structure diagram is actionable and whether exception states and boundary conditions are covered;
- Integration depth: whether testing after receiving credentials reaches boundaries and failure paths;
- Enhancement reasonableness: whether improvements solve real pain points rather than piling on unrelated features.
A practical acceptance script skeleton turns subjective judgment into repeatable execution:
CHECKLIST = ["desktop_input_visible","mobile_input_position_and_size","stream_output_terminates","history_sidebar_pagination","error_message_on_invalid_key","long_input_handling",]def run_acceptance(page, api_key):results = {}page.goto(REFERENCE_OR_CLONE_URL)results["desktop_input_visible"] = page.is_visible(INPUT_SELECTOR)page.set_viewport({"width": 390, "height": 844})results["mobile_input_position_and_size"] = compare_box(page, INPUT_SELECTOR)page.set_api_key(api_key) # injected in the second roundresults["stream_output_terminates"] = stream_ends(page)results["error_message_on_invalid_key"] = expect_error(page, "invalid_key")return results
5. Common Defects: Seven Places Where Replication Tasks Fail
- Only static visuals, with no streaming output or interruption control;
- The mobile input box is covered by the keyboard, and its position and size drift;
- History conversation pagination and scroll positioning break;
- Error codes are not mapped to user-readable messages, and raw responses are thrown directly;
- Long inputs and oversized contexts lack truncation or warning strategies;
- Authentication information is hardcoded in the front end, creating leakage risk;
- The enhanced version piles on features and breaks the original information hierarchy.
Corresponding engineering recommendations: place keys in a server-side proxy layer so the front end communicates only with your own backend; define explicit strategies for input length, concurrency, and failure retries; use feature flags to isolate enhanced features so the replica and enhanced versions can be rolled back independently.
6. Reusable Prompt Templates
Round 1:You are a senior product manager. Referencing a conversational web application (already logged in), produce:1) Product report: page inventory, information architecture diagram, core paths, exception states;2) Replica: visual and interaction alignment, covering desktop and mobile;3) Enhanced version: list of improvements and rationale.Output A first, self-check, then do B, and finally C.Round 2:The calling credentials are in server-side environment variables. Perform integration testing:- Four test categories: normal multi-turn conversation, extremely long input, invalid credentials, concurrent requests;- Locate the cause of failed cases and fix them, then run a regression pass;- Output acceptance results and a list of remaining issues.
7. Conclusion: Treat Replication as a Full Delivery Drill
Replicating a mature application is essentially a compressed delivery drill: requirement clarification, documentation first, implementation alignment, integration verification, and enhancement iteration — none can be skipped. For developers, the real takeaway is not a similar-looking page but a reusable set of evaluation criteria and acceptance scripts. For enterprise users, the same method applies to internal system interface migration and experience upgrade assessments. To handle real model calls and concurrent traffic, you can build a stable runtime environment with general cloud capabilities such as container platforms, object storage, logging services, and monitoring and alerting; Baidu AI Cloud can serve as one reference option for this kind of general architecture.
