A Reproducible Evaluation Method for LLM-Generated Frontend Projects—and Its Limitations

    Large language models can now generate complete frontend project structures, dependency configurations, and startup scripts. This article presents a scoring framework and checklist for evaluating whether LLM-generated frontend code is production-ready, based on a real-world test of an admin dashboard with login, product list, and dynamic form pages. It covers what to record for reproducibility, observed limitations in interaction coverage and validation rules, optimization strategies such as instruction decomposition and retrieval augmentation, licensing and cost considerations, and a final acceptance checklist for teams adopting LLM-assisted frontend development.

    1. Why Reproducible Evaluation Matters

    Large language models can already generate complete frontend project structures, dependency configurations, and startup scripts. This shifts the focus to a concrete question: which parts of the generated code can go directly into a project, and which still require manual work?

    Impressions like “it feels decent” or “the logic is buggy” cannot support technology decisions. An evaluation is only useful if others can rerun it following the same steps and reach comparable conclusions. For that reason, this article describes the test conditions and recorded items first, then presents the results. The results only describe performance under these specific test conditions.

    2. Test Conditions and Recorded Items

    The test subject was an admin dashboard frontend project consisting of three modules: a login page, a product list page, and a dynamic form page. No frontend framework was specified, so that the model’s technology stack decisions could be observed.

    To make an evaluation reproducible, the following should be recorded:

    1. Model name and version, invocation method (web UI, API, or local deployment), and sampling parameters such as temperature.
    2. The full prompt, including the system prompt, requirements document, and any additional constraints.
    3. Frontend framework and version, Node.js version, package manager, and target browsers.
    4. Generation time, queuing time, number of failed attempts, and error messages.
    5. Per-page scoring results and the manual rework hours required.

    Note: the original test did not fully retain the information in items 1 and 3. The results below are therefore qualitative observations and cannot serve as quantitative comparison data. Future re-tests should complete these records.

    3. Scoring Dimensions

    Each page is scored on the following dimensions, each rated from 0 to 2:

    1. Build result: whether the project builds and starts after dependency installation.
    2. Structural completeness: whether the page skeleton, component breakdown, and routing are complete.
    3. Interaction coverage: how many interaction items from the requirements document are implemented.
    4. Validation rule accuracy: whether regex patterns, required-field checks, and cross-field logic match the document.
    5. Rework cost: the hours a senior developer needs to bring the code to a mergeable state.

    4. Results and Observations

    Login page. The model built a complete page skeleton and implemented basic interactions such as a carousel and form submission. The structure was complete enough to serve as a starting point for further development. With no component library specified, the UI leaned toward the practical, with simple visual design. The page still needs design review and should not ship without acceptance testing.

    Product list page. The model generated a static table and filter controls, but the filter conditions were not bound to the table data, and the responses for pagination and dynamic fields were incomplete. This page showed the largest gap from the requirements document. The test generated only one sample, so this observation may not generalize.

    Dynamic form page. The form ran, but field validation and interaction feedback did not fully match the requirements document—especially regex matching and cross-field linkage rules. Issues of this kind typically do not cause build failures and can only be caught through test cases.

    Comparison with other models. The original test had no controlled group under identical conditions and no retained latency data, so no quantitative gap can be reported. The author’s qualitative impression is that completion quality is similar across models for basic pages, but on list and form pages, some comparison models reproduced filter logic and field relationships more accurately. This judgment needs verification through controlled testing under uniform conditions.

    During re-testing, each defect should be recorded in the following format: test case ID, original requirement text, expected behavior, actual behavior, and reproduction steps. This lets the team determine whether a defect reproduces consistently and whether a fix genuinely passes.

    5. Optimization Directions and Execution Steps

    1. Decompose long instructions. Break the requirements for list and form pages into itemized interaction lists, where each item maps to a verifiable behavior. Prerequisite: the requirements document follows a fixed structure. Metric: interaction test pass rate. Risk: decomposition may drop cross-page constraints, which should be listed separately.
    2. Retrieval augmentation. Provide the component library’s API documentation and the project’s internal validation rule library as context to the model. Prerequisite: the knowledge base version matches the project dependencies, with documentation sources recorded. Metrics: retrieval hit rate, and the consistency rate between APIs called in generated code and the target version. Risk: outdated documentation can lead the model to call deprecated interfaces.
    3. Replace visual inspection with tests. Cover validation rules with unit tests, and cover list filtering, pagination, and form linkage with end-to-end tests. Test cases should be generated directly from the requirements document, rather than letting the model write its own judgment criteria.

    6. Licensing and Cost for Open Models

    When choosing an open-source or open-API model, verify the following in addition to performance:

    1. License type: whether commercial use is allowed, whether attribution is required, and whether restrictions apply to derivative models or redistribution.
    2. Weights vs. service: open-source licenses usually cover only the model weights; hosted service terms may differ.
    3. Data usage terms: whether the provider trains on your request data, and where the data is stored.
    4. Deployment cost: GPU model, memory footprint, concurrency capacity, and whether dedicated operations staff are required.
    5. Billing basis: when charges are based on input and output tokens, long requirement documents and multi-turn revisions can significantly increase costs—estimate per project.

    When calling public APIs, requirement documents and source code may be sent to third-party services. For customer data or unreleased code, sanitize the inputs first or switch to private deployment.

    7. Acceptance Checklist

    1. The project builds and starts after dependency installation.
    2. All key interaction test cases for the three pages pass.
    3. Form validation rules map item-by-item to the requirements document, with test coverage.
    4. No hardcoded secrets in the code, and no customer data or personal information in prompts.
    5. Form controls have associated labels, and key operations are keyboard-accessible.
    6. Dependencies pass vulnerability scanning, and licenses are confirmed compatible with the project.
    7. At least one senior developer completes code review and signs off.

    8. Risk Notes

    1. Generated code may use outdated APIs, may contain undiscovered security vulnerabilities, or may introduce dependencies with incompatible licenses.
    2. Generated UIs may not match brand and design guidelines, and require designer review.
    3. The conclusions in this article apply only to the test conditions described here and do not generalize to all models, frameworks, or business scenarios.

    Conclusion

    LLMs can significantly shorten the time needed to build basic pages, but complex business logic still requires humans to define requirements, design tests, and perform verification. Before adopting this approach, teams should complete a re-test following the record items in this article and confirm that data compliance and manual acceptance processes are in place.