This article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.
How does predictive text work?
Quick answer
Predictive text uses a language model trained on large text collections to estimate the probability of the next word or letter given what you have already typed. It ranks the most likely continuations and shows the top few as tappable suggestions, updating them with every keystroke.
Predictive text guesses the next word or letter by comparing what you have typed against patterns learned from large amounts of text. It ranks likely continuations by probability and shows the top few, updating as you type.
Step by step
- A language model is trained on a large body of text to learn which words and letter sequences commonly follow others.
- When you type, the system treats your current text as context and calculates a probability for each possible next word or letter.
- The candidates are ranked by probability, and the top few are displayed as suggestions on the keyboard.
- Each new character you type changes the context, so the model recalculates and refreshes the suggestions immediately.
- If you tap a suggestion, it is inserted into your message and may be recorded to personalise future predictions.
Key things to understand
- A language model is trained on huge text collections to learn which words and letter sequences tend to follow others.
- Each possible next word is assigned a probability based on those learned patterns and the words already typed.
- The system ranks candidates by probability and displays the top few as suggestions on the keyboard bar.
- As you type more letters, the context narrows and the suggestions update in real time.
- Selecting a suggestion feeds it into the message and may also be used to improve future predictions.
Labelled diagram
- Training text
Large collections of sentences are used to learn word and letter patterns.
- Language model
A statistical model stores probabilities of sequences occurring in the training data.
- Your input
The words or letters you have typed so far form the context for prediction.
- Probability ranking
The model scores each possible next word or letter by how likely it is.
- Suggestions shown
The top few candidates appear on the keyboard for you to tap.
Real-world examples
- On a smartphone keyboard, typing 'see you' often prompts 'later' or 'soon' as the next word.
- In a search box, typing 'weather in' may suggest city names based on popular queries and your location.
- Email clients like Gmail offer Smart Reply, suggesting short complete responses such as 'Sounds good, thanks!' based on the message received.
- Messaging apps on Android and iOS show a strip of three predicted words above the keyboard as you type.
Common mistake
✗ Myth: Predictive text understands the meaning of your message and thinks like a human.
✓ Fact: It relies on statistical patterns in text, not comprehension. It predicts likely word sequences without knowing what they mean, which is why suggestions can be grammatically odd or contextually wrong.
People also ask
How does predictive text guess the next word?
What is the difference between predictive text and autocorrect?
Can predictive text be wrong?
Does predictive text learn from what I type?
Why does predictive text sometimes suggest embarrassing or wrong words?
Is predictive text the same as autocorrect?
Can predictive text work without an internet connection?
Part of the guide: How AI Works →

