ExplainerTools

Short · AI

How does an AI chatbot pick its next word?

A chatbot scores possible next tokens, turns those scores into probabilities, picks one and repeats. Lower temperature sharpens the top choice; higher temperature spreads the chance.

Try it yourself

Opens Next Word. Change the same thing yourself.

Narrated · 34 seconds · captions includedDownload the film

Keep exploring

Up next

  1. InteractiveNext WordChange the same thing yourself.Try it yourself
  2. 0:33Short · AIWhy do AI agents need tools?
  3. 0:34Short · NumbersHow high can you count on ten fingers?

Transcript

How does an AI chatbot pick its next word? It writes one small piece at a time. It reads everything so far, and gives every possible next piece, called a token, a probability. Then it picks one, adds it, and repeats. Now turn the temperature down. It almost always takes the top choice. Safe, but repetitive. Turn it up, and unlikely words get a real chance. More surprising, and more likely to go wrong. Try it yourself at Explainer Tools dot com.