A Three-Tier Practical Guide to Evaluating Chinese LLMs for Code Generation and Frontend Design

    This guide presents a structured framework for evaluating large language models in real-world software development. It moves beyond syntax and benchmark accuracy to assess engineering workflows, debugging, context retention, frontend aesthetics, responsive behavior, and interaction quality through three levels of testing. It also explains how to define acceptance criteria, use agent-style workflows, and determine which tasks still require human review.

    1. Why LLM Programming Ability Needs to Be Reassessed

    In the past, an LLM’s programming ability was typically evaluated through code completion, algorithm accuracy, and the quality of single-turn answers. These metrics can reflect a model’s knowledge, but they rarely cover the complete workflow of real-world development.

    In practical projects, developers often need a model to handle several tasks at the same time:

    • Understand ambiguous business goals;
    • Break requirements into pages, components, and data structures;
    • Generate runnable code;
    • Locate problems from error logs;
    • Modify dependencies and configuration files;
    • Balance interaction quality, visual consistency, and maintainability;
    • Preserve context across multiple rounds of communication.

    For this reason, code generation should not be judged solely by whether a model can write a block of code. It is more important to evaluate whether the model can complete the entire loop from requirement analysis to runtime verification.

    This is especially important in frontend development. Whether a page has clear visual hierarchy, appropriate whitespace, and natural interactions has become an important measure of an LLM’s practical value.

    A model’s real-world capability can be summarized across three levels:

    1. Syntax level: Can it generate fundamentally correct code?
    2. Engineering level: Can it organize complex modules and complete debugging tasks?
    3. Experience level: Can it produce a complete application with functional, visual, and interaction quality?

    Based on these levels, this article presents a three-tier testing method that progresses from basic code generation to engineering collaboration and frontend experience.

    2. Standardizing the Test Setup

    To make test results meaningful, the variables should be controlled as much as possible. If models, prompts, and runtime environments differ without a consistent baseline, conclusions may be influenced by accidental factors.

    2.1 Use a Fixed Requirement Description

    During testing, use requirements that are structured but do not over-specify implementation details. For example:

    1. Build a task management page that includes a task list, status filters, a search box, and an option to add new tasks.
    2. Requirements:
    3. 1. Support both desktop and mobile layouts.
    4. 2. Use a clear component structure.
    5. 3. Provide loading, empty-data, and error states.
    6. 4. Explain how to run the project and organize its files.
    7. 5. Check the generated code for obvious errors.

    This type of requirement includes clear functional goals while leaving room for design decisions. It can therefore evaluate both the model’s engineering planning ability and its ability to make independent decisions.

    2.2 Standardize the Runtime Environment

    The test environment should remain consistent, including:

    • The same runtime versions;
    • The same browser or preview environment;
    • The same screen dimensions;
    • The same dependency installation conditions;
    • The same test data;
    • The same maximum number of modification rounds.

    If the model is allowed to access local files, run tests, or inspect a page, define its authorization scope clearly. Avoid allowing it to make large-scale changes to project files without an explanation.

    2.3 Create a Scoring Framework

    The following dimensions can be used for evaluation:

    Dimension What to Observe
    Requirement understanding Whether core functions and constraints are covered
    Code correctness Whether the project starts and contains obvious syntax errors
    Engineering structure Whether components, data flow, and files are organized reasonably
    Debugging ability Whether the model can locate and fix issues based on error information
    Visual design Color, spacing, hierarchy, and responsive behavior
    Interaction quality Loading, feedback, error handling, and state transitions
    Explanation quality Whether the model explains its approach, risks, and verification process
    Modification efficiency Whether it can iterate consistently after multiple rounds of feedback

    The score should not be based only on whether the final page looks good. Also record the number of modifications required to reach a usable result and the amount of manual intervention needed.

    3. Tier One: Basic Code Generation

    The first tier evaluates whether a model has stable foundational programming skills. It is best suited to small components and narrowly defined features.

    Possible tasks include:

    • Build a form with validation;
    • Implement a paginated list;
    • Create a reusable modal component;
    • Generate statistical cards from input data;
    • Implement a simple filtering and sorting module.

    The tasks should not be overly complex, but they should include edge cases. A form, for example, should handle empty values, invalid formats, repeated submissions, and submission failures—not just valid input.

    3.2 What to Observe

    First, check whether the model understands the requirement correctly. Many outputs appear complete but implement only the main flow and omit exceptional states. For example, a button may trigger submission without preventing repeated clicks; a list may render data without handling an empty array; or an input may have styling without actually being connected to application state.

    Next, examine the readability of the generated code. Variable naming, function responsibilities, and component boundaries all affect future maintenance. If the model places all logic in a single file, the page may still run, but this indicates limited engineering awareness.

    Finally, check whether the model verifies its own output. A high-quality coding assistant should not only provide code. It should also explain how to run the project, suggest tests, and identify potential risks.

    3.3 What a Qualified Output Should Include

    A relatively complete output for a basic task should normally include:

    1. An explanation of the file structure;
    2. The main source files;
    3. Instructions for running and verifying the implementation;
    4. Input validation rules;
    5. Error and exceptional-state handling;
    6. Possible directions for future extension.

    If the model generates only a static page without explaining data flow or state management, developers will still need to spend significant time reorganizing the implementation.

    4. Tier Two: Complex Engineering and Agentic Coding

    The second tier moves beyond individual components. It evaluates whether the model can plan, implement, and repair a complete feature around a broader requirement.

    4.1 Typical Task Design

    Ask the model to build a small business module, such as:

    • An administration page with filtering, pagination, and detail views;
    • A data management module supporting create, edit, delete, and undo operations;
    • A workspace with permission states, loading states, and error messages;
    • An application that reads local mock data and keeps frontend state synchronized.

    At this stage, the model must handle relationships between multiple modules rather than simply creating a page. You can also add an explicit constraint, such as “do not modify the existing data structure” or “preserve the current page entry,” to evaluate whether the model respects the existing context.

    4.2 An Agent-Style Workflow

    The key to agentic coding is not asking the model to output more code at once. It is helping the model establish a loop of planning, execution, verification, and repair.

    A recommended workflow is as follows.

    Step 1: Plan Before Coding

    Ask the model to list:

    • The files that need to be added or modified;
    • The responsibility of each file;
    • Data structures and state transitions;
    • Potential errors and exceptional cases;
    • The order of verification.

    This prevents the model from immediately starting implementation and later having to repeatedly rebuild the structure.

    Step 2: Implement in Stages

    Start with the smallest runnable version, then add features gradually. After each modification, ask the model to explain:

    • What changed in this round;
    • Why the change was made;
    • What needs to be verified;
    • Whether existing functionality could be affected.

    Incremental implementation makes problems easier to isolate and makes code quality easier to review than one-shot project generation.

    Step 3: Run and Inspect the Result

    When the environment allows it, ask the model to run a build, execute tests, or preview the page. Runtime results expose issues that static inspection may miss, including:

    • Incorrect import paths;
    • Inconsistent state variable names;
    • Missing event parameters;
    • Styles that do not take effect;
    • Layout overflow on mobile devices.

    Step 4: Repair Based on Error Logs

    A high-quality repair should not simply regenerate the code. The model should first explain the cause of the error and then propose the smallest appropriate change. If the same problem appears repeatedly, check whether the model actually understands the root cause.

    4.3 Key Evaluation Metrics

    For complex tasks, focus on four capabilities:

    • Context retention: Does the model forget existing constraints after multiple rounds of changes?
    • Change-scope control: Does fixing one issue break other functionality?
    • Error attribution: Can the model distinguish code errors, environment errors, and requirement conflicts?
    • Convergence: Can it reach a stable, usable result after several iterations?

    A model suitable for engineering collaboration does not necessarily need to produce a perfect first draft. It should, however, demonstrate strong correction and convergence capabilities.

    5. Tier Three: Frontend Aesthetics and Interaction Quality

    The difficulty of frontend code generation is often not writing buttons and lists. It is organizing those functions into an interface that feels coherent, visually intentional, and comfortable to use.

    5.1 Why Aesthetics Require Separate Testing

    The same set of functions can produce completely different user experiences. Low-quality pages often have the following problems:

    • All content is stacked inside a single container;
    • Too many colors are used without a clear hierarchy;
    • Typography, spacing, and button sizes are inconsistent;
    • Empty space is handled awkwardly;
    • Cards, tables, and dialogs lack visual emphasis;
    • Only the normal state is considered, with no loading or error feedback;
    • Mobile layouts introduce horizontal scrolling or clipped content.

    These issues may not cause runtime errors, but they directly affect how users judge product quality.

    5.2 Designing Prompts for Visual Quality

    If you only ask the model to “make it look better,” it will often produce generic decoration. A more effective approach is to describe visual goals and design constraints:

    1. Design the page as a clean, restrained, modern workspace.
    2. Requirements:
    3. 1. Use a clear content hierarchy and purposeful whitespace.
    4. 2. Give the primary action a clear visual priority.
    5. 3. Keep the color palette restrained and use semantic status colors.
    6. 4. Use consistent border radii and spacing across cards, lists, and dialogs.
    7. 5. Include loading, empty-data, error, and success feedback.
    8. 6. Avoid horizontal overflow on narrow screens.
    9. 7. Do not use decorative elements unrelated to the functionality.

    This type of description is easier for a model to translate into actionable design rules than a general request for a “premium” appearance.

    5.3 Aesthetic Evaluation Checklist

    The final page can be reviewed from the following perspectives.

    Layout

    Does the page have clearly defined primary, secondary, and action areas? Is there a reasonable maximum content width? Is spacing consistent between modules?

    Color

    Does the primary color guide user actions rather than cover large areas unnecessarily? Is there sufficient contrast between the background, borders, text, and status colors?

    Typography

    Are the hierarchy of headings, body text, and supporting information clear? Is long-form text easy to read? Are numbers, timestamps, and status labels formatted consistently?

    Interaction

    Does the user receive immediate feedback after clicking a button? Are repeated actions disabled during submission? When an operation fails, does the interface provide an understandable explanation?

    Responsiveness

    Can navigation, tables, cards, and dialogs reflow naturally across different widths? Are there hidden elements, compressed buttons, or overflowing input fields?

    Motion

    Does animation support state changes and spatial relationships? Subtle fade-ins, expansion effects, and loading feedback can improve the experience, while excessive animation increases cognitive load.

    6. Preventing “Looks Usable” Code

    6.1 Include Acceptance Criteria in the Prompt

    Do not describe only what should be built. Also explain how the completed result should be judged. For example:

    1. After implementation, check each item:
    2. - Is there clear feedback during the initial load?
    3. - Is an empty state shown when no data is available?
    4. - Is the user’s input preserved if submission fails?
    5. - Does a narrow screen produce horizontal scrolling?
    6. - Does every major action provide success or failure feedback?
    7. - Are there duplicate definitions or unused variables?

    This encourages the model to focus on completing the task rather than merely generating code.

    6.2 Ask the Model to Explain Its Trade-Offs

    Ask the model to explain:

    • Why it chose the current component structure;
    • Which areas use local state;
    • Which logic should eventually be extracted;
    • Which parts are only demonstration implementations;
    • Which security and performance measures are still required in a production project.

    The purpose of this explanation is not to generate more text. It helps developers determine whether the model actually understands its implementation decisions.

    6.3 Ask for a Reverse Code Review

    After code generation, provide a follow-up instruction such as:

    1. Act as a code reviewer and inspect the current implementation. Focus on:
    2. 1. Logic flaws;
    3. 2. State synchronization issues;
    4. 3. Missing edge cases;
    5. 4. Accessibility problems;
    6. 5. Responsive layout defects;
    7. 6. Structural decisions that may increase maintenance costs.
    8. Rank the findings by severity and provide the smallest practical fix for each.

    This is usually more effective than simply asking the model to “optimize the code,” because the review targets are explicit.

    7. From Test Results to Engineering Adoption

    After completing the three-tier evaluation, do not reduce the conclusion to whether a model is simply “good” or “bad.” Instead, determine which types of work it is suitable for.

    Tasks That Can Often Be Delegated Directly to a Model

    • Page prototypes and basic components;
    • Repetitive forms and list views;
    • Test data generation;
    • Comments, documentation, and type completion;
    • Local fixes for clearly identified errors;
    • Structured refactoring suggestions for existing code.

    Tasks That Still Require Thorough Human Review

    • Authorization and identity management;
    • Business logic involving sensitive data;
    • High-concurrency and high-reliability systems;
    • Payment, billing, and audit workflows;
    • Complex state machines;
    • Production environment configuration;
    • Security policies and compliance requirements.

    Models can accelerate implementation, but they cannot replace final accountability. Before generated code enters a production environment, it must go through human review, automated testing, and the necessary security checks.

    8. Conclusion: From “Writing Code” to “Completing Software Tasks”

    The code-generation ability of Chinese LLMs should not be evaluated solely through parameter size, single-task accuracy, or the impressive quality of one output. A more valuable approach is to place the model within a realistic development workflow and observe whether it can:

    1. Understand requirements correctly;
    2. Break down the engineering structure effectively;
    3. Generate runnable code;
    4. Discover and repair errors proactively;
    5. Handle exceptional and boundary states;
    6. Balance visual design with interaction quality;
    7. Converge reliably across multiple rounds of collaboration.

    The value of the three-tier method lies in separating code generation, engineering collaboration, and frontend aesthetics before evaluating them together under consistent standards.

    For developers, the ideal approach is not to treat a model as a fully autonomous programmer. Instead, use it as an intelligent collaborator that can participate in planning, implementation, verification, and review. With clear requirements, executable acceptance criteria, and continuous human oversight, model capabilities can be converted into reliable development productivity.