Evaluating LLMs on Web App Replication: A Practical Framework and Findings
This article presents a reusable evaluation framework for testing how well LLMs, paired with execution harnesses, can replicate a conversational web application. It covers the rationale behind choosing replication as a benchmark, how to control variables and define deliverables, prompt engineering techniques that turn vague requirements into an acceptance contract, a closed-loop execution workflow from browsing to self-testing, three typical behavior patterns observed across model and harness combinations, common defects with root causes and fixes, and engineering recommendations for adopting this evaluation as a repeatable pipeline in a team.
1. Background: Why Replicating a Conversational Web App Is a Strong Evaluation Task
When an open-source project released both application-layer interfaces and voice capabilities, the community raised an interesting question: can intelligent coding tools be used to build a 1:1 replica of a mature conversational product? The value of this question is not that copying a page is difficult, but that it stress-tests four capabilities of the model and toolchain at once:
- Long-context understanding: the model must read the product pages, API documentation, and an existing codebase at the same time.
- Multimodal interface restoration: layout, spacing, responsive breakpoints, and dark mode all need to match.
- Engineering closure: writing code is only the start; the app must also launch, self-test, and have bugs fixed.
- Product abstraction: beyond restoration, the model should propose reasonable improvements rather than pile on unrelated features.
For this reason, this article strips away the specific product attributes and abstracts the task into a reusable evaluation framework: given a reference system, different “model + execution harness” combinations produce three deliverables — a functional document with a structure diagram, a high-fidelity replica page, and an improved version of the page.
2. Evaluation Design: Variable Control and Deliverable Definitions
Credible conclusions depend on controlling variables. The following elements should be fixed:
- Unified input: the same requirements prompt, the same entry point to the API documentation, and the same logged-in browser environment.
- Unified rounds: the first round provides only the requirements; the second round adds runtime prerequisites such as keys.
- Unified deliverables:
- A product functional specification plus a functional structure diagram (expressed with Mermaid or a hierarchical list);
- A replica page that closely matches the reference system in both functionality and UI;
- An improved page that may introduce reasonable enhancements after web research.
It is worth stressing that providing keys only in the second round is a critical design choice: it exposes the real behavioral differences among models once the app becomes runnable. Some perform only minimal connectivity checks, while others proactively run regression tests, uncover boundary defects, and iterate. This is a difference in strategy rather than absolute superiority, but in real engineering the latter usually delivers more stable quality.
3. Prompt Engineering: Turning a Vague Requirement into an Acceptance Contract
The core structure of the original task prompt is: role definition + reference entry point + documentation entry point + three outputs + constraint clearing (no reliance on historical memory or existing plugins). It can be abstracted into the following template:
You are a senior product manager and front-end engineer.Reference system: <page entry>; API documentation: <documentation entry>.Please produce:1) A feature list and functional structure diagram;2) A replica consistent with the reference system;3) An improved version based on best practices.Constraints: do not rely on any historical context or external plugins; execute directly.Acceptance: list how you will verify (cross-browser, mobile, error states).
There are three key improvements. First, specify the acceptance method explicitly to avoid treating “looks similar enough” as done. Second, require the model to output a feature list table (feature name / trigger path / state branches) so results can be compared item by item. Third, require an explanation of unimplemented items and the reasons, to prevent silent degradation.
4. Execution Workflow: A Closed Loop from Browsing to Self-Testing
A robust execution chain typically looks like this:
- Information gathering: use a controlled browsing tool to read page structure and documentation, extracting routes, component hierarchy, and the state machine (empty / loading / error / streaming output).
- Structure modeling: produce the functional structure diagram and a data model sketch before writing code, to reduce rework.
- Layered implementation: layout layer (grid and breakpoints), interaction layer (auto-sizing input box, streaming message rendering), capability layer (session management, attachment upload, placeholders for voice input and output).
- Self-testing and debugging: start the local service and run the checklist; after receiving keys in the second round, verify with real API calls.
- Difference explanation: output the differences from the reference system and the rationale for trade-offs.
An illustrative acceptance checklist can be written as:
const checklist = ["Desktop first-screen layout matches the reference","Mobile input box position and size are aligned","Empty session / loading / request failure states are visible","Long text and multi-turn context do not lose messages","Share link opens in another browser"];
5. Observations: Three Typical Behaviors Beyond Fidelity
Under a unified workflow, different combinations show stable differences that fall into three behavior patterns:
- Steady type: detailed documentation, proactively notes acceptance caveats (for example, a share link must be verified in a different browser), high fidelity in mobile details.
- Minimal-verification type: after receiving keys, performs only one minimal connectivity test; delivers fast but leaves more boundary issues.
- Deep-iteration type: proactively constructs abnormal inputs, checks state branches, finds and fixes defects, and achieves the best final stability.
The conclusion is not that “one vendor is the strongest,” but rather: in restoration tasks, success is often determined not by code generation speed but by whether the execution strategy is acceptance-driven.
6. Common Defects and Fix Recommendations
| Defect symptom | Root cause | Fix strategy |
|---|---|---|
| Visually similar but interactions missing | Only static structure captured | Require a state machine and event list as output |
| Mobile layout misalignment | Breakpoints and touch targets undefined | Define minimum tap targets and responsive rules |
| Jitter in streaming output | No incremental rendering or scroll throttling | Use segmented rendering and scroll throttling |
| Session loss | State not persisted | Local storage plus session identifier management |
| Improved version piles on features | Missing product constraints | Limit improvement goals and priorities |
7. Actionable Engineering Recommendations
To reuse this evaluation within a team, turn it into a pipeline: store the unified prompt template in a repository, structure deliverables as diffable files, and automate the acceptance checklist (screenshot comparison plus end-to-end test cases). Making “documentation first” a hard gate can significantly reduce late-stage rework. For enterprise adoption, combine object storage for hosting static assets, a container platform for deploying services, and logging, monitoring, and alerting to track runtime quality, forming a closed loop from generation to operations.
