Evaluating LLMs in Frontend and Agentic Capabilities: From Visual Generation to Reinforcement Learning
While Large Language Models (LLMs) have made significant strides in code generation and agentic programming, generating a seemingly complete application does not equate to actual functional completion. This article analyzes the real capability boundaries of current LLMs in frontend and agentic scenarios through a series of typical tasks, ranging from visual generation and 2D interactive games to 3D scenes and reinforcement learning environments. It also outlines practical strategies for effective testing, prompt design, and engineering validation to bridge the gap between visual completeness and functional reliability.
In recent years, Large Language Models (LLMs) have shown remarkable progress in code generation and agentic programming. Given a simple natural language prompt, a model can often generate a seemingly complete webpage, interactive component, or even a mini-game featuring animations and training processes. However, “capable of generating” does not mean “truly complete.” Particularly in tasks requiring high precision in spatial relationships, physical rules, state synchronization, and executability, the output often suffers from surface-level completeness masking internal errors.
This article does not promote or evaluate any specific model. Instead, starting from a set of typical tasks, it analyzes the true capability boundaries of current LLMs in frontend and agentic scenarios.
1. Visual Generation is Mature, but Visual Appeal ≠ Implementation Quality
In terms of web visual presentation, current mainstream LLMs can generally generate rich page effects. For example, models can automatically incorporate gradient backgrounds, lighting, particles, transition animations, and card layouts, making the page look more complete at first glance.
This indicates that models have mastered a large number of common frontend design patterns and can piece together visual elements that meet expectations based on abstract descriptions like “tech-savvy,” “immersive,” or “gamified.”
However, a “decent” visual appearance only proves that the model possesses a certain degree of style generation capability; it does not mean it truly understands the design intent behind the requirements. A typical issue is that when a prompt requires a specific style, the model might accurately restate this requirement in its reasoning process or explanatory text, but the final code fails to implement the corresponding effect.
For instance, if a requirement asks for a chessboard to have a traditional ink-wash painting texture, the model might mention textures, brushstrokes, and ink layers, but the actual generated page still only features a standard dark gradient or a simple background. This highlights a critical phenomenon:
- The model can recognize and describe style keywords;
- The model can generate explanations related to the style;
- But the model may not be able to translate abstract aesthetic requirements into executable visual structures.
Therefore, you should not rely solely on the model’s reasoning or text explanations; the final rendered result should be the ultimate standard. For visual tasks, acceptance criteria should be as specific as possible—clearly defining color ranges, texture types, shadow directions, element hierarchy, and animation behaviors—rather than using vague terms like “premium,” “natural,” or “ink-wash style.”
2. Simple Interactive Tasks Can Still Expose Flaws in Common Sense
Tasks like Klotski (sliding puzzles) have relatively clear rules, primarily involving piece dimensions, occupancy relationships, movement directions, and exit conditions. LLMs can usually generate the board, pieces, and basic drag-and-drop logic, arranging the pieces into a seemingly reasonable initial state.
However, being able to “display pieces” is not the same as being able to “implement a complete game.” At the very least, the following must be verified:
- Whether the pieces are strictly aligned to the grid;
- Whether the width and height of different pieces comply with the rules;
- Whether boundary violations are allowed during movement;
- Whether pieces can overlap;
- Whether the system can determine if a path is valid;
- Whether undo, reset, and completion state prompts are supported.
If the model focuses only on the page appearance, it might generate a visually complete board that is logically inoperable. More notably, models sometimes claim in their explanations to have achieved a certain effect, but the corresponding textures, animations, or state validations are entirely absent in the code. This inconsistency between explanation and implementation is very common in complex generation tasks.
From an engineering perspective, requirements should be broken down into four layers: “static layout, interaction rules, state validation, and completion determination,” and tested separately, rather than compressing all requirements into a single prompt.
3. 3D Interactions are Most Prone to Spatial Relationship Errors
3D scenarios like bowling typically involve spheres, pin-shaped objects, collision relationships, cameras, and lighting. A model can quickly generate a 3D scene with rotation, shadows, and simple animations, but this does not mean the scene conforms to real spatial rules.
In practical testing, the most common issue is unreasonable spacing between objects. For example, pins might be arranged too sparsely, with obvious gaps between them, meaning that even if the ball rolls straight down the center, it cannot create a logical chain collision. Such errors are not necessarily rendering issues, but rather a lack of basic geometric constraints during modeling.
3D tasks must consider at least the following factors:
- Actual dimensions of objects;
- Spacing between objects;
- Consistency between collision bodies and visible models;
- Whether the camera angle causes spatial misjudgments;
- Whether there are height differences between the ground, spheres, and target objects;
- Whether animation speed matches collision detection frequency.
Additionally, overly dark interfaces are a frequent problem. Models often heavily utilize dark backgrounds and low-brightness materials to create an “immersive” or “sci-fi” feel, without simultaneously adjusting ambient light, rim light, contrast, and information hierarchy. The result is a visual style exists, but users cannot clearly see target objects, operational prompts, or status information.
For 3D pages, it is recommended to validate “visual atmosphere” and “operability” separately. Even if the page requires a dark theme, it must ensure that key objects, interactive buttons, and feedback messages maintain sufficient visibility.
4. Reinforcement Learning Examples Better Test Systemic Capabilities
Reinforcement learning tasks in a maze are far more complex than standard page generation. The model must not only draw the maze but also maintain the environment state, action space, reward mechanism, value table, training loop, and visualization results. Inconsistency in any single component can cause the program to fail or produce distorted training results.
Common issues in these tasks generally fall into four categories.
1. Inconsistency between Canvas Size and Maze Layout
Sometimes the agent generates a maze that is too large, nearly filling the entire page, leaving no room to display control panels, training buttons, and status information. Other times, the maze is not drawn correctly, leaving only the background or partial boundaries.
This indicates that the model has not established stable layout constraints. A more reliable approach is to define page regions first:
- Left side for the maze display;
- Right side for training parameters and status;
- Bottom for training progress or action buttons;
- All regions adapting to the window via responsive sizing calculations.
2. Coordinate Inconsistency between Environment and Agent Layers
This is one of the most severe issues. The maze walls, walkable areas, and agent position must use the same coordinate transformation rules. If the rendering layer uses one cell size while the action layer uses a different offset, the agent might appear to stand on a wall, pass through obstacles, or stop in the wrong cell.
A robust implementation method is to uniformly use grid coordinates:
Environment coordinates: (row, col)Screen coordinates:x = col × cellSize + offsetXy = row × cellSize + offsetY
All modules should only read and write grid coordinates, converting them to pixel coordinates only during the rendering phase. This prevents the issue of “one coordinate system for the map, another for the character.”
3. Training Loop Executable, but Results May Be Unreliable
Some generated programs can display value metrics and show gradual changes during training, even exhibiting a convergence trend. However, this does not mean the reinforcement learning implementation is correct.
At the very least, the following must be checked:
- Whether the initial state is fixed;
- Whether the terminal state is clearly defined;
- Whether hitting a wall provides reasonable feedback;
- Whether reaching the goal grants a significant reward;
- Whether there is a maximum step limit;
- Whether value updates only use legal actions;
- Whether exploratory behavior is maintained during training;
- Whether the policy can be executed independently after training.
Without a maximum step limit, the agent might loop within a local area; if the reward design is unreasonable, the model might learn to stay in place or circle around instead of reaching the goal. Therefore, the training curve cannot be the sole metric; the final path’s validity must be observed.
4. Lack of Runtime Validation During Generation
A prominent shortcoming of agentic programming is that the model might continuously generate multiple versions, with each fix only addressing a local issue, ultimately still failing to run. For example, the first version’s layout is out of control, the second lacks core graphics, the third draws the maze but cannot start training, and the fourth has coordinate misalignment.
This shows that while the model possesses a certain ability to repair code, it lacks a comprehensive awareness of regression testing. After each modification, the following should be re-validated:
- Whether the page can load;
- Whether the maze is fully displayed;
- Whether the start button is functional;
- Whether the agent is at a legal starting point;
- Whether each movement adheres to obstacle constraints;
- Whether the final path can be displayed after training;
- Whether the initial state is restored upon reset.
5. How to Design More Effective LLM Programming Tests
To avoid being misled by visual effects, a layered testing approach is recommended.
The first layer is static inspection, confirming that page structure, variable definitions, event bindings, and module references have no obvious errors.
The second layer is functional inspection, verifying operations like buttons, dragging, moving, resetting, training, and pausing one by one.
The third layer is rule inspection, using clear mathematical or logical conditions to verify results, such as pieces not overlapping, agents not passing through walls, and targets being in legal areas.
The fourth layer is exception inspection, actively testing empty inputs, repeated clicks, rapid operations, window resizing, and restarts.
The fifth layer is maintainability inspection, observing whether the generated code contains large amounts of duplicated logic, implicit states, global variables, and issues that are difficult to locate.
In prompt design, you should also avoid only describing the final effect. A better approach is to use phased requirements:
- First, design the data structures and coordinate system;
- Then, generate the static page;
- Next, add interaction logic;
- Finally, add training or animations;
- Require verifiable runtime results at each step.
6. A Rational Assessment of Current Capabilities
From these tasks, it is clear that LLMs perform well in the following areas:
- Quickly generating page skeletons;
- Combining common visual styles;
- Writing basic interaction logic;
- Translating natural language requirements into preliminary code;
- Modifying local issues;
- Generating prototypes with demonstrable effects.
However, human intervention is still required in the following areas:
- Complex spatial relationships;
- Physical and geometric constraints;
- Multi-layer state synchronization;
- Reinforcement learning environment design;
- Runtime error location;
- Consistency between visual effects and actual requirements;
- Overall regression after multiple rounds of modifications.
Therefore, LLMs are better suited as prototype development assistants and code collaboration tools, rather than complete replacements for testing, debugging, and architectural design. Judging whether a model is truly reliable should not be based solely on its ability to generate pretty pages, but on whether it can run continuously, respond correctly, follow rules, and maintain existing functionality unbroken after modifications.
Overall, while current LLMs can significantly lower the barrier to entry for frontend prototyping and interactive experimentation, there is still a noticeable gap before reaching the stage of “inputting requirements to stably deliver complex applications.” The truly high-quality approach to usage is to combine the generative capabilities of models with clear engineering constraints, automated testing, and human acceptance. Only then can visual completeness gradually translate into functional reliability.
