Skip to content
mentoor

Topic 2 of 5 · 4 min read

Inline assistance inside existing workflows

Goal: Specify the trigger, display and accept or dismiss behaviour of an inline suggestion so it never overwrites user text silently.

Inline assistance puts the AI inside the place where the person already works and shows its suggestion in a form the person can take or ignore with one keystroke, without ever changing their text on its own. Examples are ghost text in a code editor, a suggested reply under an email, or a "rewrite this sentence" option in a document.

Check yourself · 1 of 3

A document tool rewrites a paragraph when the user selects it. What should it do with the original text until the user decides?

Choose one answer

Why it matters

Switching to a separate chat window costs attention. The person must copy text out, explain the context and paste the answer back. Inline assistance removes that trip because the AI already sees the surrounding text. The cost is different: a suggestion that appears at the wrong moment interrupts, and one that edits text without asking destroys trust quickly. People forgive a bad suggestion they can ignore. They do not forgive a lost sentence.

The four parts to specify

  1. Trigger. What makes a suggestion appear? Typing a pause, selecting text, pressing a shortcut or opening a reply box. Automatic triggers must be rare and cheap; manual triggers give control.
  2. Display. Where and how does it show? Grey ghost text after the cursor, a side-by-side diff for a rewrite, or a small chip under the message. It must look clearly different from the user's own text so nobody mistakes it for something they wrote.
  3. Accept. One obvious action, such as Tab, Enter or a button. For a long suggestion, allow partial acceptance, such as one word or one line at a time.
  4. Dismiss. Keep typing, press Escape or click away. Dismissing must cost nothing and must not trigger the same suggestion again straight away.

Rules that protect the user's text

  • Never replace selected text until the person accepts. Show the rewrite beside the original.
  • Keep an undo for every accepted suggestion.
  • Mark generated text until the person edits or confirms it, especially in documents others will read.
  • Do not suggest while the person is mid-thought and typing quickly.

Before and after

Before: A document tool rewrites a paragraph the moment the user pauses, replacing the original. Users find their wording changed and cannot get it back.

After: The user selects a paragraph and presses a shortcut. The rewrite appears beside the original with Accept and Dismiss buttons. Accept swaps the text and adds an undo step. Nothing changes until the user chooses.

What goes wrong

  • Suggestions fire so often that people switch the feature off.
  • Accepted text looks identical to typed text, so errors from the model go unreviewed.
  • Accept and dismiss are the same key in different contexts, so a habit keystroke accepts something unwanted.

Examples

Specification for an email reply suggestion

Trigger: user opens a reply box on a message with a question in it. Display: a grey draft under the cursor with the label "Suggested reply". Accept: Tab inserts the draft and places the cursor at the end. Dismiss: typing anything, or Escape, removes it. It does not return for this message. Safety: nothing is sent; the draft is plain editable text.

Rewrite beside the original

A writer selects a clumsy sentence and chooses "Make shorter". The tool shows the new sentence in a panel next to the original with Accept and Dismiss buttons. The original stays in the document until Accept is pressed, and Undo restores it afterwards.

Key points

  • Inline assistance works inside the user's existing tool, so no copying text to and from a separate chat window.
  • Specify four things for every suggestion: the trigger, the display, the accept action and the dismiss action.
  • Suggestions must look different from the user's own text and must never replace it until the user accepts.
  • Dismissing must cost nothing, and a dismissed suggestion should not reappear immediately.
  • Every accepted suggestion needs an undo, and long suggestions benefit from partial acceptance.

Common mistakes

  • Replacing the user's text first and offering undo afterwards.
  • Showing generated text in the same style as typed text.
  • Triggering suggestions on every pause, which trains users to turn the feature off.
  • Making accept and dismiss the same key in different places.

Check yourself · 2 of 3

Which list names the four parts to specify for an inline suggestion?

Choose one answer

Check yourself · 3 of 3

Users complain that the writing assistant interrupts them mid-sentence with suggestions. Which fix targets the cause?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic