Benchmarking Open-Source LLMs for Web App Replication: Methodology and Practice
This article presents a controlled evaluation framework for testing how different open-source model and agent framework combinations replicate a conversational web application. It covers the experimental design, execution workflow, scoring dimensions, common pitfalls, and reproducible conclusions, helping readers assess model behavior beyond benchmark scores—especially whether a model proactively runs regression tests. All third-party names are abstracted, and replication is used strictly for teaching and evaluation without copying trademarks or private assets.
1. Background and Problem Definition
As open-source models continue to expand their capabilities, a common question arises: can a mature conversational web product be replicated using only a model and an agent execution framework? The core of the source material is not to recommend any product, but to pose a verifiable engineering question—when inputs are identical and the execution environment is consistent, how much do different model and framework combinations differ in understanding requirements, reproducing the interface, completing functionality, and discovering defects?
It is important to emphasize that replication is used only for teaching and evaluation: only publicly visible interactions and layouts are implemented, with no copying of any trademarks, icons, copy, or proprietary assets, and no connection to real user data. This article abstracts all third-party names as “a certain open-source model series,” “a certain AI coding tool,” and “a certain code execution framework.”
2. Unified Experiment Design: Making Differences Attributable
For an evaluation to be credible, controlling variables is key.
- Unified input: the same requirements prompt, the same API documentation description, and the same timing for supplementary information.
- Unified environment: the same browser automation environment, the same screen size matrix, and the same network conditions.
- Unified deliverables: each result must deliver three artifacts—a product feature document with a feature structure diagram, a reproduced page, and an improved page.
- Unified interaction: the first round provides only the requirements; the second round provides usable credentials, observing whether the model proactively performs regression validation.
An illustrative unified prompt (with any identifiable information removed):
You are a senior product manager and front-end engineer. Please complete three tasks:1) Output a product report: feature list, page structure diagram, and state and exception descriptions;2) Reproduce a conversational web client: keep the layout, interactions, responsiveness, and accessibility as consistent as possible;3) Output an improved version: optimize the information architecture and interactions based on general best practices.Constraints: do not copy any trademarks, icons, or proprietary copy; use placeholders instead of credentials.Provide the plan and task breakdown first, then execute; conclude with a self-test checklist.
The second round adds only one sentence: “The credentials have been placed in environment variables; please continue.” This sentence is the dividing line: some combinations make only the simplest click verification after finishing, while others run a full end-to-end regression, thereby exposing issues such as message ordering, streaming rendering interruptions, and truncation of overly long inputs.
3. Execution Workflow Breakdown
3.1 Requirement Clarification and Task Decomposition
A mature approach is to first break “replication” into acceptance-ready subtasks: page list, component tree, state machine, API contracts, and error states. If a model directly piles up code, the probability of subsequent rework rises significantly.
3.2 Product Documentation and Structure Diagram
The documentation should include at least: a feature matrix (essential/enhanced), page navigation relationships, message states (empty, loading, streaming, failure, retry), and input constraints (length, frequency). The structure diagram should use a tree or flowchart to express hierarchy, avoiding a text-only list.
3.3 Interface Reproduction
Fidelity depends on details: spacing grids, hover and focus states, mobile input area placement, scrolling and sticky-bottom behavior, and light/dark theme switching. Accessibility is also part of “reproduction,” such as focus order, contrast, and keyboard reachability.
3.4 Feature Enhancement
The improved version should be based on general practices rather than invented features: conversation grouping and search, automatic draft saving, collapsible citations, a minimal implementation of export and sharing, and a replaceable model adapter layer.
3.5 Integration and Acceptance
Use a minimal adapter layer to isolate model calls, making it easy to switch providers and perform fault injection:
// Pseudocode: a unified adapter layer for easy replacement and testingasync function* streamChat(messages, options) {const resp = await fetch(options.endpoint, {method: "POST",headers: { "Content-Type": "application/json" },body: JSON.stringify({ messages, stream: true })});const reader = resp.body.getReader();const decoder = new TextDecoder();while (true) {const { done, value } = await reader.read();if (done) break;yield decoder.decode(value, { stream: true });}}
4. Observation Dimensions and Scoring Table
It is advisable to replace “feels good” with quantifiable metrics:
| Dimension | Weight | Criteria |
|---|---|---|
| Documentation completeness | 15% | Whether features, states, and exceptions are complete |
| Reproduction fidelity | 30% | Layout, responsiveness, and interaction details |
| Feature usability | 25% | Whether the main flow is closed-loop |
| Testing depth | 20% | Whether it proactively regresses and fixes |
| Engineering standards | 10% | Structure, naming, and maintainability |
A stable phenomenon is that combinations with stronger long-context and tool-calling capabilities are more inclined to perform deep self-testing after obtaining credentials; some combinations only verify that “a message can be sent.” This explains why, even when paper capabilities are close, final delivery quality still diverges.
5. Common Pitfalls and How to Avoid Them
- Streaming rendering does not handle interruptions and reconnections, resulting in partial messages;
- Overly long inputs are not segmented or summarized, triggering truncation;
- Mobile only implements scaling without rearranging the input area;
- Missing error states cause a blank screen on failure;
- Writing credentials into front-end code, creating leakage risk.
6. Reproducible Conclusions
Under completely identical inputs and environments, the most stable overall performers are often the combinations that are “detailed in documentation, accurate in reproduction, and willing to self-test.” When selecting, do not look only at individual benchmark scores; incorporate “whether it proactively validates” into the evaluation. If an enterprise needs to handle real traffic, it can be hardened with general cloud capabilities such as container platforms, object storage, log services, and monitoring alerts, while keeping the model layer replaceable to avoid being locked into a single implementation.
