How a keyboard ranks its next-word options

A predictive keyboard treats the words you have typed as a short piece of text and estimates which words commonly follow. During training, a language model sees many examples of writing and learns statistical associations: after “I’ll have a cup of,” for instance, “coffee” may be a stronger candidate than “hammer.” The keyboard ranks possible continuations and displays a few near the top.

The calculation can draw on more than the immediately previous word. “Going to” makes some verbs more likely; a longer sentence can narrow the possibilities further. The model weighs these clues rather than following a fixed phrasebook. A different word, a typo, or even a changed topic can shift the ranking.

Why a good guess can still miss the point

The system is predicting text, not identifying the situation behind it. “Let’s eat” may often be followed by a food, so “pizza” can rank highly even if the people typing have already chosen something else—or are discussing dinner plans in the abstract. The same pattern-based method that makes suggestions fast also makes them insensitive to many private intentions and unstated details.

Some keyboards may also use information such as words you have typed before or the current app’s context; exactly what they use depends on the product and its settings. That can make suggestions feel more personal, but it does not turn a likely continuation into a reliable reading of your mind. The next word on screen is best understood as a ranked guess, not a recommendation or a record of what you mean.