Evaluating and Choosing LLMs for Generating Complete Frontend Projects: A Practical Guide

    This guide explains how to evaluate large language models that generate complete, runnable frontend projects, and how teams should choose and use them. It presents a reproducible evaluation method built around model versions, a unified prompt template, a controlled runtime environment, a defined sample size, and a five-dimension scoring rubric with severity levels for defects. It then compares three page types—login, list, and form pages—showing where models succeed and where they fall short, especially around filter linkage, field dependencies, and validation rules. It argues that understanding depth matters more than generation speed, discusses the trade-off between engineering usability and polished UI, and outlines what open-source models mean for the ecosystem. Finally, it offers practical advice on structured requirements, a dedicated manual review step, and a solid engineering loop so AI output stays controllable and traceable.

    Introduction: From “Completing Code” to “Delivering a Runnable Project”

    Over the past year, the focus of code-oriented LLMs has shifted from “completing the next line” to “delivering a runnable project.” Users are no longer satisfied with scattered function snippets; they expect to describe a requirement and receive a structurally complete, launchable, interactive frontend application.

    But a boundary needs to be clear: a one-sentence requirement is better suited to demos and validating ideas, while engineering delivery still requires a structured requirements document. Without a page list, field definitions, validation rules, interaction flows, and acceptance criteria, generated results often stall at “the pages look about right” and rarely go straight into a project.

    This article does not judge any specific product as better or worse. Instead, it answers three questions: How do you evaluate an LLM’s ability to generate a complete frontend project? What are the common failures? How should a team choose and use a model?

    1. Evaluation Method: Making Results Reproducible

    To avoid the gap between “impressive demos, underwhelming delivery,” the evaluation must be built on a controlled, reproducible process. Below is the methodology used in this example, which can be reused directly.

    1. Model Names and Versions

    This example uses two codename models:

    • Open-source code model: Coder-32B, version v2025.06;
    • Closed-source baseline model: General-B, version 2025.06.

    In a real evaluation, you should record the full model name and version number. If a model is upgraded or its quantization version changes, rerun the same set of samples, so that model changes aren’t mistaken for prompt changes.

    2. Prompt Template

    To reduce variation from prompts, use the following unified template:

    You are a frontend engineer. Based on the following requirements, generate a complete frontend project that includes page structure, routing, component breakdown, state management, form validation, sample API calls, startup commands, and directory structure. If any requirement is ambiguous or cannot be implemented, list the assumptions and missing items at the end.

    The prompt should explicitly ask the model to output “unimplemented items” and “assumptions.” This exposes whether the model pretends to have finished after omitting requirements.

    3. Runtime Environment

    • Runtime: Node.js 20;
    • Build tool: Vite 5;
    • Browser: Chrome 120;
    • Deployment: local Docker or a cloud platform container service;
    • Dependency installation: a fixed lockfile and install command;
    • Logging and monitoring: record generation time, build time, page accessibility, and error messages.

    4. Sample Size

    Select three typical page types:

    • Login page: 10 requirements;
    • List page: 10 requirements;
    • Form page: 10 requirements.

    Each requirement is sampled 3 times, for 90 generations in total. This lets you observe both average performance and stability.

    5. Scoring Criteria

    Use five dimensions, each scored 0–5:

    • Completeness: whether the page runs and whether core features are complete;
    • Requirement fidelity: whether fields, rules, and interactions match the document;
    • UI quality: whether layout, spacing, states, and responsiveness are usable;
    • Stability: whether repeated generations produce consistent results;
    • Maintainability: whether the code structure is clear and easy for humans to modify.

    Also record the severity level of missing points:

    • P0: the page can’t start, or a core flow is missing;
    • P1: a major feature is missing, such as filters not being linked or no submission state;
    • P2: minor deviations, such as wording, empty states, or missing icons.

    Two reviewers score a sample independently and their agreement is measured. In the example sample, agreement reached a Kappa of 0.81, indicating that the scoring criteria are basically reproducible.

    2. Page-by-Page Breakdown: Login, List, and Form Pages

    Given the same document and the same set of pages, model performance often shows a clear complexity gradient. The following “requirement — expectation — actual output — missing points” comparisons illustrate this.

    1. Login Page: Simple structures can usually be generated, but still need manual review

    Item Content
    Requirement Username/password login, remember password, error prompts, carousel or illustration
    Expectation Input fields, button, remember password, error prompts, and visual elements all run
    Actual output In simple login pages without complex interactions, a basic page can usually be generated, but it still needs manual review
    Missing points Remember password isn’t persisted locally; error prompt wording is inconsistent; illustration asset path is missing

    Login page logic is linear with few states, so it usually falls into the “tweak it a bit and it works” level. But that doesn’t mean no manual intervention is needed—especially for details like error prompts, permission redirects, and remember password, which still need to be checked item by item.

    2. List Page: Filtering and interaction logic is the first hurdle

    Item Content
    Requirement Keyword search, category dropdown, price range, status filter; filtering triggers a query and updates the list
    Expectation After the user selects filters, request parameters change automatically, list results update in sync, and a reset is supported
    Actual output Most generated results have a page skeleton and a filter bar, but the filter conditions aren’t actually wired into the data request
    Missing points Filter parameters don’t reach the request; no query is triggered; the reset button is incomplete; the empty state is missing

    The common list page problem isn’t “no page” but “there’s an interface with no business flow behind it.” Models tend to generate static layouts while missing the complete chain of “select filter → trigger query → update results.” This kind of omission is usually systemic, suggesting the model’s understanding of feature intent isn’t stable enough yet.

    In the example sample, the list page full pass rate was about 57%, with failures concentrated on filter linkage, pagination parameters, and empty-state handling.

    3. Form Page: Field relationships and validation are the hardest to reproduce

    Item Content
    Requirement Enterprise onboarding form with company name, contact person, phone number, email, amount, and document upload; some fields show/hide based on others; multi-level validation before submission
    Expectation Field dependencies are correct, validation rules are complete, submission states are clear, and error prompts are explicit
    Actual output The page runs, but the number of fields, validation logic, and dependencies deviate from the document
    Missing points Dependent show/hide isn’t implemented; email and phone validation is incomplete; the button isn’t disabled while submitting; failure states aren’t recoverable

    Form pages demand the most capability. The real difficulty lies in the dependencies between fields, multi-level validation rules, submission state handling, and the consistency of error prompts. If the model can’t grasp these constraints, the output will “look like a form but can’t be used for real business.”

    In the example sample, the form page full pass rate was about 43%, with failures concentrated on field dependencies, async validation, and the submission state machine.

    3. Capability Boundaries: Understanding Depth Matters More Than Speed

    Abstracting these observations, the key difference between models lies not in generation speed but in the depth of their understanding of document semantics.

    Speed determines the iteration experience, but it’s affected by quotas, queuing, compute, network, and other factors, so it fluctuates and is easier to optimize through engineering. Understanding depth determines delivery quality, reflected in whether the model can accurately map natural-language requirements into field structures, state machines, validation rules, and API parameters.

    Under the current sample, the key gap more likely comes from the ability to restore document semantics. When models perform similarly on simple pages but noticeably lag on filter linkage, field dependencies, and validation details, the problem is often not “generated too slowly” but “hasn’t really turned the requirement into an implementation.”

    4. UI Style: The Trade-off Between Engineering Usability and Product Polish

    Visually, model-generated prototypes are usually “a bit better than a sketch”: the structure is standardized and runnable, but reaching the aesthetics and consistency of a mature design system or component library is still a distance away. Common traits are an engineering-oriented design feel, a lack of highlights, and unstable visual details.

    For validating ideas and building internal tools, this “engineering usability first” result is already sufficient. But for real users, it still needs manual design polish. It’s recommended to use verifiable visual acceptance items:

    • Is spacing consistent, and are elements aligned?
    • Do components such as buttons, inputs, and cards have default, hover, disabled, and error states?
    • Are loading, empty, and error states complete?
    • Is mobile responsiveness usable?
    • Are error prompts near the field, and is the wording consistent?
    • Does color contrast meet readability requirements?
    • Are static assets such as images, icons, and illustrations accessible?

    These acceptance items are more reliable than simply judging whether something “looks good,” and easier to turn into a checklist.

    5. What This Means for Open-Source Models and AI Development

    Open-source models’ rapid catch-up in code generation has significance beyond a single evaluation.

    1. Lowering the barrier and cost of use. Open-source and self-hostable capabilities let more teams run models locally or in private environments, avoiding concerns about quotas, queuing, and data leaving the premises—especially suited to compliance-sensitive teams.

    2. Driving ecosystem growth and reproducible evaluation. Open weights let researchers and developers compare and reproduce results, and the evaluation methods themselves are refined by the community to become more rigorous.

    3. Accelerating the evolution of application forms. When models can reliably generate “a runnable project” rather than “code snippets,” the development paradigm of frontend prototypes, internal systems, and low-code platforms will be redefined.

    4. Capability tiers will persist. Open-source and closed-source models will coexist for a long time, balancing cost and effectiveness through scenario-based combinations: lightweight open-source models for simple tasks, stronger models for complex tasks, and manual review reserved for critical paths.

    At the same time, governance requirements should be added before using open-source models: confirm that the license allows commercial use and redistribution, desensitize input data, configure least-privilege and deployment security policies, and pin the model version, prompt version, and evaluation samples, so quality remains traceable after a model upgrade.

    6. Practical Advice: Use AI in the Right Place

    1. Use strengths as an accelerator

    Have the model handle structured work such as scaffolding, page skeletons, standard forms, and basic components, and invest the time saved into business logic, exception flows, and experience polish.

    2. Constrain the model with documentation

    The more structured the requirements document, the higher the fidelity. It’s recommended to include at least four types of content:

    Field table:

    Field Type Required Rule Default Dependency Error message
    Phone number String Yes 11 digits Empty Affects SMS validation Invalid phone number format
    Company name String Yes 2–50 characters Empty None Please enter the company name

    Validation rules:

    • Required validation;
    • Length validation;
    • Format validation;
    • Numeric range validation;
    • Uniqueness validation;
    • Async validation and error display.

    State machine:

    • Initial state;
    • Validating;
    • Submitting;
    • Success;
    • Failure;
    • Reset;
    • Retry after submission failure.

    Acceptance checklist:

    • Does the page start normally?
    • Is the routing complete?
    • Do permission checks take effect?
    • Do filter conditions reach the request parameters?
    • Does form validation cover P0/P1 rules?
    • Can error prompts be located to the field?
    • Do empty, loading, and failure states exist?
    • Is responsiveness usable?
    • Are logging, monitoring, and alerting integrated?

    3. Establish a manual review step

    Filter linkage, field dependencies, validation rules, and permission control must be compared item by item against the document; you can’t assume the model “should have done it all.” Especially for form submission, list queries, and permission redirects—these are often hotspots for P1-level omissions.

    4. Focus on the engineering loop

    Bring generated results into standard development pipelines such as version control, continuous integration, logging services, and monitoring and alerting, so AI output stays controllable and traceable. In such pipelines, general-purpose capabilities of cloud platforms—such as container services, logging services, and monitoring and alerting—can serve as a reliable foundation, rather than relying on a one-off generation from a single model.

    Conclusion: See Capability Boundaries Rationally, and Put the Model in the Right Place

    From requirements documents to a runnable frontend, current models are already close to usable on simple pages, but still have clear room for improvement in understanding-depth areas such as filter linkage, field relationships, and validation details. For the open-source ecosystem, this catch-up lowers the barrier to use, drives reproducible evaluation, and reshapes the development paradigm.

    Seeing capability boundaries rationally, putting the model in the right place, and using structured requirements, clear acceptance criteria, and rigorous manual review to constrain and amplify its value is the key to turning such tools into real productivity.