AI/MLalpha

AI Form Generator

You describe a form in plain English, the tool generates a fully validated React component with proper field types, accessibility, and a Zod schema for validation. I wanted to test how reliable structured LLM output has become in 2025-2026 for a tightly scoped generation task. The answer is: very reliable, as long as you constrain the output schema aggressively and validate the model's response before rendering it.

OpenAIReact Hook FormZodshadcn/ui

What this is

A lab, not a product.

You describe a form in plain English, the tool generates a fully validated React component with proper field types, accessibility, and a Zod schema for validation. I wanted to test how reliable structured LLM output has become in 2025-2026 for a tightly scoped generation task. The answer is: very reliable, as long as you constrain the output schema aggressively and validate the model's response before rendering it.

5

Features

4

Learnings

4

Technologies

Capabilities

What it does

The features that actually got built and run in this prototype.

feature_01.ts
Natural language form description with intent classification before generation
feature_02.ts
Automatic field type inference (email, phone, date, currency, address) from the description
feature_03.ts
Validation rule generation with Zod, including conditional rules across fields
feature_04.ts
Conditional field logic (show field B only when field A equals something)
feature_05.ts
Accessibility compliance built in, with proper labels, aria attributes, and keyboard order

The stack

What it is built with

The libraries and runtimes I picked for this lab and why they earned their place.

OpenAI
React Hook Form
Zodshadcn/ui

What I learned

Learnings, in order of how much they surprised me

The things I would tell another engineer before they tried the same experiment.

01
Structured output from LLMs is now reliable enough to drive real UI, see the AI chatbot playbook
02
Field type inference works on the common cases. Anything unusual still needs a human pass
03
Generated validation rules need a human review for edge cases like phone formats and dates
04
The Zod schema is the contract. If you let the model output free-form rules, you are back in regex hell

Note: This is an experimental project in the alpha stage. It is a learning exercise and technical exploration rather than a production-ready solution. Patterns and code may change.

AI/ML

Related labs

Other explorations in this area.

Want me to build something like this for you?

If this kind of work fits your roadmap, I take on a small number of paid projects each quarter.