Evaluating Open-Source LLMs for Frontend Development: A Practical Test and Methodology
This article presents a practical evaluation of a Chinese open-source large language model (LLM) on real-world frontend development tasks. By comparing it with an overseas proprietary model across three distinct scenarios—a login page, a product list page, and a complex form—we assess its capabilities in generating functional code. The article also outlines a comprehensive evaluation methodology and provides actionable recommendations for private deployment and selecting the right AI tool for your team's specific needs.
I. Goals and Selection
This article targets frontend developers and AI tool selection teams, aiming to answer two questions: Can Chinese open-source LLMs complete real project-level frontend development tasks, and how should teams determine if they fit their specific scenarios? This evaluation only covers a management system requirement with three pages, and the conclusions cannot be generalized to the overall capability of the model.
II. Environment and Tasks
The test subject was a Chinese open-source LLM, with an overseas proprietary model used as a control. The original test records did not retain specific model versions, inference parameters, frontend framework versions, or time measurement methods, so the results below serve only as qualitative observations. To reproduce the test, the following information should be recorded:
- Model name, version, deployment method (cloud API or local inference), and context length settings.
- Frontend framework and version, UI component library and version, and build tools.
- Complete prompts and original requirement documents, retaining all conversation logs.
- Time metrics: From submitting the first prompt to the project being runnable, including whether environment installation and manual modifications are accounted for.
- Hardware and network conditions.
The requirements consisted of three pages. The login page needed a carousel. The product list page required multi-dimensional filtering with linked conditions. The complex form page required field validation and dynamic rendering of certain fields based on preceding ones. Each page should specify acceptance criteria line by line, such as “required fields display a hint on blur and are uniformly validated on submission.” The more specific the acceptance criteria, the more objective the scoring.
III. Results of Three Scenarios
1. Login Page
The model generated a page with all modules intact, successfully restoring the carousel and other requirements without obvious structural defects. The code quality was close to “production-ready with minor tweaks.” This indicates that the model’s generation capability is relatively stable for standardized, templated pages.
2. Product List Page
The basic data display was normal, but the multi-dimensional filtering did not work. The filter controls were visible, but selecting conditions did not change the list data. This issue appeared in multiple tests for similar list pages.
Here is an example of writing a failed test case; actual conditions should be replaced with the original requirements. Suppose the requirements state: Category, listing status, and price range are active simultaneously; switching the category clears the price range and returns to the first page. The expected result is that the three conditions filter combined, the price range resets after switching categories, and the page number returns to the first page. The actual result was that the filter controls were visible, but the list data remained unchanged after selection.
This issue shows that the model performs unstably regarding multi-condition constraints and state linkage. The existing records cannot pinpoint the cause. It could be that the long context caused earlier constraints to be lost, or that the model has an inadequate understanding of state management. To determine the cause, the list page should be tested in isolation with a shortened prompt to see if the results improve.
3. Complex Form Page
The form could run overall, but there were deviations in field linkage and validation. The timing of required field validation prompts was inaccurate, and some dynamic rendering logic dependent on preceding fields was ignored. The model could recognize the structure of the form but did not fully restore the dependencies between fields.
IV. Comparison with Overseas Models
- Login Page: Both models achieved similar completion levels.
- List and Form Pages: The overseas model was more accurate in restoring filter interactions, field relationships, and validation logic.
- Time: The original records noted that the overseas model took about 3 minutes to complete all generation, while the Chinese model took significantly longer, though the exact value was not saved. Since the measurement conditions for the 3-minute metric are unknown, it can only serve as a directional reference.
Visually, the pages generated by the Chinese model were richer than wireframes but still lacked the polish of mature component libraries. It is more suitable for delivering functionally usable pages rather than serving directly as product-level visual drafts.
The table below provides a qualitative scoring based on the test descriptions, which can serve as a scoring template for reproduction. Readers can switch to a 1-to-5 scale and record specific evidence in each cell.
| Scenario | Functional Completeness | Logic Accuracy | UI Performance | Can Preview Launch | Fix Cost |
|---|---|---|---|---|---|
| Login Page | High | High | Medium | Yes | Low |
| List Page | Low | Low | Medium | Yes | Medium |
| Form Page | Medium | Low | Medium-Low | Yes | Medium |
V. Private Deployment Suggestions
The primary value of open-source models lies in the ability to deploy them within an enterprise intranet, ensuring that code and business logic do not need to be sent to external services. However, private deployment also brings costs and responsibilities. Teams need to evaluate the following in advance:
- Hardware Costs: Evaluate VRAM capacity, concurrent request volume, and response latency. Teams can start by running a smaller parameter model before deciding on the scale of hardware procurement.
- Operations Investment: Dedicated personnel are needed to maintain inference services, version upgrades, and security patches.
- Licensing: Verify the open-source agreements of the model weights to confirm terms for commercial use and distribution.
- Data Classification: Clearly define which code can be input into the model and which must be written manually.
- Audit Logs: Save prompts, generated code, and reviewer information for post-hoc traceability.
- Secondary Fine-tuning: Fine-tuning requires high-quality labeled data and an independent evaluation set, and it does not guarantee that issues will be resolved.
- Hybrid Approach: Deploy sensitive modules locally while using cloud services for general pages, though this requires approval from the compliance department.
VI. Boundaries and Conclusions
Current results show that such models can generate standardized pages well, making them suitable for prototyping, boilerplate code, and repetitive pages. For pages involving multi-condition filtering, complex linkage, and detailed validation, manual review against each requirement is necessary, and automated tests should cover the acceptance criteria.
Open source allows teams to autonomously choose deployment and improvement methods, but it does not automatically solve quality and compliance issues. During selection, it is recommended to use the same requirements, prompts, and time metrics to conduct at least three repeated tests on candidate models before deciding whether to integrate them into the development workflow.
