Benchmarking Chinese Large Models for Frontend Generation: From Visual Quality to Agent Stability

    A practical evaluation of Chinese large language models for frontend generation, covering visual rendering, rule-based games, 3D spatial reasoning, reinforcement learning environments, and multi-turn agent execution. The results show strong progress in interface construction and visual design, but continued weaknesses in logic validation, coordinate consistency, physical constraints, and long-running stability.

    1. Evaluation Scope: From Generating Code to Delivering Working Applications

    Large language models have made clear progress in code generation and web development. Developers can describe a small game, a data visualization component, or even an interactive experiment, and the model can often generate the page structure, styling, and part of the interaction logic automatically.

    However, generating code does not necessarily mean delivering a usable result. For frontend applications, browser animations, and agent-based experiments, the important questions are not simply whether a page can open, but whether all of the following conditions are met:

    1. Does the page have a clear and readable visual hierarchy?
    2. Does the interaction logic follow common sense and the rules of the task?
    3. Are different rendering layers, coordinate systems, and data layers aligned correctly?
    4. Can the page continue running instead of displaying only a static result?
    5. Are the training and inference processes genuine and effective, rather than just accompanied by plausible explanations?

    Testing the latest generation of Chinese large language models against these criteria shows that they already perform well in visual generation and some code orchestration tasks. However, they remain noticeably unstable when handling complex interactions, physical constraints, and multi-turn agent execution.

    2. Visual Generation: Increasingly Polished, but Still Dependent on Real Rendering

    For visual presentation, mainstream models can generally generate pages with gradient backgrounds, lighting effects, particle animations, and card-based layouts. When the requirements are sufficiently specific, a model can quickly assemble an interface with a convincing demo appearance.

    For example, in 3D scenes or small games, a model may proactively add:

    • Emissive materials;
    • Shadows and reflections;
    • Floating particle effects;
    • Animated backgrounds;
    • Transition animations;
    • Semi-transparent panels;
    • Scene depth and decorative elements.

    These capabilities indicate that models have learned many common frontend visual implementation patterns. However, whether a page “looks similar” to a requested style and whether it actually satisfies the requirements are two different questions.

    Some models may state in their reasoning that they intend to implement a particular style, such as ink wash, paper texture, or traditional painting. Yet the final page may only contain a dark background, soft gradients, or a few particles, without any real material characteristics. This is essentially a mismatch between description and implementation: the model completes the style planning at the text level but fails to implement the required textures, brushwork, edge diffusion, or color variation in code.

    Visual generation should therefore be evaluated by inspecting the final page directly rather than relying on the model’s reasoning or generation summary. Important checks include:

    • Whether the background material actually exists;
    • Whether the lighting direction is consistent;
    • Whether the hierarchy between elements is reasonable;
    • Whether the animation matches the theme of the scene;
    • Whether colors and contrast meet readability requirements.

    In other words, visual evaluation must be based on the browser’s actual rendering output, not on the model’s claim that a feature has been implemented.

    3. Rule-Based Games: Correct Layout Does Not Guarantee Correct Logic

    In rule-based games such as Huarong Pass, models can usually generate a board, blocks, and an initial layout that appears correct. The real challenge, however, is modeling the rules rather than simply drawing the interface.

    A complete Huarong Pass implementation needs to handle at least the following:

    1. Mapping the board grid to actual pixel coordinates;
    2. Handling the occupied cells of pieces with different dimensions;
    3. Detecting boundaries during dragging;
    4. Detecting collisions between pieces;
    5. Distinguishing legal from illegal moves;
    6. Detecting the winning condition;
    7. Supporting different input methods, including mouse, touch, and keyboard controls.

    If a model generates only static blocks or fails to check adjacent positions during movement, the result may look like Huarong Pass without actually functioning as the game.

    Another common issue is the gap between the stated design and the implementation. A model may claim that it will use a particular artistic style, while the final result remains a collection of ordinary geometric shapes. This shows that models can mix requirements, implementation plans, and final code during generation, causing parts of the planning stage to be omitted from the actual implementation.

    For these tasks, test cases are more reliable than visual inspection. For example:

    1. Test 1: Attempt to move a piece outside the board. The system should reject the action.
    2. Test 2: Attempt to move a piece through another piece. The system should block the movement.
    3. Test 3: Complete the target layout. The system should trigger the win state.
    4. Test 4: Perform repeated rapid drags. The page should not produce overlaps or inconsistent state.

    Only after passing these tests can the generated result be considered genuinely playable.

    4. Physics and Spatial Reasoning: Where 3D Scenes Expose Weaknesses

    A 3D bowling scene is another useful test case. A model can usually generate a ball, pins, a lane, and a camera, and it can build a basic scene using a 3D rendering technology. However, the fact that 3D objects appear to exist does not mean that their spatial relationships are correct.

    A reasonable bowling layout must account for:

    • The spacing between pins;
    • The geometric structure of the pin arrangement;
    • The radius of the ball and the dimensions of the pins;
    • Ground friction and collision behavior;
    • The camera perspective;
    • The direction of the lighting;
    • The ball’s initial position and trajectory.

    If the pins are spaced too far apart, a ball moving along the center line may be unable to hit multiple targets. This is not a rendering problem, but a basic issue involving spatial relationships and physical rules.

    A scene that is too dark can also significantly reduce usability. A 3D interface must balance realism with readability. If a model pursues a “high-tech” appearance through a largely black background, low-brightness materials, and excessively strong shadows, several problems may occur:

    • Pin outlines become difficult to see;
    • Users cannot determine object positions;
    • Collision results are hard to observe;
    • Controls blend into the background;
    • Debugging becomes difficult because it is unclear whether objects have rendered correctly.

    A 3D page should therefore not focus solely on lighting effects. It should also enforce basic usability constraints, such as sufficient contrast between key objects and the background, clear boundaries around interactive controls, and auxiliary lines, grids, or status indicators when necessary.

    5. Maze Reinforcement Learning: A Test of Systems Engineering

    A reinforcement learning visualization inside a maze is usually more difficult to generate than an ordinary game because it combines environment modeling, agent actions, state updates, training loops, data presentation, and frontend rendering.

    A working maze reinforcement learning experiment should contain at least the following layers.

    1. Terrain Layer

    The terrain layer represents walls, paths, the start point, the goal, and obstacles. It can typically be represented using a two-dimensional array:

    1. 0: Walkable area
    2. 1: Wall
    3. 2: Start point
    4. 3: Goal

    2. Action Layer

    The action layer defines the operations available to the agent, such as moving up, down, left, or right. Each action must determine:

    • Whether the agent moves outside the boundary;
    • Whether it collides with a wall;
    • Whether it reaches the goal;
    • Whether a reward or penalty is triggered;
    • Whether the maximum number of steps has been reached.

    3. State-Value Layer

    If a Q-table is used, the system must store a value estimate for each state and action:

    1. Q(state, action)

    During training, the system should update these values based on the reward and the next state. It should not merely display a set of random numbers on the page.

    4. Rendering Layer

    The rendering layer converts the two-dimensional grid into a visual page. One of the most common problems is inconsistency between the action layer and the terrain layer. For example:

    • The logical grid uses row and column coordinates;
    • The page is drawn using pixel coordinates;
    • The agent’s position is calculated by cell;
    • The animation position is calculated as a proportion of the container.

    When these coordinate systems are not unified, the agent may pass through walls, drift away from its intended location, or move to a position that does not match the map.

    6. Multi-Turn Agent Execution: Failures Are Often Cumulative

    In practical testing, complex tasks often require multiple rounds of generation and repair. A model may first generate a maze that is too large and occupies most of the page. In the second round, it may adjust the layout but cause the core map to disappear. In the third round, the page may appear but fail to start the interaction. In the fourth round, training results may be visible, while the agent’s position still does not align with the terrain.

    This pattern shows that models often make local changes that cause global regressions during multi-turn repair. A model may fix a visual issue while breaking state management, or regenerate one component without updating the variables required by other modules.

    To reduce these problems, developers can divide the task into stages.

    Stage 1: Generate Only the Static Map

    First verify that the map dimensions, start point, goal, and obstacles render correctly. Do not add animation or training logic yet.

    Stage 2: Add Manual Control

    Use keyboard controls or buttons to move the agent and verify coordinate mapping and collision detection.

    Stage 3: Add Random Actions

    Allow the agent to move according to a random policy and confirm that the environment state updates continuously.

    Stage 4: Add Value Updates

    Once the basic logic is correct, integrate Q-value updates, reward calculation, and training episodes.

    Stage 5: Add Visual Enhancements

    Only then add color gradients, numerical labels, animations, and training curves.

    This incremental approach, which builds from underlying logic toward the presentation layer, is more reliable than asking a model to generate a complete application in a single step.

    7. How to Determine Whether a Model Has Actually Completed the Task

    For code generation models, it is useful to establish a functional acceptance process.

    1. Startup Validation

    The page should load correctly, the console should not contain obvious errors, and the main resources should be initialized.

    2. Interaction Validation

    Buttons, dragging, keyboard input, and mouse events should work correctly. Repeated operations should not create inconsistent state.

    3. Rule Validation

    Boundaries, collisions, winning conditions, and failure conditions must match the task definition. Visual appearance alone is not sufficient.

    4. State Validation

    Displayed data must come from real application state. For example, Q-values, training steps, and the current position should change as the system runs.

    5. Stability Validation

    After multiple rounds of continuous operation, the page should not crash, duplicate elements, or suffer coordinate drift. A single invalid action should not disable the entire application.

    6. Readability Validation

    Text, buttons, and scene elements must have sufficient contrast. A dark interface should not sacrifice usability for appearance.

    8. Overall Assessment: Strong Progress, but Reliable Delivery Remains Difficult

    Based on practical performance, the latest generation of Chinese large language models already demonstrates strong capabilities in frontend page construction, basic visual design, and the generation of some interaction logic. Their efficiency is especially apparent when creating complete demo pages quickly, adding animation effects automatically, and organizing multiple frontend modules.

    However, models still frequently encounter problems in tasks that require strict physical rules, multi-layer state management, consistent coordinate systems, and stable long-running execution. They can generate results that look complete without necessarily generating results that have been properly validated.

    This means that large models should not be evaluated only by whether a page looks attractive, whether the code appears complete, or whether the reasoning is well organized. More important questions include:

    • Can the generated result actually run?
    • Has the logic been tested against boundary conditions?
    • Does the application remain globally consistent after multiple rounds of modification?
    • Are the data and animations derived from real state?
    • Does the page meet basic usability and maintainability requirements?

    For developers, the most practical approach is not to rely on a model to generate the final product in one attempt. Instead, the model should be treated as a capable coding collaborator. It can build scaffolding, add styles, generate repetitive code, and suggest implementation strategies, while developers use testing, debugging, and architectural constraints to ensure that the final result is reliable.

    The capabilities of large models are improving rapidly. Moving from impressive demos to stable applications, however, still requires clear task decomposition, verifiable rule design, and continuous engineering-oriented testing.