Design a conversational AI interface
Inputs
assistant_purpose(required): What the assistant helps with, for whom, what it can access (documents, account data, tools), what actions it can take, what it must not do, and whether answers cite sources.platform(optional; default: web app side panel): Where it lives - web app panel, full-page chat, mobile app, inside another product.
Arguments fill these in order. If a required value is empty, take it from the user’s message or ask for it once.
Platform: $platform
If the purpose or what the assistant can access is unclear, ask and stop; both decide the trust design.
- Purpose and scope. What the assistant does and does not do, in one paragraph users could read. Question whether chat is the right pattern for each job; where a button, form or inline suggestion would be faster, say so.
- Entry points and empty state. Where users open it (global, contextual from a page or selection, keyboard shortcut), what context it receives automatically and how that is shown ("Using: Q3 report.pdf"), and an empty state with three to five starter prompts tied to real jobs plus a one-line statement of limits.
- Composer. Multiline input, Enter to send and Shift+Enter for a new line (or the platform convention), attachments if supported with type and size limits, character limit behaviour, and stop and send controls.
- Message layout. User and assistant messages visually distinct; rendering of headings, lists, tables and code (with copy); long answers with a summary first; how actions the assistant proposes appear (as reviewable cards with confirm and cancel, never executed silently when they change data).
- Streaming and progress. An immediate acknowledgement, a progress indicator before the first token, visible steps for tool use or retrieval ("Searching 3 documents…"), token streaming with a stop button, and scroll behaviour: follow new text only while the user is at the bottom; otherwise show a "Jump to latest" control.
- Citations. Inline numbered references linked to source cards with title and the cited passage, opening at the right place; what is shown when an answer has no source; never present a source the answer did not use.
- States. For each, the exact copy and the recovery: network error, timeout, rate limit, partial answer interrupted (keep the partial text with Retry), stopped by user, attachment failed, context too long, refusal (explain briefly what it cannot help with and offer the closest useful alternative without lecturing), low confidence (say so and suggest how to verify), and handing off to a human if applicable.
- Feedback and control. Thumbs up or down with an optional reason, regenerate, edit and resend a previous message, copy, report a harmful answer, conversation history with rename and delete, and a new-chat action. Say where feedback goes and what users are told about it.
- Trust cues. A clear AI label, the data-use notice (what is stored, for how long, whether it is used for training, as placeholders to confirm), what the assistant can see, and a reminder to verify important answers placed where it matters rather than on every message.
- Accessibility. Announce completed responses through a polite live region rather than every token; focus stays in the composer after sending; keyboard access to citations, actions and feedback; respect reduced-motion settings for typing animations; readable contrast for code and citations.