Ask a Techspert: What is generative AI?

How do language models work?

Language models basically predict what word comes next in a sequence of words. We train these models on large volumes of text so they better understand what word is likely to come next. One way — but not the only way — to improve a language model is by giving it more “reading” — or training it on more data — kind of like how we learn from the materials we study. If you started to type the phrase, “Mary kicked a…,” a language model trained on enough data could predict, “Mary kicked a ball.” Without enough training, it may only come up with a “round object” or only its color “yellow.” The more data involved in training the language model, the more nuanced it becomes, and the better chance it has the insight to know exactly what Mary is most likely to have kicked.

In the last several years, there have been major breakthroughs in how we achieve better performance in language models, from scaling their size to reducing the amount of data required for certain tasks.

Language models are already out there helping people — you see them show up with Smart Compose and Smart Reply in Gmail, for instance. And language models power Bard as well.