Skip to content
Tokens & temperature · Lesson 6 of 8

Temperature & randomness

Tutor:

Last lesson you saw that a model never picks “the” next word. It gives every possible token a probability, then rolls a weighted die.

Temperature reshapes those odds before the roll. Low temperature sharpens them — the favourite almost always wins. High temperature flattens them — long shots get a real chance. Drag it and watch.

Moon café tagline: “___next-token odds
  • Brew61%
  • One22%
  • Lunar11%
  • Fly4.0%
  • Zero1.7%
0.70

Balanced: plausible variety. Most chat apps live around here.

Tutor:

Your turn. Write a prompt that asks for a tagline for a coffee shop on the moon with a length limit. Run it once at 0, then a few times at 1.0, and compare.

Your turn
  • Asks for a tagline, not yet
  • Coffee + moon, not yet
  • Sets a length limit, not yet
  • Ran at 0 and 1.0, not yet
run at
~0 tokens

Turn on JavaScript to run prompts.