a2ui-project / a2ui-project/a2ui

Agent is biased towards updating existing UIs rather than generating new UIs

Đang mở
#1,858 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
component: genui P2
Ngôn ngữ chính
TypeScript
Star
16.4k
Fork
1.3k
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
134

Mô tả

_↴ Ported from [flutter/genui#715](https://github.com/flutter/genui/issues/715) — originally opened by [jacobsimionato](https://github.com/jacobsimionato) on 2026-02-13._
_Original labels: P1_

---

**Describe the bug**
The agent is updating existing surfaces in cases where it should create new surfaces in some instances. This makes the conversation flow feel weird and the layout look wrong, because sometimes a message ends with a colon, e.g. "Here are some ideas: ", but then the ideas don't follow.

**To Reproduce**
Steps to reproduce the behavior:
0. Run the travel app locally
1. Type "Where should I go next"
2. Agent shows some ideas in a travel carousel
3. Click on an idea like "Cultural excursion"

Expected: Agent adds new travel carousel with a range of cultural excursion destinations

Actual: Agent updates the existing carousel above with a range of excursion destinations

Image

---

### 2 comment(s) from the original issue

**[gspencergoog](https://github.com/gspencergoog)** commented on 2026-02-25:

This is true for the `travel_app` example, but for the other chat examples, the prompt includes a statement to not delete previous surfaces, and to create new ones, so it doesn't seem to favor updating existing UIs in that case. Is this bias just the result of prompt engineering?

---

**[brianegan](https://github.com/brianegan)** commented on 2026-03-18:

My two cents: Working on the demo for Google Cloud Next using A2UI 0.9.0, we ran into the same thing. However, we wanted a specific flow from the LLM, updated the prompt, and it now flows much more the way we intend it do with fewer updates. IMO, this is a prompting issues, but could be a good candidate for documentation.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The issue is in the travel app example. Start by running the travel app locally and reproducing the steps. Examine the prompt engineering for the agent, particularly comparing the travel app prompt to other chat examples. Look for logic that decides between updating an existing UI surface or creating a new one. 'Done' is when the agent correctly generates a new carousel for the excursion destinations.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
flutter, typescript
Lĩnh vực
ai, frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.