Evaluating Front-End Code Generation in Chinese Large Language Models: An End-to-End Test
This article examines the practical capabilities and limitations of Chinese large language models in front-end code generation. Based on an end-to-end test using a requirements document for login, list, and form pages, it shows where generation quality holds up and where it degrades, compares the gap with leading international models, and explains why open weights matter. It closes with engineering practices for turning model output into production-ready code.
1. The Real Question: From “Generating Code” to “Delivering Software”
Debate has been growing over whether Chinese large language models can match or approach leading international models on complex front-end tasks. Social media is full of emotionally charged claims such as “on par with top-tier models” or “a next-generation UI generation tool,” yet reproducible verification is almost always missing. For engineering teams, the leaderboard ranking is not what matters. What matters are three simpler questions: Can the model understand a structured requirements document? Can it reliably translate those requirements into working pages and interactions? And how much work remains before the output is production-ready?
This article strips away specific product attributes and frames the discussion as a general technical topic: the capability boundaries of large language models in front-end code generation, and how to use them effectively in engineering workflows. All conclusions come from a real end-to-end project. A requirements document covering three page types—login, list, and form—was handed to the model for full implementation. Each page was then evaluated for completeness, interaction correctness, and visual quality.
2. Test Setup: Making the Evaluation Comparable
Evaluations often go wrong because inputs are inconsistent and acceptance criteria are vague. To make the results meaningful, this test fixed the following variables:
- Input material: A self-written requirements specification listing the page inventory, field definitions, validation rules, filtering conditions, and interaction feedback.
- Language and framework: No tech stack was imposed; the model chose its own. The final output was a component-based front-end project.
- Delivery format: A directly accessible preview URL was required, not isolated code snippets.
- Acceptance dimensions: Functional completeness, requirement fidelity, interaction details, visual style, and generation time.
The “directly accessible preview URL” requirement is critical. When a model only outputs code snippets, it can hide missing logic behind pseudo-implementations. Once the code has to actually run, missing filtering logic and unwired validation rules are exposed immediately.
3. Page-by-Page Observations: Where Capability Degrades
3.1 Login Page: Clear Structure, High Completeness
The login page came closest to expectations. The carousel area, form inputs, and submission feedback were all present, with no obvious functional gaps. It was at the level of “ready to use after minor adjustments.” The reason is that the login page is a highly templated interface, and this kind of structure is extremely dense in training data. The model can complete the task almost entirely through pattern matching.
3.2 List Page: Understanding Starts to Degrade
Problems clustered on the list page: filter options explicitly stated in the document were not implemented. Notably, this was not a one-off omission but a systemic weakness shared across multiple list pages. The page skeleton, grid layout, and data cards were all there, but the semantic layer of “how filtering conditions connect to the data source” was dropped.
This suggests that the model tends to generate interface structures that “look complete,” while lacking the initiative to fill in functional logic that requires cross-module coordination.
3.3 Form Page: Field Relationships and Validation Logic Are Under-Reconstructed
The form page ran overall, but details such as field linkage, validation timing, and error messaging deviated from the document. A complex form is essentially a constraint-based relationship tree: fields have dependencies, mutual exclusions, and conditional requirements. The model performs normally when generating individual fields, but drifts when maintaining global constraint consistency.
A typical reproducible validation example is below. The model often turns “validate uniformly on submit” into “show errors on every keystroke,” or omits conditional required fields:
// Example of conditional required fields with unified submit-time validationconst rules = {account: [{ required: true, message: 'Please enter your account' }],// Required only when the type is enterprisetaxId: [{validator: (_, value) =>form.type === 'enterprise' && !value? Promise.reject('Tax ID is required for enterprise type'): Promise.resolve(),},],};
3.4 Visual Style: Engineering Usability Over Product Polish
The overall interface style was unremarkable—better than a rough prototype, but still short of finished products built directly from mature component templates. The design leaned toward a simple, engineering-oriented aesthetic. This matches a common trait of current models: strong at structure and semantics, weak at aesthetic judgment and brand tone expression.
4. Side-by-Side Comparison: The Gap Is in “Depth of Understanding,” Not “Generation Ability”
Running the same document on a leading international model revealed a clear gradient. The two were close on the login page. On the list page, the international model showed a more complete understanding of filtering and field structure. On the form page, its advantage widened further, reconstructing field relationships and interaction details more accurately. There was also an order-of-magnitude difference in generation time; some of that may stem from free-tier quotas and queueing policies, but the gap in understanding precision was stable.
The conclusion can be summarized in one sentence: the gap between current Chinese models and top-tier models lies not in “whether they can write code,” but in “whether they can read implicit constraints in full.” The former is generation ability; the latter is depth of understanding—and depth is harder to close quickly by simply scaling parameters.
5. Why Open Weights and Industry Evolution Matter
The value of open weights and an open ecosystem is that they turn capability into a public asset that is auditable, deployable on-premises, and available for further training. For front-end code generation, open source delivers three practical benefits:
- On-premises deployment keeps requirements documents and business fields inside the internal network, meeting compliance requirements.
- Continued pre-training or instruction fine-tuning can target internal component libraries and design standards, explicitly injecting tacit knowledge such as “aesthetics and conventions.”
- Reproducible evaluation baselines let teams build their own regression sets and track version evolution over time.
It must be stated objectively that open source does not automatically close the capability gap. Improving depth of understanding depends on data quality, training strategy, and inference-time compute investment—all of which require long-term accumulation.
6. Engineering Recommendations for Real Projects
For real projects, position the model as an “efficient implementer” rather than a “requirements understander,” and use process constraints to cover its weaknesses:
- Structure the requirements document: Write implicit constraints as explicit items, for example, “changing a filter condition must trigger a new request and sync the URL parameters.”
- Generate in stages: Produce the page inventory and data model first, get them reviewed, then generate page by page to avoid long-chain drift in a single pass.
- Build an acceptance checklist: Tick off functional points, validation rules, empty and error states, and accessibility item by item.
- Use automated regression as a safety net: Validate interactions with component tests and end-to-end scripts, keeping human review focused on semantic correctness.
- Combine with cloud services: Use object storage to host static artifacts, container platforms to run preview environments, and logging and monitoring services to track production behavior, forming a closed loop.
7. Conclusion
One end-to-end test shows that Chinese models have crossed the “usable” threshold in front-end code generation, with templated pages approaching maturity. The real gap lies in depth of understanding for complex constraints and in response efficiency. For developers, the rational approach is not to chase hype-driven evaluations, but to build reproducible evaluation methods, structured inputs, and automated acceptance systems. Once process fills the gap in understanding, the model shifts from a demo to a productivity tool—and that is the realistic path by which the open-source ecosystem drives industry progress.
