Constrain the choices
Give the model a fixed vocabulary of real layouts and ask which fit, never to write one.
A model choosing among things that exist cannot produce a broken screen; one writing markup eventually will.
Validate before you render
Check every spec against a catalog and send the reasons back on failure; show a notice, never a half-drawn view.
Validation turns an unpredictable generator into a predictable component.
Decide, don't write
Compose from candidates with typed questions (choice, score, boolean); code assembles the answer.
Answers are small, checkable and cheap, and the page's words and numbers come from your data, not the model's imagination.
Keep every option alive
Floor each probability and sample several, spread apart, so unlikely layouts still appear.
A model often puts near-zero on perfectly good options; showing twelve different ideas beats showing the top pick twelve times.