LLM Coding Ability Evaluation: Understanding Depth in Real Projects
Most "model X matches flagship Y" claims rest on a few prompts and a few screenshots. This article walks through an end-to-end evaluation in which a complete frontend requirements document was handed to a model, with no tech stack specified and only acceptance criteria given. Capability clearly declines from static login pages to interactive list pages and constraint-dense forms. The main failure is under-reading and dropping requirements. The article explains why this happens and shows how to close the gap with itemized requirements, contract-first generation, automated gates, task-based model routing, and design tokens.
1. Beyond the Hype: Why Single-Point Demos Prove Little
Every few months, a new wave of discussions about whether a model “matches a certain flagship” takes over the feeds. These discussions share the same flaws: the sample is a few short prompts, the output is a handful of screenshots, and the conclusion is a verdict on whether some model is any good. Such evaluations can’t be reproduced, and they offer little guidance for engineering decisions.
An evaluation worth relying on should meet at least four conditions:
- Realistic inputs. Feed the model an actual business requirements document, not a one-liner like “build me a login page.” Real requirements come with implicit constraints: defaults, edge cases, empty states, error states, and permission differences.
- Runnable output. Ask for an accessible, working project, not code snippets in a chat window. Snippets always look correct; only running them reveals which lines don’t hold up.
- Tiered tasks. Reproducing a static single page, wiring up interactions across pages, and enforcing data contracts across layers are steps of very different difficulty.
- Controlled variables. Use the same requirements document, dependency versions, and generation parameters for every model. Otherwise, most of the differences you measure come from the environment rather than the model.
I ran one such evaluation. I handed a model a complete frontend requirements document and asked it to implement the whole thing end to end. I didn’t prescribe a tech stack or component approach, only acceptance criteria. The results were more nuanced than the marketing claims, and more useful.
2. The Capability Gradient: Instruction Adherence Drops at Every Tier
The results showed a clear three-stage decline. This wasn’t a one-off; it was a pattern I observed repeatedly.
Tier 1: Login Page — Static Reproduction Is Good Enough
The requirements called for a carousel, and the model delivered one. It called for remembering the login state, and that was implemented too. Fields, buttons, navigation, and basic form validation were largely in place, with no obvious gaps in the page structure.
At this tier, the output is close to “ship after a quick styling pass.” The reason is simple: login page requirements are flat. Fields are fixed, validation rules are simple, states are few, and cross-page contracts are almost nonexistent.
Tier 2: List Pages — Understanding Starts to Slip
Problems appeared on the product list page. I had spelled out the filters and their interaction logic in the requirements. The model got the page skeleton right, and the pagination and card layout were reasonable. But the filters were missing entirely. This wasn’t an isolated case: several list pages showed the same problem.
The failure mode isn’t writing something wrong. It’s under-reading. The model understood the page’s visual structure and information hierarchy accurately. But it silently compressed interaction constraints scattered through the middle of the document.
Tier 3: Form Pages — Complex Constraints Are Reconstructed Poorly
The form page ran. However, the field set, cross-field behavior, validation timing, and error messages deviated noticeably from the document. Complex forms are high-constraint-density tasks:
# Example snippet: many cross-cutting constraints live in the same documentfield: contactEmailrules:- Required when customerType = "enterprise"; otherwise optional- Format validation runs on blur; the error message appears below the field- At least one of contactEmail or contactPhone must be filled; checked together on submitfield: contractAmountrules:- Shown only when customerType = "enterprise" and contractFlag = true- Greater than 0, with no more than 2 decimal places- Linked to discountRate: recalculate the discounted price when the amount changes
A few hundred words of requirements can contain a dozen or more conditional rules like these, with dependencies among them. Nearly all of the deviations in the generated output came from these cross-cutting rules, not from simple required or format validation.
On Speed: Don’t Mistake Scheduling Variance for Capability
Generation time depends heavily on task complexity, service load, and account tier (free tiers typically have rate limits). For long tasks, end-to-end times on the order of tens of minutes are common. Equating “a given tier ran slowly” with “the model is weak” is a misattribution. A sounder approach is to break speed into comparable metrics and record each separately:
- Time to first token
- Generation rate
- End-to-end total time
- Number of interruptions and retries
3. Root Causes: Why Constraints Get Lost in Long-Chain Tasks
Understanding this decline shouldn’t stop at “the model isn’t good enough.” A more accurate description is: the longer the task chain, the denser the constraints, and the stronger the cross-file dependencies, the lower the instruction adherence. There are four main causes.
1. All requirements in context get equal weight. In a requirements document, “put the logo at the top of the page” and “email is required for enterprise customers” sit at the same textual level. Yet their engineering importance is completely different. The model has no built-in way to judge constraint priority. When it compresses context, it tends to keep frequent, structural content and drop rare, conditional content.
2. Contract drift. The form page references the same field in three places: type definitions, the API layer, and component state. Generation happens all at once. The field ends up as contact_email in the types, contactEmail in the request body, and a validation rule references a field that doesn’t exist. Such errors are hard to catch by reading; they surface as soon as the code compiles.
3. No execution feedback loop. Once the model finishes writing, it doesn’t run tests, run type checks, or open the page to inspect the result. Without feedback, errors propagate along the direction of generation and never self-correct.
4. Implicit requirements invite different assumptions. The document says “the list supports filtering.” You might picture always-visible filter controls that refresh the list immediately, sync parameters to the URL, and offer a reset option when results are empty. The model’s default might be a button that opens a filter drawer. That isn’t a misunderstanding. The requirement leaves room for interpretation, and the model didn’t ask.
4. Engineering Fixes: From One-Shot Generation to a Generate–Verify–Fix Loop
The conclusion isn’t “don’t use models for complex pages.” It’s that complex pages call for a different way of using them. Replacing one-shot generation with a constrained closed loop delivers immediate gains.
4.1 Itemize the Requirements to Surface Implicit Constraints
Rewrite the document as a checklist with a unique ID and a verification method for each item:
page: product_listacceptance:- id: PL-01desc: Switching the category filter refreshes the list immediately and syncs filter parameters to the URLverify: e2e- id: PL-02desc: When filter results are empty, show a placeholder illustration and a "Reset filters" actionverify: e2e- id: PL-03desc: Show a skeleton screen while the list loads, with no layout shift on first renderverify: visual
This checklist serves three purposes. It makes constraints explicit. It becomes part of the prompt during generation. And it serves as the basis for checking off each item afterward. In practice, the rate of missing features dropped significantly once the requirements were itemized. “Filters” was no longer a vague phrase but a record that would be checked.
4.2 Define the Contract First, Then Generate the Implementation
First, have the model produce the data model and API contract. Confirm them, then generate the UI. Don’t let it invent field names while generating the UI:
// Step 1 output: the single source of truth for fieldstype CustomerType = "individual" | "enterprise";interface CustomerForm {customerType: CustomerType;contactEmail?: string;contactPhone?: string;contractFlag: boolean;contractAmount?: number;discountRate: number;}// Step 2 output: validation rules that reference the contract; undefined fields are not allowedtype Rule = (v: CustomerForm) => string | null;const rules: Rule[] = [(v) =>v.customerType === "enterprise" && !v.contactEmail? "Enterprise customers must provide a contact email": null,(v) =>!v.contactEmail && !v.contactPhone? "Provide at least one of email or phone": null,(v) =>v.contractFlag && (v.contractAmount ?? 0) <= 0? "Contract amount must be greater than 0": null,];
Once the contract is in place, type checking catches most drift automatically. A mistyped field name fails to compile instead of failing at runtime.
4.3 Automated Gates at Every Stage
Break the process into serial gates. If a gate fails, send the error back for regeneration rather than writing more code:
const gates = [{ name: "Type check", run: () => exec("typecheck") },{ name: "Static analysis", run: () => exec("lint") },{ name: "Unit tests", run: () => exec("test") },{ name: "E2E acceptance", run: () => exec("e2e", "--acceptance=./acceptance.yml") },];for (const gate of gates) {const result = await gate.run();if (!result.ok) {await regenerate(gate.name, result.log); // Fix only the issue in this gatecontinue;}}
The key is feeding failures back in structured form. Sending raw compiler output to the model yields a much higher fix success rate than telling it to “check again.”
4.4 Choose Models by Task, Not by Leaderboard
Within the same loop, different stages demand different capabilities. Static reproduction and copy generation can go to lower-cost models. Long-chain tasks like reasoning through complex constraints and refactoring across files suit models with deeper understanding.
A common enterprise practice is to build an internal benchmark set of real requirements from their own business. They run it repeatedly and track three metrics: first-pass rate, number of rework rounds, and time spent on human intervention. Those metrics then guide routing decisions.
Capabilities like these are generally available as standard offerings across major cloud platforms, such as model services, object storage, container platforms, logging, and monitoring and alerting. Baidu AI Cloud offers these same standard components, which can be combined into a complete generation and evaluation pipeline.
5. UI Style: Engineering Usability Doesn’t Mean Good Design
To be fair, end-to-end generated UIs tend to have complete structure and clear semantics, but they fall short on aesthetics.
The gap comes from specific, addressable sources:
- Spacing and hierarchy. Random margins like 13px and 17px make a page look cheap. Align everything to a 4px-based scale and the visuals stabilize immediately.
- Color semantics. With only a primary color and a grayscale palette, there are no semantic colors (success, warning, danger, info). States have to be carried by text alone.
- Component consistency. Similar buttons, inputs, and cards go their own way. Border radii, borders, and shadows all use different values.
The most effective move is to supply design tokens upfront, turning aesthetic issues into numeric ones:
:root {--space-1: 4px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-6: 24px;--radius-sm: 4px;--radius-md: 8px;--color-text-primary: #1f2329;--color-text-secondary: #646a73;--color-border: #e5e6eb;--color-brand: #2b5cff;--color-success: #23c343;--color-warning: #ff7d00;--color-danger: #f54a45;}
Once tokens are in the prompt, the visual consistency of the output improves markedly. The model no longer has to invent design decisions; it just fills in fixed values. This reflects a broader rule: constraints that can be described structurally are followed far more reliably than those described in natural language.
6. What This Means for Open Models and AI Development
Back to the original question: as open-weight models close the gap to international flagships on real tasks, what does that mean for the open-source ecosystem and the industry? I see three substantive shifts.
First, the nature of the capability gap has changed. When the gap shifts from “can’t do it” to “still degrades in long-chain comprehension depth,” it becomes an engineering problem rather than a capability barrier. It shows up in how well constraints survive context compression, in contract consistency across files, and in multi-turn self-correction. All three can be mitigated significantly through itemized requirements, contract-first generation, and automated gates. Open weights add value here: the community can publicly verify, reproduce, and iterate on these techniques, rather than depending on a single vendor’s roadmap.
Second, controllability has become decisive for enterprise adoption. For most enterprises, the ability to deploy privately weighs more than a few points of accuracy. It delivers data residency, auditability, fine-tuning, and predictable costs. Open models also let companies adapt to their own domain on their own codebases. They can bake internal framework conventions, component standards, and coding styles into model behavior, which is hard to achieve through an external API.
Third, transparent evaluation benefits the whole industry. Once evaluation moves from screenshot comparisons to reproducible internal benchmark sets, every participant must compete under real constraints rather than marketing claims. For users, that means model selection decisions have evidence behind them and trial-and-error costs go down.
7. A Reusable Evaluation Checklist
To run a similar evaluation within your own team, follow this sequence:
- Pick a real requirement with clear boundaries. Prepare the full requirements document and an acceptance checklist.
- Don’t specify a tech stack; constrain only the acceptance criteria. Watch whether the model’s default technology choices are sensible.
- Progress through three difficulty tiers: static page, interactive page, complex form. Record the first-pass rate at each level.
- Record the specific items that were missed and classify them by failure mode: under-reading, misunderstanding, or implementation error.
- Record time to first token, end-to-end duration, and number of rework rounds separately. Don’t count load-related variance toward the capability score.
- Add type checking and automated tests as gates, then re-run the evaluation to see how much adherence improves.
- Produce an internal benchmark set so the conclusions become a basis for model selection rather than a one-time impression.
The final takeaway isn’t dramatic. End-to-end generation has made static reproduction usable and interactive logic partially usable. High-constraint-density complex logic is still left to the engineering process. The tool’s limits are clear: whoever organizes work best within those limits delivers faster. That matters more than any flagship-style marketing claim.
