Evaluating Multimodal Models for UI Design: A Reproducible Framework
This article presents a reproducible evaluation framework for multimodal models in UI design. It covers a three-layer capability model—perception, understanding, and implementation—along with five scoring dimensions, controlled comparison settings, task design for data storytelling and product prototypes, screenshot-based visual checks, executable interaction tests, and result interpretation that separates first-pass quality from repair capability. It also provides practical recommendations for integrating design evaluation into engineering workflows.
1. Seeing an Image Is Not the Same as Completing a Design
Recognizing text in an image and describing its content only show that a model has basic visual perception. Design work requires three additional capabilities: judging the hierarchy of information, understanding the spatial relationships among elements, and aligning the visual style of a page with the tone of its content. These judgments must ultimately become a runnable page and be tested across different screen sizes.
Therefore, evaluating the design capabilities of multimodal models should cover the complete chain: from source material to judgment, from judgment to code, from code to screenshots, and from screenshots back to revision. Testing only one part of this chain can easily lead to one-sided conclusions.
2. Evaluation Framework: Three Capability Layers and Five Dimensions
Design capability can be divided into three layers:
- Perception layer: Whether the model can accurately read text, numbers, charts, and icons in the source material.
- Understanding layer: Whether the model can infer information hierarchy from requirements—for example, which dataset is the narrative throughline and which action is the core path.
- Implementation layer: Whether the model can translate understanding into a page with correct structure that adapts to multiple screens, and then locate and fix issues when they arise.
The scoring dimensions can be designed as follows:
| Dimension | What it examines | How it is judged |
|---|---|---|
| Information hierarchy | Whether the first screen highlights the topic and core data | Human rating, 1 to 5 |
| Spatial relationships | Whether module layout, whitespace, and alignment are reasonable | Compare with reference screenshots |
| Visual style | Whether typography, color, and information density match the topic | Human rating |
| Responsive behavior | Whether desktop and mobile screenshots show overflow or truncation | Automated detection plus human review |
| Interaction correctness | Whether clicks, playback, switching, and persistence meet expectations | Automated test cases |
3. Control Variables to Make Comparisons Meaningful
When comparing multiple models, most bias comes from inconsistent experimental conditions. The following elements need to be fixed:
- The same design specification and component constraints.
- The same set of source materials, including reference screenshots, structured data, and audio/video files.
- The same browser runtime environment and screenshot dimensions.
- The same cap on repair rounds—for example, one screenshot-based repair allowed per task.
- Record the runtime, iteration count, and input/output size of each run.
Results from a single run can fluctuate significantly. The same task should be run multiple times and evaluated statistically, to avoid treating accidental success as stable capability.
4. Task Design: Data Storytelling and Real Interactions
Good evaluation tasks should cover two types of scenarios.
The first is a data storytelling page. Inputs include a large set of annual data, a geographic basemap, and background images. The page is required to advance with scrolling: changes in year drive a line chart, and clicking a region switches the map and explanatory text. This type of task examines visual originality and information organization, and also tests whether the model understands the narrative order of the data.
The second is a product prototype page. Inputs include desktop and mobile reference images, structured location data, and a set of real audio files. The page is required to support map selection, playback controls, list switching, favorites, cross-view synchronization, and state restoration after refresh. This type of task is close to real development: the model must read the reference designs and also ensure correct logic.
5. Visual Acceptance: Use Screenshots and Standard Browser APIs to Find Layout Issues
Screenshot inspection is a key step in design-related tasks. Common defects include text overflowing its container, long words being truncated, modules overlapping, content being clipped by fixed heights, and map or canvas containers collapsing in height at a certain breakpoint.
Standard browser APIs can perform basic detection:
// Detect horizontally overflowing and clipped elementsfunction detectLayoutIssues(root) {const issues = [];for (const el of root.querySelectorAll('*')) {const style = getComputedStyle(el);if (el.scrollWidth > el.clientWidth + 1 && style.overflowX === 'visible') {issues.push({ type: 'overflow', node: el.tagName });}if (el.scrollHeight > el.clientHeight + 1 && style.overflowY === 'hidden') {issues.push({ type: 'clipped', node: el.tagName });}}return issues;}
Static DOM detection has limitations. For components drawn by scripts, such as maps and canvases, the rendering result may not be reflected in DOM dimensions. Therefore, it is also necessary to check the proportion of non-blank pixels in screenshots, or set minimum size thresholds for key containers, and verify them separately at multiple breakpoints. Detection results can only provide clues; in the end, a human still needs to review the screenshots.
6. Interaction Verification: Turn Behavior into Executable Test Cases
Interaction tasks cannot be evaluated by simply looking at the page. They should be broken down into executable test cases. The following pseudocode shows the idea behind state checks:
# Pseudocode: verify state restoration after selection, playback, and collectiondef test_playback_state_restores():open_page()select_place("Place A")press_play()assert player.is_playing()add_to_collection()reload_page()assert player.current_track() == "Place A"assert collection.contains("Place A")
Each test case should cover three situations: whether state transitions are correct, whether data persists after refresh or reopening, and whether multiple views are synchronized. Invalid inputs should also be added—for example, audio loading failure or missing data—to check whether the page has a reasonable degradation path rather than showing a blank screen or throwing an error.
7. Interpreting Results: Separate First-Pass Quality from Repair Capability
Passing on the first attempt does not mean that capabilities are the same. It is recommended to record the following metrics separately:
- First-pass success rate: The completeness of what the model delivers without feedback.
- Post-repair success rate: The final result after repairs are allowed.
- Repair dependence: The degree to which completing the task depends on browser screenshots and error feedback.
- Cost and time: Measured by token usage, runtime, and iteration count.
Solutions with high first-pass quality usually require less manual rework in real workflows. Solutions with high repair dependence require the evaluation environment to provide reliable screenshots and error feedback. Without a closed-loop environment, their performance may drop significantly. Both types of conclusions are valuable, but they should be presented separately rather than merged into a single total score.
8. Engineering Implementation Recommendations
- Integrate design evaluation into the continuous integration process, and rerun it whenever a model version or design specification changes.
- Keep input snapshots, screenshots, and logs from each run for traceability.
- Confirm asset licensing, especially for images, audio, and geographic data.
- Automated detection can cover only part of layout and interaction; manual spot checks cannot be omitted.
- Cost estimates should be based on actual metered data, not extrapolated from per-run quotes.
