Evaluating LLM-Generated Frontend Applications: Evaluation Methods and Gap Analysis
A practical guide to evaluating how well large language models generate frontend applications from requirements documents. The article explains why public benchmarks and hands-on experience often disagree, presents a reproducible evaluation method built on defined tasks, structured inputs, and a scorecard, and analyzes the gaps that show up across login, list, and form pages. It traces the root causes—from pattern matching to requirement restoration—and proposes concrete improvements: turning natural-language requirements into machine-readable specs, layered generation, automated acceptance checks, and a regression evaluation set. The key point is that application-generation quality is best understood by separating "understanding depth" from "generation capability," and that engineering practices rather than single-model scores decide whether generative coding can reach production.
1. Introduction: Generating a Page Is Easy; Restoring a Requirement Is Hard
Now that large models have entered the application-generation stage, discussions about “matching flagship-level model capability” keep growing. Common evaluation approaches include running public benchmarks, doing single-point comparisons, or generating a full frontend application from real requirements. Yet these approaches tend to produce two seemingly contradictory conclusions:
- Similar rankings: Different models score within a narrow range on public benchmarks.
- Different experience: Given the same complex requirements document, the completeness and fidelity of the delivered application still differ noticeably.
The contradiction comes from the evaluation criteria. Generative coding commonly takes three task forms—code completion, single-file generation, and full-project generation—and their difficulty is completely different:
- Code completion: Short context and fast feedback; it mainly tests pattern-matching ability.
- Full-project generation: The model must handle requirement understanding, architecture design, multi-file implementation, and detail restoration within one or a few rounds; it tests long-range understanding and task decomposition.
This article evaluates no specific product. Instead, drawing on problems exposed in a public comparison test, it offers a reproducible evaluation method and a practical improvement plan. The core argument is this: application-generation capability should be measured by separating it into “understanding depth” and “generation capability.”
2. Why You Need Your Own Evaluation Method
Public evaluations carry a built-in selection effect. Most problems are curated, with clear instructions and explicit assertions. In real development, however, a requirements document typically includes business context, boundary conditions, implicit constraints, and cross-dependencies—exactly the parts models tend to lose.
What an engineering team needs is not a verdict on “who is stronger,” but metrics that answer questions like:
- Is every functional point in the requirements document implemented?
- Once the page runs, do the interactions match the description?
- Is generation speed stable, or does it become unpredictable because of queuing, throttling, and similar factors?
- Is the output a directly usable application, or only a code reference?
Quantifying these dimensions is what lets you judge whether generative coding fits a specific part of your workflow.
3. Evaluation Design: Tasks, Inputs, and Scorecard
3.1 Task and Inputs
The task is set as follows: given a requirements document containing business rules and an acceptance checklist, with no restriction on the tech stack, the model must generate a runnable, multi-page frontend application from scratch.
Inputs should include four kinds of information:
| Input category | Example content |
|---|---|
| Functional list | Login, product list, product editing |
| Field definitions | Field name, type, whether required, value range |
| Interaction rules | Returning to the first page after switching filters, validation timing, error message placement |
| Non-functional requirements | Empty state, loading state, error state, basic accessibility requirements |
When recording the output, keep the following together:
- The application access URL;
- The source code package;
- The time elapsed from the initial request to the first accessible page;
- Errors and retry counts during generation.
The tech stack should be kept consistent (all on the same frontend framework, or all on another stack); otherwise, framework differences will distort the conclusions.
3.2 Scorecard
| Dimension | Focus | Recording method |
|---|---|---|
| Requirement completeness | Check the functional list item by item | Implemented / partially implemented / missing |
| Interaction fidelity | Filters, linkage, validation, empty state | Manual testing, judged case by case |
| Code and robustness | Build, type check, structure, exception handling | Automated check + manual review |
| Delivery form | App URL, source code, documentation | Whether it runs directly |
| Responsiveness and stability | Time elapsed, queuing, throttling, failed retries | Multiple samples, record the distribution |
It is recommended to score each item on a 0 / 0.5 / 1 scale, with weights adjusted to the team’s scenario. For example, in scenarios that prioritize delivery efficiency, you can raise the weight on responsiveness and stability.
3.3 Evaluation Discipline
- Sample multiple times. Generative output is stochastic; a single “didn’t get it right” may be a fluke, and results can vary widely across samplings.
- Record conditions. Service tier, throttling policy, and concurrency all affect speed and success rate, so they must be recorded along with the results.
- Fix the cases. Define scoring cases in advance rather than adjusting the standard after generation.
4. Typical Observations: Completion Forms a Gradient Across Pages
The phenomena below come from parts highlighted in a public comparison test. A single run is not a conclusion about any product’s capability, but the patterns it reveals are worth attention.
- Entry experience: During peak hours, some services showed queuing, throttling, or required payment to continue. Availability is a capacity issue on the service side and should be evaluated separately, not folded directly into model capability.
- Time differences: In the public comparison, two models took roughly 3 minutes and over half an hour respectively to complete the same set of pages—an order-of-magnitude gap. This may relate to the service tier and shows that application generation is highly sensitive to inference throughput and queuing mechanisms.
- Login/authentication page: Elements explicitly stated in the requirements, such as a carousel, were all implemented, with no obvious functional gaps—close to something that could ship after minor tweaks.
- List page: The page skeleton was correct, but the filter conditions explicitly written in the requirements document were missing as a whole. The same problem recurred across multiple list pages, indicating a capability gap rather than an isolated incident.
- Form page: It ran fine, but the fields, validation logic, and interaction details were not fully implemented per the document.
- Visual style: Slightly better than a common prototype, but still behind templates that directly apply a mature component library—more engineering-oriented than design-oriented.
- Delivery form: It provided a directly accessible application URL rather than just code snippets, making quick acceptance easier—a plus.
One comparison is worth noting: in another public case, the frontend code a model generated could build, but the whole page was blank once opened in the browser, and the root cause was simply that a dependency had been mistakenly imported from a package that exists only in the development environment. In other words, there is still some distance between “can generate” and “can run,” so acceptance must be judged by the running result.
Why Login, List, and Form Pages Increase in Difficulty
These three page types happen to represent the difficulty ladder of application generation:
- The login page is a pattern-based page. Forms, buttons, and prompt text all have mature conventions that appear extremely frequently in training data, so the model can almost generate them directly from patterns.
- The list page is a data-driven page. Its structure (table headers, pagination, empty state) is likewise pattern-based, but “which conditions serve as filters, how to request data after filtering, and how to paginate” depends on the business rules in the requirements document, requiring the model to extract an explicit set of conditions from natural language.
- The form page is a rules-driven page. Relationships among fields (linkage, show/hide, mutual exclusion), the timing and order of validation, and the placement of error messages are all rule logic. They are scattered throughout the document and interdependent. Once one is missed, the page often still runs, which makes the defect harder to detect.
5. Root Causes of the Gap: From “Pattern Matching” to “Requirement Restoration”
The phenomena above can be summarized into four causes, each requiring a different improvement approach.
5.1 Information Loss in Long Contexts
The longer the requirements document, the more easily key rules get “diluted.” Filter conditions and validation rules often appear as scattered sentences, and while generating multiple pages and multiple files, the model struggles to stay aligned with every detail. The model considered to understand more completely in the public comparison had its advantage mainly in restoring filter structure and field relationships—essentially, a stronger ability to extract and preserve scattered constraints.
5.2 Lack of Explicit Acceptance Criteria
If the requirements document contains only natural-language description, the model can only fill in the implementation by guessing. Such guessing tends to pick the most common default—for example, no filtering, or validation that only checks required fields. This is a distributional tendency, not a syntax-ability problem.
5.3 Consistency Decay in Long-Horizon Tasks
A complete project involves multiple interconnected parts such as routing, state management, API integration, and the styling system. The longer the generation, the more easily later content drifts from earlier conventions—for example, inconsistent field naming, mismatched types, or the same interaction behaving differently across pages. This has nothing to do with whether the model “can write code,” and everything to do with its ability to maintain global constraints across a long-horizon task.
5.4 Sampling Randomness and Service-Side Fluctuation
Generating the same requirement multiple times can yield different results. Queuing, throttling, and quota limits directly determine whether the workflow can proceed steadily. Both need to be separated through multiple samplings and clearly recorded running conditions.
6. Improvement Practices: From “Can It Generate” to “Can It Deliver”
6.1 Upgrade Natural-Language Requirements to a Structured Spec
In addition to the requirements document, add a machine-readable spec file that makes implicit constraints explicit:
page: product-listdata_source:endpoint: /api/productsmethod: GETparams: [keyword, category, min_price, max_price, page, page_size]filters:- {name: category, type: select, options: [all, electronics, home], default: all}- {name: price_range, type: range, min: 0, max: 10000, step: 100, default: [0, 10000]}interactions:- when: category_changedthen: [reset_page, refetch]- when: filter_changedthen: [reset_page, refetch]states:empty: {show: empty_placeholder, actions: [reset_filters]}error: {show: error_message, actions: [retry]}acceptance:- "After switching any filter, the request params include the corresponding condition, and page resets to 1"- "When submitting an empty form, all required fields show error messages at the same time"
Specifying brings three benefits:
- Traceable rules: each rule has a clear ID and trigger condition;
- Executable acceptance: acceptance entries can be turned into test cases one by one;
- Controlled regression: when requirements change, you only need to update the spec rather than rewrite a whole block of natural-language description.
6.2 Layered Generation, Not All at Once
Break the generation process into several checkable rounds, each completing one kind of task:
- Requirement parsing: have the model first convert the document into a structured list (fields, rules, states), confirmed by a human;
- Page skeleton: routes, page components, placeholder content;
- Data and state: API calls, loading/error/empty states;
- Interaction logic: filters, linkage, validation;
- Visual polish: layout, spacing, responsive adaptation.
Doing a check at the end of each layer keeps errors local and prevents them from accumulating in a long output.
6.3 Automated Acceptance: Let the Machine Find Problems First
After generation, run standardized checks. Common items include:
| Check item | Typical method |
|---|---|
| Buildability | Install dependencies, build, start locally |
| Static quality | Type check, code style check |
| Requirement consistency | Turn the acceptance entries in the spec into automated tests |
| Runtime correctness | Browser automation testing, capture console errors |
| Basic accessibility | Form label association, keyboard reachability, contrast check |
Example acceptance script (pseudocode):
def verify(app_url, spec):page = open_page(app_url)for rule in spec.interactions:trigger(page, rule.when)assert_params(page, rule.then) # check request params and page statefor case in spec.acceptance:assert run_case(page, case), f"Failed: {case}"assert no_console_errors(page)
6.4 Objectifying Visual Quality and Usability
Visual evaluation is easily subjective, so it can be turned into a verifiable checklist:
- Whether it is built on a mature component library, and whether spacing and font sizes form a coherent system;
- Whether overflow or misalignment appears on narrow screens, with long text, or with abnormal data;
- Whether error messages are placed near the offending field and can be recognized by assistive technology.
The focus for speed improvements is on the service side. Prefer inference services with stable throughput and clearly defined concurrency policies. In scenarios that support streaming output, you can first show the user the page skeleton and then progressively fill in content, shortening perceived wait time. If the task itself is long, consider moving generation steps into an asynchronous task queue and querying progress through a task-status interface, avoiding requests that hang for a long time.
The focus for reliability is isolation and retry. In high-concurrency scenarios, set an independent throttling quota for each user to avoid contention, and use exponential backoff retries for transient failures. Common general-purpose capabilities on the cloud can be combined to support the whole pipeline:
- Use a message queue to smooth peaks and a container platform for elastic scaling;
- Use object storage to save generated artifacts and a content delivery network to accelerate access;
- Use logging services and monitoring/alerting to track failure rates and elapsed time.
Cloud providers such as Baidu AI Cloud offer the general cloud products above, and enterprises can combine them as needed to build their own generation-evaluation and delivery pipeline.
6.5 Build a Regression Evaluation Set
Accumulate your team’s real requirements into a fixed set of cases, including the requirements document, the spec file, and the acceptance cases. Run them automatically when the model or service version updates, and output the change trend in scores across dimensions. This turns “it feels stronger” into traceable numbers like “list-page filter completeness rose from 40% to 90%.”
7. The Meaning of Benchmarking: From “Model Capability Contest” to “Engineering Capability Contest”
Once you shift focus away from specific products, the true meaning of “benchmarking” becomes clearer.
For the open-source ecosystem, open-weight models that approach the first tier bring at least three values:
- Deployable: Enterprises can deploy privately, keep data within their domain, and meet compliance requirements;
- Fine-tunable: They can be adapted to a domain using the enterprise’s own codebase and business documents—often the part that general models struggle to cover;
- Composable: Open-source models pair easily with self-built toolchains, for example chaining spec parsing, automated acceptance, and regression testing into a closed loop.
In other words, open-source models hand the choice of “whether to use them” back to the engineering team, and the competition shifts from a single model’s score to the engineering system built around the model.
For the industry, benchmarking means a wider range of choices and an optimized cost structure. But “benchmarking” has limits:
- Benchmark saturation: Converging scores on public benchmarks do not mean converging capability in real scenarios.
- Multidimensional capability: Understanding, generation, reasoning, speed, and stability are different dimensions; a model leading on one does not mean it is more suitable across every delivery step.
- Evaluation criteria decide the conclusion: The same model can rank completely differently under different evaluation methods.
So a more pragmatic approach is to treat “benchmarking” as a reference signal and “scenario validation” as the basis for decisions.
8. Conclusion and Action Recommendations
- Build scenario-based evaluation: Construct a case set from your team’s real requirements and measure with a unified scorecard, instead of relying on public rankings.
- Specify requirements: Adding a structured spec on top of natural-language description significantly reduces the probability of “understanding slow-down.”
- Layered generation + automated acceptance: Make every step checkable and every rule regression-testable.
- Fill in service-side capabilities: Queuing, throttling, retry, and artifact storage and delivery determine whether generative coding can steadily enter the production process.
- Keep regressing: Fold the evaluation set into routine checks for version updates, and judge capability changes with data rather than impressions.
In the short term, the gap in application-generation capability shows up on the model side; in the long term, it will be amplified or erased by the engineering side. Whoever turns “requirement understanding, generation control, and automated acceptance” into a reusable pipeline will sooner turn generative coding into stable production capacity.
