Three-Tier Testing: Evaluating LLM Code Generation and Aesthetic Capabilities
As large language models (LLMs) transition from one-shot code generation to agentic coding workflows, traditional pass/fail evaluations are no longer sufficient. This article introduces a three-tier testing framework to comprehensively assess LLM coding capabilities. Tier 1 focuses on single-point correctness, Tier 2 evaluates engineering collaboration and agentic reflection, and Tier 3 measures product-level aesthetics and user experience. By adopting this structured approach, development teams can accurately diagnose capability boundaries and transition from one-off generation to reliable agentic programming practices.
Three-Tier Testing: Evaluating LLM Code Generation and Aesthetic Capabilities
1. Why We Need Tiered Evaluation
The way large language models participate in programming is changing. Early usage was closer to one-shot Q&A: given a prompt or requirement, the model returns a snippet of code, and the developer manually copies, modifies, and verifies it. The ceiling of this model depends on the quality of a single generation, and failures often require re-describing the problem. Agentic Coding, on the other hand, emphasizes a closed loop of “plan—execute—verify—reflect—fix”: the model must not only generate code but also understand context, propose solutions, run or simulate verification, fix based on failure information, and explain the impact of changes.
Therefore, evaluating an LLM’s coding capabilities cannot be limited to “whether the code runs.” A single-point function might pass, but it could break interface contracts in a multi-file project; a page might render, but with chaotic information hierarchy, missing states, or mobile overflow; a single generation might look correct, but switching inputs can expose missed edge cases. A more reasonable approach is to establish a tiered testing system: the first tier checks single-point correctness, the second tier examines engineering collaboration and the reflection closed-loop, and the third tier evaluates the ceiling of product-level aesthetics and experience. These three tiers are not simply a linear increase in difficulty, but diagnostic tools for different capability dimensions.
The test design should follow four principles. First, reproducibility: fix task descriptions, input samples, constraints, and scoring rubrics, avoiding substituting “feels good” for objective judgment. Second, clear tiering: each tier should only answer a core question, avoiding mixing syntax errors, architectural flaws, and visual issues into a single score. Third, actionability: break down “aesthetics” into checkable dimensions such as information hierarchy, spacing rhythm, color contrast, state completeness, and accessibility. Fourth, safety and compliance: test tasks should not introduce sensitive dependencies, should not require generating identifiable external brand content, and code examples should use generic descriptions and custom interfaces.
2. Tier 1: Single-Point Code Correctness
The first tier focuses on “getting it right locally.” Tasks can include algorithm implementation, data transformation, bug fixes, interface contract completion, and boundary condition handling. Evaluation metrics look beyond the pass rate to include edge case coverage, exception handling, reasonable complexity, clear naming and comments, and the absence of unnecessary dependencies. Prompts should require the model to list assumptions first, then provide the implementation, and finally attach self-check test cases. For example:
Task: Implement pagination parameter normalization.Constraints: Return default value for empty input; fallback for illegal values and explain the reason; do not rely on external libraries.Output: Implementation code, edge case checklist, complexity explanation.
Schematic test cases can be written as structured objects to facilitate batch comparison:
case = {id: "L1-boundary-01",task: "Pagination parameter normalization",constraints: ["Empty input", "Negative numbers", "Oversized values", "Non-numeric strings"],acceptance: ["Function has no external dependencies", "All edge cases pass", "Stable return structure"]}
Common failure modes include: looking correct but missing null values; silently failing on illegal input; hallucinating non-existent interfaces; stacking overly complex judgments for “robustness”; and inconsistency between explanations and code. The improvement method is not simply retrying, but requiring the model to explicitly list the input domain, output domain, exception strategy, and test cases, and checking them one by one after generation. The value of the first tier lies in quickly filtering out fundamental correctness issues, providing trustworthy building blocks for subsequent engineering tests.
3. Tier 2: Engineering and Agentic Reflection
The second tier focuses on “whether it still holds up when placed into an engineering context.” Tasks should include multi-file modifications, module splitting, interface compatibility, regression risk analysis, test additions, and change documentation. The core of Agentic Coding is not generating more code at once, but possessing reflective capability: read the context first to form a plan; then modify; locate the failure cause based on test results or review feedback; and finally fix and log the decision. A schematic loop can be written as:
plan = model.plan(task, repo_map, interface_contract)for round in 1..N:patch = model.code(plan, context)result = run_tests(patch)reflection = model.reflect(result, diff, constraints)if result.pass and review.ok:breakcontext = update(context, result, reflection)
Evaluation metrics include first-round pass rate, iteration rounds, regression impact scope, reasonable test coverage, adherence to interface contracts, and traceable explanations. Common failure modes are: local patches breaking public interfaces; duplicating existing capabilities; ignoring key clues in failure logs; context drift causing modifications to the wrong file; and only adding tests that “pass” while missing real edge cases. Improvement suggestions involve providing a repository map, interface contracts, acceptance criteria, and failure logs, requiring the model to output a plan before coding, and answering “what caused the failure, which callers are affected, and what to verify next” during each reflection round. The second tier reveals whether the model truly possesses engineering collaboration skills, rather than just snippet generation skills.
4. Tier 3: Product-Level Aesthetics and UX Ceiling
The third tier focuses on “whether the product is usable, visually pleasing, and maintainable.” Aesthetics is not an unassessable subjective feeling; it can be broken down into checkable rubrics: whether the information hierarchy is clear; whether the layout rhythm is stable; whether color contrast meets readability standards; whether interaction states are complete (including loading, empty states, errors, disabled states, success feedback); whether the responsive layout overflows; whether the copy is consistent; whether components and design tokens are unified; and whether the code structure supports future expansion. Test tasks can require the model to generate pages or components based on given design tokens and a component list, and attach a state checklist and accessibility self-check. Scoring can adopt a one-to-five scale, scored independently by two reviewers, followed by a discussion of disagreements.
Common failure modes include: templated stacking causing visual fatigue; insufficient contrast; only building static main states while missing exception and empty states; text overflow on mobile; arbitrary overriding of design tokens; and missing interaction feedback. The improvement method is to front-load aesthetic acceptance: provide design tokens, layout constraints, a component list, and an acceptance checklist; require the model to output the information architecture and state matrix first, then generate the implementation; have it self-evaluate and fix after generation; and finally conduct a blind manual review. The significance of the third tier is moving from “can generate an interface” to “can support a product experience,” while observing whether code maintainability deteriorates as visual complexity increases.
5. Scoring and Result Interpretation
The three tiers should carry different weights. Bug fixing scenarios should emphasize the first and second tiers, while interface generation scenarios should emphasize the third tier. When interpreting results, do not just look at the average score, but at the distribution of failure types: are there more missed edge cases, more interface breakages, or insufficient state coverage? It is recommended to record the pass rate per tier, iteration rounds, number of critical failures, manual review disagreements, and stability. Running the same test set multiple times allows observation of output volatility; anonymizing and blind-evaluating key tasks reduces the influence of brand or style preferences. Ultimately, this forms a radar-style capability profile rather than a single ranking.
6. Implementation Recommendations
Establish a small, refined test set: 10 to 20 tasks per tier, covering typical and extreme scenarios; maintain versioning and update regularly; keep task descriptions neutral without relying on specific product interfaces; solidify scoring rubrics in advance; retain failure logs and interface contracts for engineering tasks; and retain design tokens and state lists for aesthetic tasks. The goal of evaluation is not to prove which model is the “strongest,” but to determine its capability boundaries in specific scenarios, and to continuously improve through prompt engineering, context organization, verification loops, and manual review. The three-tier testing breaks “running successfully” down into correctness, engineering capability, and experience ceiling, helping teams transition from one-off generation to reusable agentic coding practices.
