Guide · 7 min read
Building forms with AI without losing control
Prompts that produce great drafts, and why schema-constrained generation matters.
Describe outcomes, not fields
Say what the form is for, who fills it, and what decision the responses will inform. "An intake form for a tax-prep firm to triage new clients by complexity" produces a far better draft than a list of field names, because the model can infer the right question types and the routing logic.
Let the model propose the structure first, then refine. Argue with the draft the way you would with a junior colleague's: it is a starting point to react to, not a final artefact to accept.
Prompt patterns that work
Give the model the constraints it cannot guess: required regulatory fields, a maximum length, the tone, whether it should be a multi-page form. Constraints improve drafts more than adjectives do.
Ask for conditional logic explicitly - "only ask business questions if they select Business" - and for the metric you actually want, naming CSAT, CES or NPS rather than "a satisfaction question", so the scale and wording come out right.
Iterate in small, named steps ("make the qualifying question first", "split this into two pages") rather than regenerating wholesale, so you keep the parts that were already good.
Why the schema matters
Generation that conforms to the same canonical schema the application validates with means the output is always real, editable structure - never a throwaway mock you have to rebuild by hand.
Schema-constrained generation also bounds the failure mode: the model can produce a bad form, but it cannot produce an invalid one. Every generated field has a stable id, a known type, and logic the editor and the runtime both understand.
Keep a human in the loop
Always review generated questions for the survey-design failures a model will not catch on its own: double-barrelled wording, leading phrasing, and survey sampling bias baked into who the form assumes is answering.
Treat AI as the drafter and yourself as the editor. The model is excellent at producing a competent first version fast; judgement about what to ask, what to make required, and what not to collect at all stays with you.