AI Code Generation Tested: Comprehension Is the Real Divide, Not Generation Speed

    This article reports on a hands-on evaluation of AI code generation using a complete, structured frontend requirements document as the sole acceptance criterion. Across login, list, and form pages, the tested models delivered code that runs and looks structurally sound, but comprehension degraded as requirements grew more complex: filtering and linked interactions on list pages were dropped entirely, and form fields lost implied validation constraints. The conclusion is that generation capability and comprehension capability are two orthogonal dimensions — the former sets a floor, the latter sets a ceiling — and that rework rate, not generation latency, is the hard metric for engineering-grade usability. The article closes with practical guidance for developers and a discussion of why closing this comprehension gap matters more for open-weight models than benchmark rankings.

    1. Why “It Generates” Is Not the Same as “It Ships”

    Smart coding tools are iterating fast, and “generate an entire project from one sentence” has moved from concept to routine. Yet what actually frustrates developers is rarely whether a model can generate — it is whether the output is usable, and how painful it is to fix.

    When a model is handed a structured requirements document, the real question is whether it read the business logic word by word, or simply assembled an interface that looks the part but misses the substance.

    That question defines the core of evaluating LLM code capability: generation ability (can it produce runnable code) and comprehension ability (can it faithfully reconstruct the intent of the requirements) are two orthogonal dimensions. The first measures the floor; the second determines the ceiling. Conflate them, and the evaluation verdict becomes badly distorted.

    2. Evaluation Method: End-to-End Delivery Driven by Real Requirements

    To avoid the shallow conclusions typical of “toy demo” tests, I designed an evaluation flow that stays as close to real engineering as possible:

    • Input side: a complete, well-structured frontend requirements document specifying the page inventory, field definitions, validation rules, and interaction logic.
    • Constraint side: no preset tech stack, so the model’s technology choices and architectural habits can be observed under open constraints.
    • Delivery side: the deliverable had to be a complete, directly runnable project — not scattered snippets that are hard to assemble.
    • Acceptance side: the document itself was the only acceptance criterion. Feature fidelity was checked item by item, rather than judged by subjective impressions of whether the pages looked good.

    The value of this approach is that it exercises the full chain from requirements → architecture → implementation → delivery, instead of the correctness of one isolated function. Only an end-to-end run exposes the real capability boundary.

    3. Page-by-Page Breakdown: How Comprehension Decays Layer by Layer

    3.1 Login Page: Steady-State Capability Is Already Mature

    Login and registration pages are a highly standardized product category: form inputs, carousel displays, basic interactions. In this evaluation, the model covered every feature listed in the document. The page structure was complete and the interaction loop closed properly, reaching the level of “tweak a little and ship.”

    This confirms one judgment: for scenarios with highly converged patterns and abundant public training data, the floor of mainstream LLMs is now fairly reliable, and producing a first draft can be handed over with reasonable confidence.

    3.2 List Page: Comprehension Starts to Slow Down

    The problem appeared on the product list page. The document explicitly specified filter conditions and linked interactions, but the generated page omitted the filtering feature entirely — the page skeleton was correct, while the functional semantics were discarded.

    Worth emphasizing: this was not a one-off slip but a systematic weakness shared across multiple list pages. It points to a deeper issue — when requirements escalate from a “single feature” to “multiple conditions plus linked logic,” the model’s ability to capture intent degrades noticeably. Reproducing a skeleton does not mean the semantics were understood.

    3.3 Form Page: Complex Faithfulness Is the Real Divide

    The form page widened the gap further. Dependencies between fields, linked validation, conditional visibility, submission logic — these are exactly the measures of business complexity. The model got the basic flow working, but deviated noticeably from the document on field fidelity and validation detail.

    Take a simple validation requirement. The document might read:

    1. // Requirement: phone number is required and must match an
    2. // 11-digit mainland China mobile number format
    3. const validatePhone = (value) => {
    4. if (!value) return 'Phone number is required'; // required check
    5. if (!/^1[3-9]\d{9}$/.test(value)) // format check
    6. return 'Invalid phone number format';
    7. return '';
    8. };

    Shallow generation typically produces just an input box and a submit button, missing the two implied constraints: “required” and “format.” The defining trait of such requirements is that correctness cannot be masked by “looking right.” A missing validation rule may be harmless in a demo, but in production it can directly cause dirty data and compliance risk.

    4. The Core Tension: Engineering-Usable vs. Visually Polished

    Taking the three page types together yields a clear positioning verdict:

    • UI appearance: better than most prototyping tools, but still behind mature component-based design systems. The style is engineering-oriented and restrained, lacking the design tension that makes something stand out.
    • Engineering usability: pages run and the structure is complete — a genuine “usable” tier.
    • Fidelity precision: against complex interactions and business logic, insufficient comprehension depth becomes the primary bottleneck.

    In other words, the current capability can be summarized as: engineering-usable > visually polished, and generation ability > comprehension ability.

    5. Key Insight: Speed Is Not Depth

    The most misleading metric is generation speed. Faster responses do improve the experience, but if the resulting project needs heavy manual rework to align with the requirements, the speed advantage is quickly cancelled out by fix costs. Ten minutes saved on generation, several hours added on rework — the total is a net loss.

    What actually determines delivery quality is comprehension precision:

    • The ability to capture implicit constraints in the document;
    • The ability to faithfully reconstruct field dependencies and validation chains;
    • The ability to cover interaction states completely (empty, loading, and error states).

    None of these can be compensated for by being “faster.” So evaluating a model should not stop at “how many seconds to generate” — it must also ask “how much needs changing afterward.” Rework rate is the hard metric for engineering-grade usability.

    6. What This Means for the Open-Source Ecosystem and AI Progress

    When a capable model appears as an open-weight release, its significance goes well beyond the outcome of a single benchmark:

    1. Lower barrier to entry: open weights let developers deploy in their own environments, avoiding queues and rate limits, and make it easier to fine-tune for specific business scenarios.
    2. Data control: enterprises can keep sensitive requirements documents inside private environments, meeting compliance and confidentiality needs.
    3. Ecosystem vitality: models that can be freely trimmed, distilled, and built upon can spawn a large number of vertical industry solutions, forming a layered landscape of “foundation model + domain fine-tuning.”
    4. Healthy competitive pressure: as open models close in on closed-source flagships, they continuously squeeze closed-source premiums and push the whole industry to evolve faster on inference cost, long-context handling, and multi-turn comprehension.

    One thing should be said plainly: capability parity is a moving target. On standardized scenarios, open models already have real deployment value; on complex business comprehension and faithful reconstruction, there is clear room to improve. That is precisely the direction most worth investing in for the open-source community — not a score-chasing leaderboard contest, but tackling the comprehension of genuinely complex requirements.

    7. Practical Advice for Developers

    Based on the above, a few recommendations for peers already using AI coding tools:

    • Document-driven: the more structured the requirements document and the more explicit the constraints, the higher the model’s fidelity. Vague descriptions are the largest source of comprehension errors.
    • Divide and conquer: break complex pages into small verifiable steps — get the skeleton running first, then add validations and linked behavior item by item.
    • Let testing drive usage: build a closed loop of “generate → verify against the document → targeted feedback,” and treat the model as a collaborator that needs guidance rather than a one-shot outsourcer.
    • Set reasonable expectations: standardized modules can be handed to the model with confidence, while complex business logic still needs human oversight of design and acceptance.

    Conclusion

    Between “it can generate” and “it can deliver” lies exactly this divide: comprehension ability. For open models, narrowing that gap is worth more than a transient benchmark position. For developers, recognizing the divide is what moves AI coding tools from “impressive demo” to “trustworthy in production.”