Problem
One paragraph in the middle of a draft is too long. Asking a chat assistant to fix it means copying the paragraph out, describing which document it came from, pasting the reply back and re-checking the formatting. The work of asking exceeds the work of fixing it by hand.
Solution
Make the selection the object of the request. The viewer highlights the text, invokes the assistant, and picks a verb. Nothing has to be described, because the thing being acted on is already identified by the cursor. Nothing else gives an in-product assistant so clear an advantage over a general one, and it’s worth building the whole interaction around.
Invocation wants two paths: a floating control that appears on selection, for discovery, and a keyboard shortcut, for the people who will use it forty times a day. The verb list should be short and concrete. Notion’s is a good reference shape, offering fixes like grammar, length, and tone against a selection, with a free-text prompt underneath for anything not on the list.
The output decision is where implementations diverge and where most of them go wrong. Replacing the selection immediately is the cheapest to build and destroys the original at the moment the viewer most wants to compare. Presenting the result as a proposal, with accept, discard and try-again, keeps the original until a decision is made. Notion’s documented flow is exactly this triad, and it’s the correct one: the viewer sees both states, picks, and the document changes once.
Scope discipline is the other half. HAX guideline 10 asks systems to scope their services when uncertain, and the inline case is the clearest instance of that rule anywhere. An assist asked to fix the grammar in one sentence that returns a rewritten paragraph has broken the contract, and once it’s done that twice nobody will trust it on a long selection again. Whatever was highlighted is the whole permitted blast radius.
Latency matters more here than in chat. The viewer is mid-sentence with a held thought. A chat answer can take fifteen seconds because the viewer has handed the task over; an inline rewrite can’t, because they’re waiting inside their own work. Where the model is slow, a smaller and faster one for the common verbs beats a better answer that breaks the writing rhythm.
Use when
The assistant lives inside an editor and the viewer is working on text they own.
Don’t use when
The task needs conversation to pin down. An ambiguous request, a multi-step change, or anything needing back-and-forth belongs in a panel where a thread can develop, since an inline popover with one input has no room for the second turn.
Trade-offs
The selection bounds the work, which is the strength and the limit: a change that needs to touch the paragraph before and the heading above can’t be expressed. Accept-and-discard is safer than replacement and adds a decision to every single invocation, which is friction paid every time to prevent an occasional loss. A floating toolbar on selection collides with the editor’s own formatting controls and with the browser’s native selection menu. Undo has to collapse the whole operation into one step. An assist that takes six presses to reverse teaches people to stop trying it.
Checklist
- Is the selection the only thing that changes?
- Are accept, discard and try-again all available before the document changes?
- Does a single undo reverse the whole operation?
- Is there a keyboard path, or only a floating control?
- What happens on a selection spanning several blocks, a table, or an image?
- How long does the common case take, and is that fast enough to hold a thought?
- Does the control collide with the editor’s existing selection toolbar?
- Can the viewer type a free-text instruction as well as pick a verb?
- What does the assist see beyond the selection, and is that stated?
- Does it work in a read-only document, and should it?
Compare
Notion runs the full triad on a selection, offering fixes and tone changes with accept, discard or retry before anything is written, and pairs it with an @-mention so other pages can be pulled in as context. Google Docs puts the equivalent at the cursor for generation and keeps the refinement controls attached to the produced block rather than the selection. Linear scopes its assist to the object rather than the prose, acting on an issue as a record instead of on highlighted characters. Figma applies the same idea to non-text objects, where the selection is a frame and the verbs are structural. Very little of this pattern is actually about writing.
Related
Suggestion diff is how the proposal should be presented when the change is large. Ghost text is the same help offered before a selection exists. Assistant sidebar is where a request goes once it needs a conversation. AI entry point is the affordance that makes this discoverable. Prompt starters are what fills the free-text field before the viewer knows what to type.