Evaluating LLM App Replication: Methods and Practices
This article presents a practical framework for evaluating how well AI agents can replicate a full-featured conversational application using only a set of model capability APIs. It covers a two-round prompt design that separates generation from integration testing, explicit scoring dimensions, a staged agent workflow, common defect patterns, and team-level practices for making the evaluation repeatable. Readers will learn why testing depth matters more than generation speed, and how interface abstraction and acceptance checklists lead to consistent, verifiable results.
1. Background and Problem Definition
When a model vendor exposes capabilities such as conversation, search augmentation, file parsing, speech synthesis, and speech recognition through open APIs, a natural question arises: can developers use these atomic capabilities to assemble a fully functional conversational application in reverse? The original material treats this as a horizontal evaluation—using multiple combinations of “model + agent execution framework” to complete the same replication task, then comparing the results. Stripping away specific product attributes, the proposition can be abstracted into a general engineering problem:
Given a set of model capability APIs, how can an agent autonomously complete the full loop from requirement understanding and documentation to UI reproduction and integration testing, with results that are comparable and reviewable?
The difficulty lies not in “writing pages” but in three things: requirement consistency under long context, instruction following and self-correction across multiple turns, and whether the agent is willing to perform genuine end-to-end verification once credentials are provided.
2. Evaluation Design: Turning Subjective Impressions into Observable Metrics
The original test provided two rounds of prompts: the first round gave only the requirements, and the second round supplied the calling credentials. This design is critical because it splits “can it be written” from “can it run” into two stages, and it is worth keeping and strengthening.
The first-round task can be broken into three deliverables:
- A product feature document and feature structure diagram covering information architecture, page hierarchy, and state transitions;
- A high-fidelity reproduction with interactions and layout aligned to the reference site;
- An enhanced version that may introduce external best practices but must explain the rationale for each change.
The second round only adds credential information, and the model’s spontaneous behavior is observed. This is where the most valuable divergence appears: some combinations make changes and deliver after running only a minimal connectivity check; others construct multiple sets of inputs, cover exception branches, discover issues such as missing empty-state handling, long-text truncation, and concurrent request races, and then go back and fix them.
It is advisable to make the scoring dimensions explicit to avoid “looks good” conclusions:
| Dimension | Observation Point | Judgment Method |
|---|---|---|
| Requirement coverage | Whether the feature document omits branches | Item-by-item comparison against the structure diagram |
| Reproduction accuracy | Layout, control dimensions, responsive breakpoints | Screenshot comparison across multiple resolutions |
| Instruction following | Whether constraints like “clear existing skills and plugins” are executed | Inspecting artifact dependencies |
| Testing depth | Whether exception cases are actively constructed | Counting case types |
| Maintainability | Directory structure, state management, error handling | Code walkthrough |
3. Execution Chain Breakdown: A Reusable Agent Workflow
To make different combinations compete under the same standard, it is best to solidify the process into a staged pipeline where each stage has clear artifacts and acceptance gates:
Requirement parsing → Information architecture → Documentation → Skeleton setup → Style reproduction→ API layer abstraction → Credential integration → Integration testing → Defect loop → Delivery notes
Among these, “API layer abstraction” is the most easily overlooked yet most impactful stage for maintainability. It is recommended to converge data access into a unified adapter layer during the reproduction stage, so that switching models or vendors later only requires changing one place:
// Unified adapter layer: hides vendor-specific differencesexport async function chatCompletion({ messages, stream = true, signal }) {const res = await fetch('/api/chat', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ messages, stream }),signal,});if (!res.ok) throw new Error(`upstream error: ${res.status}`);return res.body; // handed to the upper layer for incremental rendering}
The benefit is that when credentials are injected only in the second round, the change surface is compressed to configuration and the gateway rather than business code, and differences in the model’s “execution ability” become immediately apparent.
4. Key Differences: Why Testing Depth Matters More Than Generation Speed
The most insightful observation from the original test is that different behavioral strategies after receiving credentials lead to quality stratification. This reflects strategy differences among agent frameworks, which can be grouped into three types:
- Minimum-pass type: The goal is to get the chain to return 200 as quickly as possible, ending after one verification. The advantage is speed; the drawback is that defects remain in production.
- Scenario-coverage type: Actively constructs boundary inputs such as extremely long text, empty files, invalid encoding, and reconnect after network loss, exposing problems early.
- Refactor-and-optimize type: Beyond coverage, revisits the architecture, for example changing polling to incremental streaming rendering, and adding request cancellation and retry backoff.
Engineering practice should encourage the latter two types. An acceptance checklist can be explicitly added to the prompt to turn “active testing” into a hard constraint:
After integrating credentials, the following must be completed:1. Normal multi-turn conversation and interruption recovery;2. Degradation prompts for extremely long input and empty input;3. Fallbacks when file parsing fails or speech capabilities are unavailable;4. A defect list and fix record.
5. Common Defect List and Mitigation
Problems that recur in horizontal evaluations share common traits, and addressing them in advance can save significant time:
- Session state is inconsistent with local storage, and history becomes disordered after refresh; persist the session identifier together with a version number.
- Streaming output does not handle interruption, and writing continues after the user switches pages; a cancellable request context is needed.
- Error messages directly expose upstream payloads, leaking structural details; unify error codes and user-readable messages.
- The mobile input area is obscured by the keyboard; use viewport height variables instead of fixed pixels.
- Share links depend on a specific session state and fail in a different environment; acceptance preconditions must be noted in the documentation.
6. Implementation Recommendations: Making the Evaluation a Repeatable Team Capability
To reuse this method within a team, three things are recommended. First, solidify prompt templates and acceptance checklists so results from different people are comparable. Second, build a regression test set that turns each discovered defect into an automated test. Third, externalize credentials and configuration, injecting them via environment variables or a configuration center, and never hardcode them into frontend artifacts.
export MODEL_ENDPOINT="https://your-gateway.example/api"export MODEL_API_KEY="<from-secret-manager>"# Build-time injection only; never persist to static assets
On the deployment side, a container platform can host the stateless frontend and gateway, object storage can hold static assets, and logging and monitoring with alerting can track error rates and time-to-first-token, forming an observable loop.
7. Conclusion
The real value of this replication experiment is not deciding “who drew it more accurately,” but validating a path: when capabilities are exposed as APIs, the gap among agents is mainly reflected in requirement consistency, engineering standards, and testing depth, rather than the volume of code generated. By staging the process, abstracting the interface layer, and formalizing acceptance checklists, any combination of model and execution framework can reliably produce usable results; whether one is willing to do a few more rounds of real integration testing after receiving credentials is the watershed that determines delivery quality.
