Interactive Lab ยท LLMs
A language model doesn't "know" the next word, it produces a score for every word, then samples one. A single knob, temperature, controls whether it plays it safe or gets creative. Don't take my word for it, drag the knob and watch.
๐ฌ Watch the 45-second explainer, then turn the knobs yourself below โ
The setup, the model just read this prompt
"The weather today is โฎ"
Below are the model's raw scores (logits) for what comes next. Higher = the model likes it more. But scores aren't probabilities yet, temperature + softmax turn them into the odds it actually rolls.
โถ The playground, turn the knobs
Temperature is the first parameter in every LLM API call you'll ever make, OpenAI, Anthropic, Gemini all expose exactly this dial. The repeatable-vs-chaotic spectrum you just sampled is why code assistants run near 0.2 and creative-writing prompts near 1.0, and it composes with top-p (see that lab) in every production sampler.
The code that's actually running
Set temperature to 0.3 and hit "Roll 25ร". Now set it to 1.6 and roll again. Before you do: guess how many of the 25 will be "sunny" at each setting. Were you right? What does that tell you about when to use low vs. high temperature?
The takeaway