How a language model writes, one word at a time

A language model does not write whole sentences. It looks at the text so far, gives every possible next word a probability, picks one, and repeats. Step through a real example and watch the odds.

Text so far

What could come next?

step 1 of 12

Bar length = how likely the model thinks each word is. The word with a tick is the one the model picks.

focused creative 1.00

Temperature reshapes the odds: low = play it safe, high = wild and creative.