Evaluating Multimodal LLMs for Web Page Generation: Benchmarks and Practical Lessons

    This article explains an evaluation of multimodal large language models on web page generation, which is moving from single-file code completion toward end-to-end page delivery. It covers three progressively harder test tasks, the models' strengths in factual grounding, instruction following, and motion implementation, the main failure modes, and engineering practices such as layered acceptance checks, observable pipelines, and human review.

    1. Background: From Writing Code to Delivering Pages

    Multimodal large language models are improving, and front-end generation is moving beyond single-file code completion. The work now covers a longer chain: understanding requirements, retrieving information, generating assets, implementing the page, and validating interactions. The original evaluation tested a group of open-source multimodal models on three tasks: building a cross-disciplinary creative website, recreating a page with random motion effects, and reproducing a highly complex website. Instead of focusing on one model version, the more useful question is whether a multimodal model can balance factual constraints, aesthetic expression, code structure, and interaction state.

    This kind of evaluation matters for developers. It shows what role a model can play in real business work, and it exposes the main risks in complex front-end generation. This article covers the task design, the notable capabilities, the failure modes, and the engineering methods.

    2. Evaluation Design: Three Progressive Tasks

    To test more than whether a model can generate an attractive page, the evaluation used three tasks of increasing difficulty:

    1. Cross-disciplinary creative website: The model combines nature writing, ecological photography, geographic facts, and front-end development to build a website with a narrative quality. It must also supply images, travel logs, and character profiles on its own.
    2. Random motion page recreation: The target page shows buttons and images that appear at random, following no pattern that is easy to summarize. The model receives only one sentence of prompt. The evaluation focuses on how well it manages motion state and restores the interaction topology.
    3. High-complexity visual website recreation: The target page has layered information, rich motion effects, and tightly coupled components. The evaluation checks whether the model can break down the structure, restore the styling, and keep interactions consistent.

    Evaluation should go beyond checking whether the page loads. Metrics should include requirement understanding accuracy, factual consistency, asset coverage, code maintainability, motion state correctness, responsive behavior, accessibility, and how easily failures can be diagnosed.

    3. Notable Technical Strengths

    1. Stronger Active Retrieval and Factual Grounding

    In the creative website task, the model showed a strong ability to organize knowledge across disciplines. It added geographic, ecological, and literary background around the topic, and it tried to tie visual assets to factual constraints. For example, the page included details such as “a dead tree beside a lake.” This shows that the model did not simply fill in a template. It mapped factual text onto visual elements.

    This capability depends on combining retrieval-augmented generation with multimodal asset generation. The model first builds a list of facts, then generates the page structure and image assets, and finally uses the copy and images to check each other. For businesses, this means the model can handle a first draft of content planning and a page prototype. Humans still need to confirm the factual sources.

    2. High Instruction Following and Role-Based Writing

    The model followed a complex instruction to build the website from the perspective of a nature writer. It produced portraits, travel logs, narrative copy, and page structure, which shows strong role-based writing. The value of this result is not that the model imitates a specific person. The value is that it can keep a consistent style, a consistent point of view, and a consistent narrative thread across a long context.

    For developers, this points to a reusable practice: write brand tone, content rules, and page structure as a constraint list, so the model follows them across multiple generation steps. For example:

    1. {
    2. "style": ["Natural storytelling", "Low-saturation visuals", "Ecological documentary"],
    3. "must_include": ["Geographic facts", "Species information", "Travel log", "Author portrait"],
    4. "forbidden": ["Fictitious protected area names", "Data without sources"],
    5. "acceptance": ["Readable on mobile", "Images have alt text", "Facts are traceable"]
    6. }

    3. From Static Pages to Motion Effects

    In the random motion recreation task, the model produced basic motion effects such as loading gradients and elements swinging left and right. This shows that it can generate basic CSS animation and interaction code. However, the more complex task, with components that fall at random, bounce, and pop up unpredictably, had a high failure rate. The cause is usually not a lack of animation skill. The model often lacks a consistent model of physical rules, state machines, and random events.

    Simple motion can be handled with CSS. Complex motion needs explicit state management. For example:

    1. type MotionState = {
    2. phase: "idle" | "falling" | "bouncing" | "settled";
    3. velocity: { x: number; y: number };
    4. collided: boolean;
    5. };

    If a model generates animation code directly without first defining a state machine, the result often looks animated but behaves in ways that cannot be controlled.

    4. Key Failure Modes and Risks

    1. Insufficient Recreation of Complex Interaction Topology

    On pages where random buttons, pop-up windows, and images combine, the main difficulty is that the event triggers are uncertain. The model can copy the visual style, but it struggles to reproduce when an event fires, how many times it fires, and how the state resets. If several rounds of revision produce versions that differ little from one another, the model is not improving much from root cause analysis and feedback. Engineers need to break the problem down into a state machine themselves.

    2. Semantic Coverage Bias

    In the creative website task, pages sometimes covered landscapes but omitted organisms and ecological chains. This is semantic coverage bias. The model met the surface requirement of including natural elements but missed the deeper requirement of a complete ecological narrative. In engineering, acceptance criteria should be broken down into specific items, such as at least three types of species information, at least two geographic facts, and at least one traceable source.

    3. Fabrication That Looks Plausible

    More concerning than ordinary hallucination is content that is internally consistent but unverified. The model may invent travel logs, location details, or ecological descriptions that sound reasonable. It does not simply answer incorrectly. It fills gaps in the narrative on its own. Possible safeguards include requiring a fact list with source placeholders, adding factual constraints to image generation, labeling unverifiable content as creative fiction, and conducting human review before publication.

    5. Engineering Evaluation and Implementation Recommendations

    First, establish layered acceptance checks. The structure layer checks routes and the component tree. The style layer checks responsive behavior and visual regression. The interaction layer checks state machines and event sequences. The content layer checks facts and copyright.

    Second, use an observable pipeline to record each generation’s task description, constraint list, output version, and failure reason. On the deployment side, Baidu AI Cloud’s object storage, log service, and monitoring and alerting capabilities can help build a traceable evaluation environment.

    Third, cross-validate results with several AI coding tools. This reduces the self-evaluation bias that comes from relying on a single model.

    We recommend writing the evaluation as an executable script:

    1. type CheckResult = { name: string; pass: boolean; detail?: string };
    2. async function runAcceptance(page: Page): Promise<CheckResult[]> {
    3. return [
    4. await checkResponsive(page, [375, 768, 1440]),
    5. await checkA11y(page),
    6. await checkNoBrokenLinks(page),
    7. await checkRequiredSections(page, ["Ecological information", "Travel log", "Author introduction"]),
    8. await checkMotionStates(page, ["idle", "falling", "settled"])
    9. ];
    10. }

    6. Conclusion

    Multimodal large language models have moved from writing pages to retrieving facts, generating assets, following complex instructions, and attempting motion implementation. Their weaknesses are also clear: complex interaction topology, physics-based motion, semantic coverage, and fabrication still need engineering constraints. A practical approach is to have the model produce a first draft, apply a constraint list, run automated acceptance checks, and finish with human review. This places creative output inside a verifiable delivery process instead of relying on a single generation result.