If I'm reading this correctly, caching only happens if I give it a stable cache key? If that's true, this just seems like an insanely bad decision. I've seen waaaay to much bad React code to think that that isn't a massive foot-gun.
1. That combined with hot reloading just makes me think some jr dev is going to forget to put that there while they're building something locally and burn through their LLM budget without even knowing it.
2. What happens if the cache key changes. Is there any way to migrate from one key to another? Let's say I'm using user ids as the cache key and you need to do a migration that changes the format of the key, is the existing design just gone forever?
3. Does anyone even want a non-deterministic UI? Don't get me wrong, it's a cool for a demo, but I can't think of anything that would annoy me more than coming back to a website and every week it looks different.
Sorry to be a downer, but man, I just really struggle with this. If this is just kind of a cool hobby project then you can ignore #3, but for 1 and 2 I really feel like it'd be a better to do something like have a data attr for the prompt and then have component generation be something a user kicks off through a script or something.
You know, I thought about doing something like this, but without the LLM.
Rails scaffolding takes a data model and automatically generates a UI. The obvious problem with this is that the web development community lives in the stone age and has failed to sufficiently separate layout from content and styling [0].
In scaffolding, the component types are chosen automatically based on the data model, but there is no obvious way to specify their arrangement. This leads to bland UIs that always follow the same layout structure unless you go out of your way to rip out pretty big parts of the scaffolding where layout and content is mixed, which defeats the value proposition.
[0] Introducing layout features to CSS was a mistake. The CSS grid syntax is horrible.
Generative UI has a lot of potential, and some of the ideas here are interesting, but the positioning as a developer tool (for folks that can just generate stable UI using claude code already) seems odd to me. What's the expected use case?
I'm interested in exploring the ideas here for on-the-fly output based on user intent. It reminds me a bit of the schema model I used for the LangView experimental library (https://x.com/rupertmanfredi/status/1653780093712633859).
I was hoping this might be a syntax or very very lightweight markup that could feed LLM generation of UI rather than just roll the dice to see what UI gets generated every time.
But why would anyone do this? The UI will obviously change unpredictably on every generation, there's no way to deliver quality control if the UI is generated on the fly.
I could see this being useful for client and patient onboarding in the services and medial sectors respectively. For example:
A potential client providing information for a law-firm regarding their grievance.
A patient filling out the medical questionnaire prior to their first visit to a medical practice.
Rather than having a fully deterministic form, you'd be providing them with forms that adapt to their specific issue. The data can then be intelligently stored both as JSON and a more generic record in an RDBMS.
This is quite cool! What about making it possible for the (authenticated) user to specify how the component would look for them. Would that make sense?
thanks, and yes absolutely! Because all generation happens at runtime, you can simply change which component an identifier points to. This works even if you're using a cached UI.
superfrank|18 days ago
1. That combined with hot reloading just makes me think some jr dev is going to forget to put that there while they're building something locally and burn through their LLM budget without even knowing it.
2. What happens if the cache key changes. Is there any way to migrate from one key to another? Let's say I'm using user ids as the cache key and you need to do a migration that changes the format of the key, is the existing design just gone forever?
3. Does anyone even want a non-deterministic UI? Don't get me wrong, it's a cool for a demo, but I can't think of anything that would annoy me more than coming back to a website and every week it looks different.
Sorry to be a downer, but man, I just really struggle with this. If this is just kind of a cool hobby project then you can ignore #3, but for 1 and 2 I really feel like it'd be a better to do something like have a data attr for the prompt and then have component generation be something a user kicks off through a script or something.
uriahlight|18 days ago
https://developers.googleblog.com/introducing-a2ui-an-open-p...
In the real-world, to me it makes the most sense for client and patient onboarding.
cadamsdotcom|18 days ago
Not usable enough? Just refresh! No, we don’t know how many times you’ll need to do that.
imtringued|17 days ago
Rails scaffolding takes a data model and automatically generates a UI. The obvious problem with this is that the web development community lives in the stone age and has failed to sufficiently separate layout from content and styling [0].
In scaffolding, the component types are chosen automatically based on the data model, but there is no obvious way to specify their arrangement. This leads to bland UIs that always follow the same layout structure unless you go out of your way to rip out pretty big parts of the scaffolding where layout and content is mixed, which defeats the value proposition.
[0] Introducing layout features to CSS was a mistake. The CSS grid syntax is horrible.
rupertsworld|18 days ago
I'm interested in exploring the ideas here for on-the-fly output based on user intent. It reminds me a bit of the schema model I used for the LangView experimental library (https://x.com/rupertmanfredi/status/1653780093712633859).
Goose78|18 days ago
rahimnathwani|18 days ago
This is similar to, but not the same as, the approach taken by json-render: https://github.com/vercel-labs/json-render
The latter assumes AI generates the data AND picks the components it will use from your predefined library.
sensecall|18 days ago
popalchemist|18 days ago
uriahlight|18 days ago
A potential client providing information for a law-firm regarding their grievance.
A patient filling out the medical questionnaire prior to their first visit to a medical practice.
Rather than having a fully deterministic form, you'd be providing them with forms that adapt to their specific issue. The data can then be intelligently stored both as JSON and a more generic record in an RDBMS.
That's just my initial thoughts.
Google has a similar project called A2UI: https://developers.googleblog.com/introducing-a2ui-an-open-p...
fidorka|17 days ago
Goose78|17 days ago