Skip to content

Draw a component when it makes the answer clearer, text otherwise - #2955

Merged
davidmckayv merged 1 commit into
mainfrom
genui-when-it-helps
Dec 4, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
genui-when-it-helps

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

Bots draw a component when it makes the answer clearer or more useful, and answer in text otherwise. The standing guidance now says that principle and nothing more: no list of cases.

What it said before.

What it says now (the answer-format section every Bot gets):

When a component or an interface from your tools would make the answer clearer or more useful than text, draw it, without waiting to be asked; otherwise answer in text. Figures you draw still follow the rules above about where figures come from.

Draw a component once, when you have the result it shows, and do not repeat in text what it already shows. Do not draw a draft and then a second one that replaces it: everything you draw stays in front of the person.

What each component is for, and is not for (a notice is for an alert, a checklist for work somebody ticks off), was already said on the component's own tool, and stays there.

Every Bot, the same way. The same principle, worded the same, wherever the rule was said:

  • the working rules' answer-format section, which built-in Bots get and which a connected Bot gets in its standing role;
  • the delegating rule's direct answer, and the frame a task's brief opens with, which both listed "figures, a comparison, a list of items, a plan, a record". A thread opened under the previous frame still reads back as its brief;
  • the native A2UI guidance's first line, which listed its own cases ("exploring alternatives, following a plan... a quick answer, a single fact"). It travels in the run's AG-UI context, so a connected Bot gets it the same as a built-in one.

Nothing asks which Bot a run belongs to. The prompt is about 1.1 KB shorter.

How the leaders decide. Both leave it to the model's judgement of whether the richer surface helps, rather than a list of triggers:

  • Claude's custom visuals: "When a visual would explain something better than text, Claude builds one", inline in the answer (announcement, help). Claude's artifacts are for content that is "significant and self-contained" and worth keeping, and a short answer stays in the chat (help).
  • ChatGPT's canvas "opens automatically when ChatGPT detects a scenario in which it could be helpful", trained to trigger on writing and coding work and to avoid "over-triggering" on general Q&A (launch, help).

Real model, before and after. GPT-5.6 Terra (the built-in default), OpenAI's Responses API, the working rules as the instructions and the gallery's 12 tools offered; three runs of each prompt, 36 in all. A run counts as a component when its first step calls a gallery tool.

Prompt Before After
A to-do list for moving apartments checklist 3/3 checklist 3/3
Compare three family cars on four counts table 1/3, text 2/3 table 2/3, text 1/3
Plan the steps to launch a newsletter checklist 3/3 checklist 3/3
What's the capital of Australia? text 3/3 text 3/3
"thanks, that's great!" text 3/3 text 3/3
Explain how HTTPS keeps a connection private text 3/3 text 3/3
Component where it fits 7/9 8/9
Text where it doesn't 9/9 9/9

Tests.

  • shared/bot-prompt.test.ts, "when a Bot draws a component": the principle is in the answer-format section once, straight after the sources rule, for a built-in Bot and for a connected Bot's standing role; it names no kind of answer, component, tool or example; and it is two short paragraphs. Fails on main (2 of its tests), passes here.
  • shared/tests/orchestration.test.ts: a thread opened under the previous brief frame still reads back as its brief, and a new frame lists no kinds of answer. Fails on main, passes here.
  • app/tests/checklist-card.test.tsx and shared/tests/artifacts-prompt.test.ts now pin what a checklist is for on the checklist's own tool, and that the rule says nothing about Markdown.
  • The Claude Agent SDK harness's fixture of what the server sends (agent-claude-sdk/tests/fixtures/server-instructions.json) carries the new section, and test_openbot_instructions.py passes. The mobile copy of the shared code is regenerated.
  • Format, lint and typecheck pass.

Changelog

Answers.

  • Bots draw a component when it makes the answer clearer, and answer in text otherwise. There is no list of cases: a Bot decides from the answer itself, so a to-do list comes back as a checklist and a quick question stays a line of text. Built-in Bots and connected Bots are told the same.

The standing rule on generative UI swung from "a component whenever an answer has structure",
with a case per kind of answer, to "Markdown by default, a component only when asked or
materially better". It is now the principle alone, the judgement Claude's visuals and ChatGPT's
canvas leave to the model: draw a component or an interface when it makes the answer clearer or
more useful than text, without waiting to be asked, and answer in text otherwise. No list of
cases; what each component is for stays on its own tool.

Every Bot gets it the same way: the answer-format section of the working rules (built-in Bots and
a connected Bot's standing role), the delegating rule, a task's brief, and the native A2UI
guidance's opening line, which dropped its own list of cases. A thread opened under the previous
brief frame still reads back as its brief.
@davidmckayv
davidmckayv added this pull request to the merge queue Dec 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 4, 2026
@davidmckayv
davidmckayv added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 6d14a38 Dec 4, 2026
38 checks passed
@davidmckayv
davidmckayv deleted the genui-when-it-helps branch December 4, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant