Grammarly engineering: how editor suggestions are represented and applied using operational transformation and the Delta format
Grammarly needed to keep editor suggestions correct and relevant as users edited text in real time, and to support accepting multiple suggestions at once without causing the editor to freeze or produce garbled text.
Applying individual suggestion deltas sequentially caused the editor to freeze for a noticeable period, and composing multiple suggestion deltas without rebasing caused the resulting text to appear broken with mixed-up characters.
By composing all suggestion deltas together and rebasing each against prior ones before composition, Grammarly achieved a feature that applies multiple suggestions at once correctly and instantly, eliminating the UI freeze.
Frequently asked questions
What did this team achieve with this AI workflow?
By composing all suggestion deltas together and rebasing each against prior ones before composition, Grammarly achieved a feature that applies multiple suggestions at once correctly and instantly, eliminating the UI f…
What tools did this team use?
Delta format, Quill.
What results were reported?
Users impacted daily: 30 million people; Professional teams served daily: 30,000 professional teams (source-reported, not independently verified).
What failed first in this deployment?
Applying individual suggestion deltas sequentially caused the editor to freeze for a noticeable period, and composing multiple suggestion deltas without rebasing caused the resulting text to appear broken with mixed-u…
How is this workflow AI workflow structured?
User edit sent to backend → Suggestion card displayed → Suggestions stored in repository → Delta Manager rebases on edits → User accepts suggestion → Delta compose applies fix → Bulk rebase for multi-accept.