What is generative UI?

Generative UI is an interface assembled for each request instead of shipped as one fixed layout. Rules or a model decide what to render from data about the visit, so two people can see different screens from the same code and the same components.

By Alex DeanUpdated

What does generative UI mean?

Generative UI is an interface assembled for each request instead of shipped as one fixed layout. Rules or a model decide what to render from data about the visit, so two people can see different screens from the same code and the same components. The interface becomes an output of the app, the way a search result is.

The term covers two settings. In AI assistants, it means a model answering with an interface instead of a block of text: a chart, a form, a comparison card. Google Research’s paper Generative UI: LLMs are Effective UI Generators starts from that problem, noting that models usually present their output through fixed, predefined interfaces. In product pages and apps, it means the page itself is composed per visit. The idea is older than the name, and the history of generative UI traces it back through programmable design and server-driven UI.

What decides what a generated interface shows?

Two inputs. A decision, made by rules or a model, says what this visitor should see. State says what is true about them right now: what they have looked at, what is in the basket, where they are in a flow. The decision can only be as good as the state it reads. If that state was computed yesterday, the interface responds to who the visitor was, not what they are doing now, which is the argument of why generative UI needs real-time state.

What are the main ways to generate an interface?

Most implementations fall into three kinds. CopilotKit’s generative UI repository uses a similar split, which it calls controlled, declarative and open-ended.

  1. Rules over a set of components. Code picks which components to show and in what order, based on the visitor’s state. It is predictable and easy to test, and every new case is a new rule someone has to write.
  2. A model choosing from a catalog. A model reads the state and returns a spec that names components you built and the props to give them. Libraries such as json-render draw the spec. The model can handle cases nobody wrote a rule for, and the screen still contains only components you shipped.
  3. A model writing the markup. The model produces the interface itself, as HTML or a self-contained surface. It is the most flexible, and the hardest to keep on brand, accessible and safe, so it is rare on customer-facing pages.

Most teams start with rules and move parts of the decision to a model as the cases multiply.

Generative UI examples

Each of these uses the same template and components for every visitor. Only the arrangement changes.

  • A product page that reorders around live intent. A shopper who has compared prices across several similar products sees a price comparison and delivery dates near the top. A shopper who arrived from a review and went straight to the size guide sees fit details and reviews first.
  • An agent returning a component spec. A shopping assistant asked “which of these two jackets is warmer?” returns a spec for a comparison table with both products, instead of two paragraphs. The app renders the table from its own component.
  • A news front page. A first-time visitor sees the top stories and a newsletter signup. A reader who has opened three basketball stories this visit sees a sports module moved up, with the stories they have already read left out.
  • An onboarding flow. A new user who skips a setup step twice sees a shorter path with that step moved to the end. A user who completes every step quickly gets the advanced options straight away.
  • An objection answered in place. A visitor who has opened the pricing page twice and gone back sees a pricing callout in the next page’s spare slot, instead of a link they have to find.
  • A support panel that leads with the fix. A customer whose payment failed twice opens help and sees the payment troubleshooting card first, ahead of the generic topic list.

The adaptive experience article covers the wider family these belong to, including changes that are not about layout.

Worked example: a product page with three slots

Take the product page from the first example. It has three slots below the product photo, and a catalog of components for them: PriceComparison, DeliveryDates, FitGuide, Reviews and RelatedProducts.

The state the decision needs is how this visitor has shopped in this session. Defined as attributes, values computed from events about one key, two of those facts could look like this, keyed on the session so the page can read them on the next request:

from snowplow_signals import Attribute, Event, StreamAttributeGroup, domain_sessionid

price_compare = Event(name="price_compare", vendor="com.example", version="1-0-0")
size_guide_view = Event(name="size_guide_view", vendor="com.example", version="1-0-0")

price_compares_session = Attribute(
    name="price_compares_session",
    type="int32",
    events=[price_compare],
    aggregation="counter",
    default_value=0,
)

size_guide_views_session = Attribute(
    name="size_guide_views_session",
    type="int32",
    events=[size_guide_view],
    aggregation="counter",
    default_value=0,
)

product_page_intent = StreamAttributeGroup(
    name="product_page_intent",
    version=1,
    attribute_key=domain_sessionid,
    owner="you@example.com",
    attributes=[price_compares_session, size_guide_views_session],
)

On the next product page view, the server reads those values and passes them to the decision. With rules, it might say: three or more price comparisons puts PriceComparison and DeliveryDates first; any size guide view puts FitGuide and Reviews first; otherwise use the default order. With a model, the same values go into the prompt with the catalog, and the model returns the slot order. Either way, the output is a short spec naming components from the catalog, and the renderer draws it. Nothing new ships when the order changes.

The limit is in the inputs. If the page has no event for a size guide view, no rule or model can lead with fit for the shopper who needed it.

How does generative UI compare with static pages, server-driven UI and A/B testing?

They answer different questions, and they combine. The vs articles go into each pairing.

What decides the layout How often it changes Who sees what
Static page A designer, at build time On each release Everyone sees the same page
Server-driven UI The server, from screens the team defines Without an app release, when the team edits a screen Usually the same for everyone in a given state. See generative UI vs server-driven UI
A/B testing A random split between pre-built variants When a test starts or ends Each visitor gets one of a few variants. See generative UI vs static A/B testing
Generative UI Rules or a model reading data about the visit On every request Each visitor can get a different arrangement

Server-driven UI is often how generative UI is delivered: the server already returns a description of the screen, and generation changes what goes into it. A/B testing is how you find out whether it works, by testing the rules or the model behind the generated page against a fixed one.

What does generative UI need to work?

  • Current state. The decision reads what the visitor is doing, so the data has to update within the visit and be readable on the next request.
  • A render budget. Reading the state and making the decision both sit before the first paint. A decision that makes the visitor wait for a layout costs more than it earns.
  • A catalog you own. Keeping the output to components you shipped is what makes a model’s choices safe to put in front of customers. With an AI agent making the decision, a typed contract for its response does the same job.
  • A record of what was shown. Log the spec and the state behind it, or you cannot tell which arrangement worked.

Where Signals fits

The decision and the rendering are tools you choose: your own rules, a model, json-render, CopilotKit, the Vercel AI SDK. The state can come from an event pipeline you build and run, or from a service. Snowplow Signals is one option for the state. It collects behavioral events from your web, mobile and server apps, computes attributes like the two above, and serves them to your app while the visitor is still on the page. It does not pick or render components. The rest of the generative UI topic covers each part of the pattern in more depth.

See it on your own traffic

Add the SDK, define one attribute, and see an attribute updating against your own traffic in the first session. The free tier runs on the real engine: no card, no sales call.