Interactive explainer · no real AI inside

How a language model writes, one word at a time

An AI never writes a whole sentence at once. It looks at everything so far, gives every possible next word a probability, picks one — then asks the same question again. Step through a real example below.

The text so far Step 0 of 8

Tip: the ← and → arrow keys also step through the sentence.

What comes next? sum = 100%
1.00