Evaluating Large Language Models on Full Front-End Project Generation

    This article presents a practical evaluation of how well large language models generate complete front-end projects from a requirements document. It covers a reproducible testing methodology with fixed inputs and scoring dimensions, observed performance across login, list, and form pages, a breakdown of common failure modes such as constraint decay in long contexts, and engineering recommendations for turning one-shot generation into a staged pipeline. It also explains the benefits of open-weight models for private deployment and cost control, and closes with an action checklist for teams.

    1. Background: From Writing Code to Delivering a Project

    Over the past year, the focus of code-generation evaluation for large language models has shifted. Early discussions centered on whether a model could write a single function or explain an error message. What enterprises now want to verify is different: given a requirements document, can the model produce a front-end project that is structurally complete, runnable, and close to production after minor adjustments?

    These are two very different levels of difficulty. Writing a function is local reasoning with clear input and output boundaries. Generating a complete project requires the model to do four things at once: parse natural-language requirements, decompose them into a page and component tree, fill in interaction and validation logic, and organize everything into a directory structure and dependency set that follow engineering conventions. Any misunderstanding at any step gets amplified in the final output.

    For that reason, this article does not rank individual models. Instead, it treats requirements-driven project generation as a general technical problem and offers a practical evaluation method along with an analysis of common failure modes.

    2. Evaluation Design: Making Results Reproducible

    Subjective impressions cannot support technical judgment, so an evaluation must fix the variables first. At minimum, keep the following five items constant:

    • Identical input: the same requirements document, including the page list, field definitions, interaction notes, and acceptance criteria.
    • Identical output constraints: whether a tech stack is mandated, whether component libraries are allowed, and whether a shareable preview URL is required.
    • Identical environment: the same account tier, network conditions, and time window, to avoid queueing and rate-limiting noise.
    • Identical scoring dimensions: requirement fidelity, interaction completeness, visual polish, and generation speed.
    • Identical recording: keep the output URL and screenshots for each run so results can be compared item by item.

    An acceptance checklist can be written as a structured configuration for automated verification:

    1. {
    2. "pages": [
    3. {"name": "login", "checks": ["carousel", "form validation", "remember login state"]},
    4. {"name": "list", "checks": ["multi-condition filtering", "pagination", "empty and loading states"]},
    5. {"name": "form", "checks": ["field linkage", "required-field validation", "submission feedback"]}
    6. ],
    7. "global": ["responsive layout", "error boundaries", "accessibility labels"]
    8. }

    With a checklist in place, evaluation moves from “feels pretty good” to “9 of 12 checks passed” — a conclusion that can actually be discussed and iterated on.

    3. Test Observations: A Capability Gradient Across Three Pages

    In one full test run, the requirements document covered three typical scenarios: a login page, a product list page, and a form page. The results showed a clear capability gradient.

    The login page scored highest. Requirements such as the carousel, input validation, and submission feedback were essentially all implemented, and the page structure was clean — runnable as-is and close to production with minor tweaks. The reason is that login pages are highly templated interfaces with dense coverage in training data, so the model can complete the task almost by pattern matching.

    The list page started to slow down. The page skeleton was correct, but multi-condition filtering — explicitly stated in the document — was not implemented, and the same omission appeared across multiple list pages. That consistency suggests a capability gap rather than a one-off miss. More importantly, the model tends to produce interfaces that look complete instead of asking about missing linkage rules.

    The form page showed the widest gap. The field set was roughly complete, but field linkage, validation timing, and error message wording deviated from the document. Forms are the most requirement-dense scenario, with many implicit constraints (for example, a field that appears only under a specific option). When the document is even slightly vague, the model fills the gap with a “common practice” default.

    On visual style, the output was better than typical prototype mockups but still behind mature component-library templates — overall engineering-oriented and minimal, lacking design hierarchy. The positioning can be summarized as: more engineering-usable than product-polished.

    On efficiency, generating the full project took tens of minutes, noticeably slower than the leading closed-source solutions of the same period, which typically finish within minutes. Queueing, rate limiting, and account tier all affect timing significantly, so this dimension is only meaningful under equal conditions.

    4. Root-Cause Analysis: Why Complex Requirements Drift

    Abstracting the observations above, four root causes emerge.

    1. Constraint decay in long contexts. The longer the requirements document, the more likely later details get “averaged out.” The model retains high-frequency general patterns and drops low-frequency specific constraints. Filtering rules and field linkage — low-frequency but critical — are the first to disappear.

    2. Implicit constraints require clarification. Human developers ask questions when they hit ambiguity; models tend to fill in the blanks directly. The more robust engineering practice is to make clarification explicit, for example by instructing the model to “list uncertainties first, then start implementing.”

    3. No executable acceptance loop. Without automated checks attached to the generated output, errors can only be caught by human eyes. Turning the acceptance checklist into runnable test cases is key to steadily raising generation quality.

    4. Output format affects verifiability. Returning only code snippets makes real behavior hard to judge. Providing a directly accessible preview URL significantly lowers evaluation cost and lets non-developers participate in review.

    5. Engineering Recommendations: Turn Generation into a Pipeline

    For real projects, replace one-shot generation with a four-stage pipeline:

    1. Structure the requirements: convert the document into a structured description of pages, components, fields, and rules, with missing items explicitly marked as to-be-confirmed.
    2. Generate page by page: generate and validate one page at a time to prevent errors from accumulating across a single large output.
    3. Automated verification: cover key paths such as filtering, linkage, and validation with type checks, unit tests, and end-to-end cases.
    4. Unify the visuals: apply design tokens and component standards at the end rather than letting the model improvise styles.

    At the prompt level, add a constraint template such as:

    1. After generating each page, output a "requirement-to-implementation" mapping table;
    2. any unimplemented item must state the reason and the clarification needed. Silent omission is not allowed.

    The value of this approach is that it confines model uncertainty within the process and uses engineering practices to guarantee a quality floor.

    6. Why Open Weights Matter: Control, Private Deployment, and Cost Optimization

    When model weights are open, enterprises gain three structural capabilities beyond “free.”

    Controllable data boundaries. Front-end requirements documents often contain business rules and internal field designs that are sensitive assets. Private deployment keeps data inside the corporate network and shortens the compliance review path.

    Predictable cost structure. Usage-based billing can spiral in high-frequency, batch scenarios. Self-hosted inference converts cost into plannable compute investment, and quantization, caching, and batching can further reduce unit cost.

    Deep customization. Open weights allow domain continued training, distilling smaller models, and swapping tokenizers and inference stacks, turning general capability into specialized capability aligned with your own tech stack. Baidu AI Cloud provides supporting capabilities in container platforms, model services, object storage, logging, and monitoring and alerting, which can host this kind of self-hosted inference and evaluation pipeline.

    It should be stated objectively: open weights do not automatically mean leading capability. Whether a model is usable still depends on measured results on the specific task and on whether the surrounding engineering system is complete.

    7. Conclusion and Action Checklist

    For questions like “can domestic models match the top international solutions,” a more useful answer is an evaluation conclusion rather than a slogan. This round of testing can be summarized as: templated pages are close to usable, complex interactions and high-density forms remain the main weaknesses, and efficiency is heavily affected by service tier.

    Action checklist for teams:

    • Build an evaluation set with fixed inputs and scoring dimensions, and rerun it quarterly.
    • Automate the acceptance checklist and integrate it into CI.
    • Prioritize evaluating private deployment options for sensitive projects.
    • Constrain model behavior with a “clarify first, implement next, verify last” workflow.

    Tools will keep evolving, but the evaluation framework and engineering process are durable assets. Whoever builds the evaluation system first will be able to capture stable returns amid rapid model turnover.