Testing the Frontend Code Generation of Chinese LLMs: Capabilities, Limits, and Why Open Source Matters

    This article presents a reproducible test of how current Chinese large language models handle structured frontend requirements. Using a single requirements document covering login, list, and form pages, it evaluates the generated projects across functional completeness, depth of understanding, interaction fidelity, visual quality, and generation speed. The findings show that standard pages are close to production-ready, while conditional logic and complex forms reveal gaps in semantic understanding. The article also explains a layered prompting strategy, the practical value of open-source models, and how to integrate them into a real delivery pipeline.

    1. Background: Moving Beyond the Hype to an Engineering Check

    Chinese large language models have been drawing steady attention for their ability to generate applications. Social media is full of claims such as “matching leading international models” or “the next generation of UI generation tools,” but most of these posts are emotional rather than informative. For developers, whether a model is usable does not depend on marketing language. It depends on whether the model can consistently produce runnable, maintainable, and extensible engineering code under the constraints of a real requirements document.

    This article therefore uses a reproducible validation method. A frontend requirements document covering three typical page types—login, list, and form—was prepared without specifying a technology stack. The model was asked to generate a complete project in a single pass. The output was then evaluated across five dimensions: functional completeness, depth of requirement understanding, interaction fidelity, visual completeness, and generation efficiency.

    This article does not promote or compare any specific product. The subject is the general capability level of current Chinese large language models when translating structured frontend requirements into working code.

    2. Validation Method: Keeping the Evaluation Close to a Real Workflow

    The credibility of an evaluation depends on the quality of its input. The requirements document used here included:

    • A page inventory and routing map, defining the responsibility of each page;
    • Field definitions, validation rules, default values, and error states for every page;
    • Interaction logic, such as carousel autoplay and manual switching, linked filters, and feedback after form submission;
    • A schematic description of data structures, so the model could infer the shape of the APIs.

    No language or framework was imposed. This was intentional: it reveals the model’s technology choices and engineering judgment under weak constraints. The evaluation dimensions were defined as follows:

    Dimension Focus
    Functional completeness Whether every feature listed in the document was implemented
    Depth of understanding Whether field relationships and linked logic were correctly inferred
    Interaction fidelity Whether validation, feedback, and edge states were implemented
    Visual completeness Whether layout, spacing, and responsiveness followed conventions
    Generation efficiency End-to-end time and usability of the output

    3. Test Observations: A Capability Gradient Across Three Pages

    3.1 Login Page: Close to the Usability Line

    The login page is the most standardized in structure, and the model performed most consistently here. The required carousel module was implemented correctly. Form fields, submission feedback, and basic validation were all present, with no obvious structural gaps. The conclusion for this page is that it was close to “ready to ship with minor adjustments.” This suggests the model’s ability to reproduce common, well-established page patterns is fairly mature.

    3.2 List Page: Understanding Starts to Degrade

    Problems emerged on the list page. The filter conditions and linked interactions explicitly stated in the document were not implemented. The page skeleton was correct, but functionality was clearly reduced. Notably, this was not a one-off omission; it recurred across multiple list scenarios, which points to a systemic weakness. The model is good at generating structure, but it is not stable when translating conditionally described logic from natural language into executable states.

    3.3 Form Page: Weak Fidelity Under Complex Constraints

    The form page ran overall, but the field set, validation rules, and interaction details deviated from the document. Forms are constraint-heavy pages: fields depend on one another, and validation has ordering requirements. The model’s performance here shows that fidelity drops noticeably once requirements shift from “what the page looks like” to “how the rules take effect.”

    3.4 Visual Style: Engineering Usability First

    The overall visual style was average—better than most prototypes, but still short of the standardized visuals of a mature component system. The design felt simple and engineering-oriented. In short: engineering usability ranked above product polish.

    3.5 Efficiency and Stability

    End-to-end generation took on the order of half an hour, clearly slower than the one-to-two-minute range of leading international models. During peak hours, there were also queueing or rate-limit notices. To be fair, generation time is affected by account type, concurrency policy, service load, and other factors, so it cannot be equated directly with model capability. Even so, the impact on the production usage experience is real.

    4. Root-Cause Analysis: Not “Can It Write Code,” but “Did It Understand”

    Placing the three pages side by side, the root of the gap is not code generation but depth of requirement understanding. It can be broken into three layers:

    1. Syntax layer: producing runnable code—basically passed;
    2. Structure layer: page skeleton, component decomposition, and route organization—performed well;
    3. Semantic layer: conditional filtering, field dependencies, validation ordering, and exception branches—clearly insufficient.

    The practical lesson is to avoid handing the model one very long document and letting it improvise. A layered prompting strategy works better. Example:

    1. Step 1: Output only the page inventory and route table, and confirm the structure;
    2. Step 2: Output field definitions and data structures page by page (in JSON Schema form);
    3. Step 3: For a single page, output an interaction state machine description, then generate code;
    4. Step 4: Check item by item against a validation rule checklist and fill in omissions.

    Combined with an acceptance checklist that drives iteration, this can significantly raise fidelity at the semantic layer.

    5. Why Open Source Matters: From Usable to Controllable

    Setting specific products aside, open source delivers structural value for AI development:

    • Auditable: weights and inference processes can be inspected, supporting security assessment and compliance review;
    • Deployable on-premises: sensitive data stays within its domain, meeting deployment requirements in finance, government, and similar sectors;
    • Fine-tunable: continued training on in-house business data can build a domain advantage;
    • Reproducible: research findings can be independently verified, reinforcing a healthy loop between academia and engineering;
    • Cost-controllable: it avoids lock-in to a single vendor and allows more flexible negotiation and scheduling.

    One misconception to avoid: open source does not mean zero cost. Inference compute, operations, monitoring and alerting, logging services, and model iteration all require ongoing investment. Container platforms and object storage are typically needed as well, forming a complete engineering loop.

    6. Implementation Advice: Put the Model in the Pipeline, Not on a Pedestal

    • Segment scenarios: let the model generate standardized pages; for complex rules, design the state machine manually first, then generate;
    • Engineer the prompting: constrain output with structured documents and acceptance checklists;
    • Add quality gates: wire type checks, static analysis, and unit tests into the pipeline to automatically catch omissions;
    • Collaborate with humans: the model produces first drafts and boilerplate, while developers handle semantic validation and architecture decisions;
    • Drive with metrics: measure real returns using first-pass rate, rework rate, and mean time to fix.

    7. Conclusion

    Chinese large language models have cleared the “good enough” bar for structured frontend generation. Standard scenarios such as the login page are close to production-ready. However, in semantically dense scenarios like linked filtering and complex forms, gaps remain relative to leading international levels in both depth of understanding and efficiency. The real significance of the open-source attribute is turning technical capability into auditable, on-premises, and fine-tunable infrastructure, moving enterprises from “trial use” to “controllable use.” For developers, the rational stance is neither to deify nor to dismiss these models, but to use engineering methods to convert model capability into delivery quality reliably.