Evaluating Open-Source LLMs on Complex Frontend Code Generation: Engineering Lessons

    This article argues that open-source large language models should be judged by whether they deliver working frontend projects, not by single impressive demos. It describes a task-level evaluation built on real requirements, a structured spec with explicit acceptance criteria, and the capability gaps this approach reveals. Simple pages are generally well covered, while complex list and form logic, such as filter-to-request linkage, field dependencies, and validation rules, remains the main weakness. The article also outlines a practical workflow that combines structured specs, staged generation, automated acceptance checks, and repair loops, and explains why openness matters for auditability, customization, private deployment, and reproducible evaluation.

    From Benchmark Scores to Engineering Usability

    Discussions about open-source large language models often focus on single-capability comparisons. A single impressive demo can be read as proof that a model matches or even beats closed commercial models overall. For developers, the more useful question is not “Does it look similar?” but “Can it deliver reliably?” Whether a model can turn a requirements document into a runnable project, correctly implement filtering logic, and handle form field dependencies and validation rules is the core of engineering usability.

    Evaluating the frontend generation ability of an open-source model should therefore move from a one-off experience to a task-level evaluation. Give the model a real requirement, a real page structure, and clear acceptance criteria, then observe the full chain: requirement understanding, code organization, interaction implementation, and accessibility. The conclusions from this approach are closer to what a team experiences during real adoption, and they explain more precisely where open-source models fall short of closed reference models.

    Evaluation Design: Using Real Requirements to Expose Capability Limits

    A sound evaluation picks a real frontend requirement with multiple pages. It should cover at least four types of scenarios: a login page, a list page, a form page, and the overall visual style. The login page tests a carousel, form submission, error messages, and basic layout. The list page tests filters, pagination, sorting, empty states, and how request parameters stay linked to the UI. The form page tests field relationships, required-field checks, format validation, conditional disabling, and submission feedback. The overall style checks component reuse, visual consistency, and maintainability.

    The evaluation should not be limited to one tech stack. Record the model’s default choices within mainstream component-based frontend frameworks, including directory structure, dependency management, and whether the output runs. Define acceptance criteria before generation, not after. Judging a result as passing because it “looks about right” is not a valid test. Here is a generic requirement spec example:

    1. {
    2. "page": "product_list",
    3. "features": ["category_filter", "price_filter", "sort_by_sales"],
    4. "interactions": ["filter_change_refresh_list", "empty_state", "loading_state"],
    5. "acceptance": [
    6. "After a filter condition changes, the list request parameters include the corresponding fields",
    7. "When there are no results, an empty state is shown and the user can reset the filters",
    8. "While loading, a skeleton screen or loading indicator is shown"
    9. ]
    10. }

    The value of a structured spec is that it turns “the document says so” into constraints that can be verified. Without it, a model may produce a page with correct structure and acceptable visuals, yet the filters do nothing, the form validation stays superficial, and the result still requires heavy rework.

    Observations: Completion Is Decent, but Depth of Understanding Sets the Ceiling

    In similar tasks, open-source models already complete simple pages to a reasonable standard. The login page usually includes a working carousel, a form area, and basic interactions. The page is functionally complete and usable with minor changes. This suggests the models cover common page patterns, component combinations, and layout structures well.

    The gaps appear on list and form pages. List pages often have the right structure, with filters, list items, and pagination areas all in place. However, the linkage between filter conditions and request parameters, list refresh, and empty states is often missing. Form pages show a similar pattern. Fields render correctly, but complex field dependencies, validation logic, and interaction details may not fully follow the requirements. In other words, models learn “what a page looks like” more easily than “how the business logic works.”

    Visual style shows a similar pattern. Engineering usability tends to be stronger than design polish. The output is usually more complete than a simple prototype, but compared with mature component libraries and styling systems, it can feel utilitarian and basic, without a consistent design language. For internal enterprise systems, this may be acceptable. For user-facing products, design guidelines and manual review are still necessary.

    Latency and quota limits also affect the experience. End-to-end generation time depends on model load, service quotas, output length, and retry count, so a single trial should not be used to draw conclusions. Engineering teams should evaluate generation latency, failure rate, retry cost, and manual repair cost together, rather than judging only whether the final page runs.

    The Core Gap: Converting Requirement Text into Constraint Models

    Complex list and form pages expose weaknesses most clearly because they are not simple layout tasks. They are constraint modeling tasks. A single sentence in a requirements document often implies several implementation constraints: when a filter should be disabled, how fields depend on each other, how validation errors are displayed, how parameters are aggregated on submission, and how state is rolled back when an error occurs. The model must convert natural-language requirements into states, events, data, and validation rules, then map them to components and styles.

    In comparable tasks, closed reference models tend to show more consistent “comprehension precision.” They reproduce field relationships, validation order, and interaction details more completely. The gap is not necessarily in code syntax. It lies in the depth of requirement understanding and the ability to follow engineering constraints. An open-source model that only aims for a page that runs will often overlook edge cases, yet real projects are made up largely of edge cases.

    Engineering Adoption: Using Process to Offset Model Uncertainty

    A more realistic approach is not to expect a model to generate a complete project in one pass. Instead, embed generation in a controlled pipeline. First, structure the requirements spec by separating pages, fields, interactions, and acceptance assertions. Second, generate in stages: produce the information architecture and component tree first, then the data flow and interactions, and finally styling and exception states. Third, use automated acceptance assertions to check key behaviors, and when a check fails, send the error report back to the model for repair.

    1. for page in pages:
    2. spec = parse_requirement(page)
    3. draft = generate(spec)
    4. report = run_acceptance(draft, spec.acceptance)
    5. while not report.pass and retry < limit:
    6. draft = repair(draft, report.failures, spec.constraints)
    7. report = run_acceptance(draft, spec.acceptance)
    8. submit_for_human_review(draft, report)

    Teams should also constrain the component library and styling approach to reduce style drift caused by the model’s free choices. Generated code should go through static analysis, dependency audits, and accessibility checks. The generation service and validation pipeline can run on general-purpose container platforms, object storage, and logging services, which keeps generation records, acceptance reports, and rollback versions available. Human review should focus on business semantics, permission boundaries, and complex interactions, rather than repeating format checks.

    Why Open Source Matters: Transparency, Customization, and Reproducibility

    The value of open-source models goes beyond being free to use. First, they are more auditable. Teams can inspect model behavior, deployment pipelines, and data boundaries, which helps meet compliance and security requirements. Second, they offer more room for customization. Enterprises can fine-tune and constrain models around their own component standards, domain language, and acceptance criteria. Third, they provide better control over private deployment and cost, which matters most when data leaving the organization is a concern. Fourth, open models make evaluation reproducible. The same requirement and the same acceptance scripts can be run against different versions, which reduces the bias that comes from single demonstrations.

    Open source does not automatically make a model ready for engineering use, though. Teams need to assess licensing, model weights, inference cost, the pace of community maintenance, and the maturity of the surrounding tooling. A more prudent strategy is to treat open-source models as composable capability units, not as universal replacements for every commercial model.

    Implications for AI Development: Evaluation Systems Matter More Than Slogans

    This work points to a broader shift in AI development. Model competition is moving from single-turn question answering toward end-to-end tasks. Code generation shows this clearly, because it tests long-context requirement understanding, structured reasoning, tool use, code organization, and self-repair together. If evaluation only checks whether a generated snippet looks good, it will overestimate real delivery capability. If evaluation covers real projects, acceptance assertions, and a repair loop, it can push models from “usable in demos” toward “usable in engineering.”

    Healthy competition between open and closed models also helps the industry. Closed models set capability reference points, while open models support transparent reproduction and lower costs, and developers ultimately benefit. More importantly, teams should build their own task benchmarks and acceptance systems, so model selection moves from “feels stronger” to “performs more reliably in our own scenarios.” Only then can gains in open-source LLM capability translate into real software engineering productivity.