FitWhen to use it — and when not
Use it when
- Writing and coding surfaces where the next few words are predictable
- Forms with free-text fields people fill repeatedly (reasons, descriptions, replies)
- Anywhere the user’s attention is in the text, not in a chat panel
Skip it when
- Tasks that need a reasoned answer or a whole new draft: use a chat or a diff
- Fields where a wrong suggestion has real cost and little context exists to predict it
- Short inputs such as names, numbers and codes
AnatomyThe parts of the pattern
- Ghost textThe suggestion in a muted style after the cursor, never in the text itself.
- Accept keysOne key for the whole suggestion, one for the next word, one to dismiss.
- ChunksFor longer suggestions, separate pieces the user accepts or rejects one by one.
- Trigger ruleWhen suggestions appear: after a pause, at line end, not mid-word.
- Quiet modeA setting to turn them off per field, document or entirely.
- Feedback signalAccepted, edited-after-accept and dismissed are logged as separate events.
GuidelinesDo & don’t
Do
- Show a suggestion only when it is likely to be accepted; silence is a feature.
- Allow word-by-word acceptance so a mostly-right suggestion is still useful.
- Keep the suggestion visually distinct and never move the text under the cursor.
- Match the user’s language, tone and terminology from the document.
Don’t
- Show a suggestion on every keystroke.
- Insert text without a keypress.
- Cover the text the user is typing, or shift the layout when a suggestion appears.
- Reuse the same suggestion after it was dismissed.
In the wildReal-world examples
Products named for reference only — no affiliation, and the demo above is an original illustration, not a copy of their UI.
For engineersImplementation notes
- Debounce on typing pause, cancel the request on the next keystroke and drop stale responses.
- Keep latency under about 300 ms; a late suggestion is worse than none, so discard it if the cursor moved.
- Send only the nearby text and field label as context; do not stream the whole document per keystroke.
- Log shown, accepted in full, accepted in part, edited after and dismissed, to tune the trigger rule.
Q&ACommon questions
How is inline AI different from accept and reject edits?
Inline suggestions are small, continue what the user is writing and appear at the cursor. Accept and reject edits show a diff of a rewrite the user asked for. Use ghost text to speed typing and a diff to review changes to existing text.
When should AI autocomplete show a suggestion?
After a short pause, at a natural boundary such as the end of a line or sentence, and only when the model is likely to be right. Showing something on every keystroke distracts, and a late suggestion should be discarded.
How do you measure whether inline suggestions help?
Track shown, accepted in full, accepted in part, edited after accepting and dismissed. A high rate of edits after accepting means the suggestion was close but not good enough, which is a different problem from low acceptance.