
Predictive text works by estimating which letters, word or phrase most likely come next, given what you have already typed, and offering the best guesses. The estimate comes from a model of language. In early phones that model was a dictionary sorted by how common each word is. Then it became statistics about which word follows which. Today it is usually a neural network that reads the whole sentence and runs on the device itself.
The guide to AI autocomplete on Windows covers how to get phrase suggestions on a PC. This one explains the mechanism behind them, one generation at a time.
Generation one: a dictionary that settles ambiguity
T9 solved a hardware problem. A phone keypad has twelve keys, and most of them carry three or four letters each. Tegic Communications filed its patent for a “reduced keyboard disambiguating computer” in 1995, and it was granted in 1998. Each key press is ambiguous. The software looks up which dictionary words match the whole sequence and shows the most likely one first.
Press 4-6-6-3 and the sequence fits good, home and gone. T9 cannot tell which one you mean from the keys alone. It offers the most frequent word first and lets you cycle through the others. Nothing here understands language: it is a dictionary lookup with a ranking.
Generation two: counting which word follows which
The suggestion strip above a phone keyboard added a second idea: predict the next word before you type any of it. The classic way to do that is an n-gram model. It counts, across a large body of text, how often each word follows the one or two words before it, and suggests the most frequent continuations.
SwiftKey built its early keyboard on n-gram technology. When it released a neural version in 2015, TechCrunch reported the company’s own description of the old approach’s limit: it could not understand the underlying meaning of words. An n-gram model knows that “see you” is often followed by “soon”. It has no idea that “soon” and “shortly” mean nearly the same thing, and it sees only a couple of words back.
Generation three: neural networks that learn similarity
A neural language model represents words as points in a space where similar words sit close together. It can then make a sensible guess after a word combination it has never counted. SwiftKey’s Neural Alpha, released in October 2015, was its first keyboard built this way.
Google described the next step for Gboard in a 2018 paper, “Federated Learning for Mobile Keyboard Prediction”. Its next-word model was a recurrent neural network trained on phones rather than on a server: devices improved the model with local typing data and sent back model updates, not the text. A Google systems paper gives its size as about 1.4 million parameters, tiny by today’s standards. In 2023 Google reported that all of Gboard’s next-word prediction neural models now carry differential privacy guarantees.
Generation four: transformers and whole phrases
The transformer architecture, introduced in the 2017 paper “Attention Is All You Need”, lets a model weigh every earlier word in the context, not just the last few. That is what makes phrase-level suggestions practical: the model can keep a whole sentence’s subject and tone in view.
Apple moved iPhone typing onto it in iOS 17. Its 2023 announcement described autocorrect built on “a transformer language model, a state-of-the-art on-device machine learning language model for word prediction”. It also added inline predictions that complete words or sentences with a tap of the space bar.
Large language models work the same way, at much greater scale. They predict the next token, a word or part of a word, append it and predict again. A phrase suggestion is a few rounds of that loop, stopped early and shown as grey “ghost text” you can accept or ignore. The ghost text guide covers how that looks on Windows.
| Generation | What it looks at | What it offers | Typical failure |
|---|---|---|---|
| Dictionary disambiguation (T9) | The keys pressed for one word | The most frequent matching word | The wrong word for the same keys |
| N-gram statistics | The last one or two words | Likely next words | Generic suggestions that ignore the topic |
| Recurrent neural network | The sentence so far, compressed | Next words that fit the meaning | Loses track in long sentences |
| Transformer language model | The whole visible context | Words, phrases or the rest of the sentence | A fluent phrase you did not mean |
What happens between a keystroke and a suggestion
Whatever the model, the loop has the same steps:
- The keyboard or app reads the context: it collects the text before the cursor, and sometimes which app you are in.
- The model assigns a probability to possible next words or phrases.
- The software drops low-confidence guesses, and suggestions in places where they do not belong, such as password fields.
- It shows the best one to three: phones use a strip of words, phrase tools show inline ghost text.
- Many systems then adjust to the words and phrases you accept and type often.
The filtering step matters more than it looks. A tool that always shows something trains you to ignore it. A tool that stays quiet when unsure gets read when it does speak.
Why predictions are often wrong
A prediction is only a probability. The model can guess the shape of a polite reply. It cannot know the date you are about to promise or the name of the person you mean. The first words of a new message are the hardest to predict, because there is almost no context yet. Suggestions improve as the sentence grows.
What makes wrong guesses tolerable is the way suggestions are offered. If accepting takes one key and ignoring takes none, a wrong guess costs nothing: you keep typing.
Where predictive text runs on a Windows PC
Windows has word-level text suggestions for the physical keyboard. Microsoft’s setup guide says words are predicted from your spelling as you type. Word’s text predictions go further and suggest words or phrases. Microsoft lists them among the Office connected experiences that analyse your content, with basic offline functionality only in some scenarios.
Typeahead runs a compact language model on your own PC and suggests the rest of the sentence in Windows apps such as Word, Outlook, Chrome and WhatsApp, including when you are offline. You accept with Tab or the Right arrow key. The article on why a small on-device model is enough explains why this task does not need a cloud-sized model.
Frequently asked questions
Is predictive text a form of AI?
Does predictive text learn from what I type?
Why does Windows suggest only single words?
Why is the first suggestion in a message usually poor?
Typeahead brings phrase-level prediction from a local model to Windows desktop apps. Try it on your own writing for seven days.
Get Typeahead