Evaluating LLMs on Web App Replication: Goals, Prompts, and Scoring

    This article presents a practical evaluation framework for testing whether large language models and AI coding tools can replicate a conversational web application. It defines fixed deliverables, a two-round testing process, a structured prompt template, a six-step workflow, and a five-dimension weighted scoring model, with emphasis on proactive verification after real API access is granted. It also covers common engineering issues such as streaming output, state and history management, error observability, mobile adaptation, and security boundaries.

    1. Background: Why “Replication” Is a Useful Capability Test

    When a conversational AI product exposes its model capabilities, API documentation, and frontend interaction patterns at the same time, the most natural question is whether existing tooling can rebuild a functionally equivalent web application with a similar user experience. The value is not in copying itself. It is that replication offers a well-bounded, measurable challenge: it tests a model’s ability to understand long documents, generate runnable code, reproduce visual details, identify defects proactively, and iterate.

    There is also a practical constraint in the original material: some platforms limit daily conversation counts and single-input length after opening up their capabilities. This means an evaluation plan cannot depend on the stability of a single entry point. Reproducibility and portability need to be built into the design goals, so the same workflow can run both on a cloud-hosted model and on a privately deployed inference service.

    2. Evaluation Goals and Shared Constraints

    The biggest risk in model evaluation is that everyone tests differently. To keep results comparable, three things are fixed first: deliverables, rounds, and operating standards.

    Deliverables are fixed as three items:

    1. A product feature document and a feature structure diagram;
    2. A high-fidelity replicated page with UI and interactions aligned to the reference site;
    3. An improved new version built on top of the original, where common industry enhancements are allowed.

    Rounds are fixed at two. The first round provides only the requirements and the reference entry point. The second round adds API key information, so the model’s behavior can be observed once real invocation conditions exist. Operating standards stay the same: identical prompts, identical browsing and debugging methods, and an identical acceptance checklist, with no lowered bar for any model.

    The difference in the second round is often the most revealing. Some implementations only verify minimal connectivity, such as getting a single sentence back. Others proactively construct boundary inputs, check interrupted streaming output, and validate error-code messages and retry logic, which exposes hidden defects and drives further optimization. This willingness to dig deeper is a strategy difference between models and AI coding tools, not an operating difference.

    3. Prompt Design: Role, Constraints, and Acceptance in One Place

    High-quality output depends on high-quality input. A structured prompt skeleton can look like this:

    1. Role: Senior product manager + frontend architect
    2. Goal: Replicate a conversational web app and produce an improved version
    3. Inputs: Reference site entry, API documentation entry, an available browser session
    4. Constraints:
    5. - Analyze first, then build; output a feature list and structure diagram
    6. - The replica must cover desktop and mobile layout differences
    7. - The improved version must explain trade-offs, not pile on useless features
    8. Acceptance:
    9. - The page runs locally with no console errors
    10. - Core flows work: session creation, message sending, streaming display, history management
    11. - Provide a brief self-test record

    Phrases like “ignore existing memory and skills, just start” are essentially about reducing irrelevant context so the model focuses on the current task. In engineering practice, a more reliable approach is to scope the work through the system prompt rather than depending on a model’s “memory switch.”

    4. A Unified Testing Workflow

    Split the process into six steps and run every model group in the same order:

    1. Information gathering: read the reference pages and API documentation, then form feature hypotheses;
    2. Structure design: produce an information architecture and component tree, and decide how state is managed;
    3. Skeleton build: get a minimal runnable page working first, then add interactions;
    4. High-fidelity alignment: compare layout, spacing, font sizes, empty states, and loading states item by item;
    5. Integration and self-testing: connect real invocations and cover both normal and error paths;
    6. Iterative improvement: fix issues based on self-test results and write up the improved version.

    5. Acceptance Dimensions and Scoring

    To avoid passing anything that merely “looks right,” use a five-dimension weighted score:

    • Feature completeness (30%): whether core flows are closed loops and boundary conditions are handled;
    • Visual fidelity (25%): desktop and mobile layout, component sizing, and state styling;
    • Code quality (20%): clear structure, runnability, and restrained dependencies;
    • Proactive verification (15%): whether deep testing was performed and used to drive fixes;
    • Improvement rationale (10%): whether new capabilities serve real scenarios.

    Proactive verification is the dimension that separates the field. In testing, the strongest group not only reproduced the mobile input box position and size accurately, but also flagged easily missed acceptance details in its documentation, such as verifying share links in a different browser. Some implementations, after receiving the key, ran only a minimal connectivity test, so problems surfaced only during manual acceptance.

    6. Common Issues and Engineering Recommendations

    • Streaming output: handle interruption, timeout, and reconnection so the page does not get stuck in a loading state;
    • State and history management: keep session lists, context length limits, deletion, and renaming consistent;
    • Error observability: turn error codes into readable messages and keep a retry entry point;
    • Mobile adaptation: validate the input box, toolbar, and scroll areas separately;
    • Security boundaries: keys must not reach the frontend; forward them through a server-side proxy, and add logging, monitoring, auditing, and rate limiting.

    For deployment, a container platform can host the frontend and proxy service, object storage can serve static assets, and a logging and monitoring stack can track availability and latency. These are general cloud capability categories, which makes migration across environments easier.

    7. Conclusion

    Replicating a conversational web application is a high-density composite evaluation. It checks long-document understanding, code generation, visual fidelity, and autonomous debugging at once. What truly separates models is not who writes the flashiest code, but who proactively digs deeper, finds problems, and fixes them once real invocation conditions are available. Fixing the deliverables, rounds, and acceptance criteria is what makes comparisons across models and toolchains reproducible and useful from an engineering standpoint.