WP Forged

Ask Alder

I’m Alder, WP Forged’s AI assistant. Ask me about our tools or services. Keep private details out of chat.

Why AI Layouts Break

How a schema keeps a builder’s output usable.

By WP Forged

Posted: January 1, 2026

Updated: November 9, 2026

10 min read

A smith’s gauge with circular, square and triangular openings.

Most AI page builders demo well and ship broken. The pattern is the same: a model produces output that looks like a valid layout, the user pastes it into the builder, and either nothing renders or the layout is structurally wrong in subtle ways that take longer to fix than building from scratch.

A bigger model doesn’t fix this. The fix is architectural: schema-governed generation, where the AI is constrained to produce only output the builder can actually consume. Below is why that architecture matters and what it looks like in practice.

The Problem: Plausible vs Valid

Most LLM output for structured systems is plausible without being valid.

Plausible: looks like the right kind of output, references things that sound real, passes a casual read.

Valid: actually parses, actually imports, actually renders.

For prose, the distinction barely matters. Plausible-but-wrong text is just text the user reviews and edits. For structured systems like page builders, the distinction is the whole game. Either the JSON imports cleanly or it doesn’t. Either the section renders or it shows an empty placeholder. There’s no graceful degradation.

This is why so many “AI page builder” demos look impressive in a controlled setting and fall apart in real use. The demo prompt was tuned to produce one of the few outputs the model gets right. The real-world prompts hit the cases where the model produces plausible nonsense, and the import fails. The same gap shows up in translation, where every string has to land back in the right field (see How to Translate a YOOtheme Site with AI).

Why Most AI Page Builders End Up Here

Three reasons.

First, models trained on general web data don’t know the schema for any specific builder. Every page builder has its own element registry, its own property names, its own dynamic content patterns, its own constraints. The training corpus has snippets of various builders mixed in with everything else, but no model has been trained to be authoritative on, say, the YOOtheme element registry, or the Bricks builder’s serialization format, or Elementor’s widget schema.

Second, hallucination rates on structured output are higher than on prose. A model writing prose that’s slightly wrong is often still useful. A model writing JSON that’s slightly wrong is broken. The same hallucination rate that’s tolerable for one is unacceptable for the other.

Third, without explicit constraints, the model has no reason to stay inside any particular schema. It produces what looks plausible based on its training. If the prompt asks for an opening section, it produces a node with a made-up hero element type, even though the real builder has no such element and composes that kind of section out of headings, images, and buttons.

Together, these three factors mean that “ask the model and hope for the best” doesn’t produce reliable structured output. Some prompts work. Most don’t. The ones that don’t fail in ways the user has to debug or rebuild.

Where Unconstrained AI Works Fine

Unconstrained AI isn’t always wrong. The pattern works in plenty of places.

For prose generation, unconstrained AI is fine. The output is text, the user reads it, the user edits it. Hallucinations get caught. The workflow tolerates the failure mode.

For ideation, unconstrained AI is fine. Brainstorming, naming, exploration. The output is a starting point for human thinking. Wrong answers don’t break anything downstream.

For learning concepts, unconstrained AI is fine, with caveats. The model can explain things accurately most of the time. The user verifies the parts that matter.

The structural problem only appears when AI is producing the structure itself. That’s where the constraint matters.

What Schema-Governed Generation Is

Schema-governed generation is the architecture pattern that constrains an AI model’s output to match a defined schema. The mechanism has been available in production AI APIs for a couple of years now, under different names.

OpenAI calls it structured outputs. The API takes a JSON Schema, and the model is constrained to produce output that matches the schema. Element types come from a fixed list. Property names match documented names. Required fields are present.

Google Vertex AI calls it response schema. Same mechanism, same effect. The model receives the schema and produces conforming output.

Anthropic also calls it structured outputs, in two forms: a JSON schema for the response, or strict tool definitions that the model’s tool calls must match. It launched in beta in November 2025 and became generally available in February 2026.

Underneath all three is the same idea. Instead of letting the model produce any text and hoping it matches the structure, the model is constrained at generation time to only produce output the consuming system can accept.

Validators in the Loop

Schema-governed generation alone isn’t always enough. The model can produce schema-valid output that’s still semantically wrong: a section with no heading, a grid with mismatched columns, a layout that’s structurally valid but visually broken.

This is where validators in the loop come in. Generated output is validated against not just the schema but the semantic constraints of the builder. If the validation fails, the output is regenerated, often with feedback to the model about what went wrong.

The validation step is where production-grade schema-governed AI distinguishes itself from the basic version. The schema is necessary. The validator is what makes the output useful instead of just compliant. We describe what Forged AI’s own checks catch, and what they don’t, in AI Page Builders Need Verification, Not Just Generation.

The Page Builder Case Specifically

Why does this pattern matter more for page builders than for other AI applications?

Page builders have rigid schemas. The output is a tree of typed nodes with documented properties. There is no flexible interpretation. Either the import succeeds or it doesn’t. Either the element renders or it doesn’t.

Other AI applications have softer failure modes. A chatbot that says something slightly wrong is still useful. A code completion that’s slightly off is a draft to edit. A page builder that produces invalid JSON is just broken output that has to be discarded.

The investment in the schema-governance architecture pays off proportionally to how strict the consuming system is. Page builders are about as strict as it gets, which makes them the case where schema-governed AI is essentially required for production work.

What This Looks Like in Practice

A worked example.

A user asks Forged AI for an opening section for a dental clinic with a booking button. The prompt goes to a model with a JSON schema attached that describes the YOOtheme element list and the structural rules around sections, rows, columns, and elements. After generation, validators check the result against YOOtheme’s element and setting rules.

The model produces JSON. The JSON is constrained at generation time to use only element types from the real YOOtheme list (heading, text, button, image, grid, and the rest), with property names from the YOOtheme schema. The validators then check element types and settings against YOOtheme’s element definitions and repair the mistakes they recognise, such as missing column widths or an image address stored in the wrong field. Nothing is rendered at this stage, so you still look at the page after import.

The output imports into YOOtheme Pro through the Layout Library. The section shows the heading, subheading, image, and button elements composed into rows and columns. The user has a section to react to and refine.

Not every mode works the same way. In Forged AI, Layout and Style use a response schema at generation time. Convert doesn’t: when we attached a full schema to the conversion of a long page, the model ran out of room, and a lighter schema produced skeleton pages. So Convert asks only for valid JSON, explains YOOtheme’s structure in its instructions, and relies on the checks afterwards, plus removing custom CSS and classes so the result uses native YOOtheme elements. More on the modes in The Complete Guide to AI in YOOtheme Pro.

Compare this with the same prompt going to a general chatbot with no access to the builder’s schema. The model produces JSON that looks plausible. Element names are invented. Property names are guesses. The output doesn’t import, or it imports as an empty section, or it imports with elements that don’t render. The user has nothing useful and has to start over.

Connect the same chatbot to the builder through an MCP tool, and the constraint moves into the tool. Wootsup’s free MCP for YOOtheme Pro, for example, gives an AI app the builder’s structure to work with. Access alone isn’t enough, though. In the WordPress Agent Benchmarks, whose results WordPress’s AI team reported, agents completed none of the tasks using the MCP Adapter alone, mainly because the abilities they needed weren’t included.

Same prompt, same model class underneath, completely different outcomes. The architecture is what makes the difference, not the model.

Other Tools Doing This and What They Get Right

Schema-governed generation isn’t unique to Forged AI. Several tools across the AI tooling ecosystem use the pattern, with varying depth.

In 2026 the big WordPress builders started handing their own structure to AI. Bricks 2.4 (September) added AI Abilities that let AI apps create and edit Bricks content, labelled experimental. Elementor 4.3 (September) added Elementor MCP to its free plugin, Divi 5.12 added AI Agents, and Breakdance 3.0 (October) lets AI agents build sites. Underneath, WordPress’s Abilities API (WordPress 6.9 and later) has each ability declare its input and output in JSON Schema. For a builder-by-builder comparison, see The Complete Guide to AI in WordPress Page Builders.

It helps to separate two kinds of constraint. In MCP, every tool declares a JSON Schema for its inputs, but the specification notes this is unrelated to the model’s structured outputs: a tool schema checks what the agent sends, not how the model generates. Production systems use both, plus validators.

YOOtheme previewed its own AI coworker at the Joomla World Conference on 17 October 2026, built into the page builder; it hasn’t been released. In a few months the category has moved from experiments to built-in features.

Forged AI is one example of the pattern, applied to YOOtheme Pro on WordPress and Joomla. The architectural choice is the point, not the specific product.

What Schema-Governed AI Doesn’t Fix

The pattern doesn’t fix every problem.

It doesn’t fix bad prompts. A model that’s constrained to produce valid output can still produce valid output that doesn’t match what the user wanted. Prompt quality still matters.

It doesn’t fix gaps in the schema. If a builder adds a new element type, the schema constraint has to be updated to include it. Otherwise the model can’t produce sections using the new element. Maintaining the schema is ongoing work. YOOtheme Pro 5.1, previewed in October 2026, reportedly adds Marquee elements and a much larger Video element (Wootsup’s write-up), so every schema-governed tool for YOOtheme will need updating when it ships.

It doesn’t fix bad design judgment. A structurally valid section can still be ugly, off-brand, or visually wrong. Structural validity and design quality are different problems.

It doesn’t fix model capability ceilings. Models still have limits on creative work, strategic judgment, and complex reasoning. Schema-governance shapes the output, not the model’s underlying ability.

Where This Leaves You

For builders evaluating AI tools, the question to ask is whether the tool is schema-governed for the structural work. The marketing won’t always say so directly, but the test is straightforward: does the output reliably import into the builder, or does it sometimes fail in ways that produce invalid sections? A schema-governed tool reliably produces valid output. An unconstrained tool sometimes does and sometimes doesn’t.

For builders building tools, this architecture isn’t optional for production work that involves structured output. The shortcuts are tempting and they ship buggy. The pattern is well-established now: response schemas, structured outputs, tool schemas, validators in the loop. The pieces exist in every major AI API.

The broader point: schema-governed AI is one of the under-discussed architectural advances of the last couple of years. It quietly fixed the structured-output problem that was holding back a whole category of AI applications. Page builders are one beneficiary. The same pattern applies anywhere structured output matters: forms, configurations, queries, anywhere the consuming system is strict about what it accepts.

If the AI conversation in your organization is still about model size and prompt engineering, this is the architectural detail worth getting up to speed on.