AFAI logo

Build an AI App That Creates Interfaces

Part 33 of 5

Define the components AI can use

Give the model a limited, intentional set of building blocks instead of allowing arbitrary interface generation.

Begin with a few components such as a question card, option selector, result card, and action button. Each component should have a clear purpose and predictable data requirements.

A constrained component system makes the experience easier to test, safer to render, and more consistent for the people using it.

Complete this part

  • Create a component list
  • Define the data for each component
  • Add a safe fallback state