AI Anatomy Class · Part 9 · The moment an answer is made
81. The creativity dial
Q. Can you set an AI's 'creativity' with a single number?
- In chapter 14, scores 3, 2, 1, −1 went into softmax and 'school' got 65.7%. Now let's attach a dial to it.
- This dial is the temperature. Divide the scores by the temperature, then put them into softmax. At 1, nothing changes.
- Turn it down to 0.5 and the scores become 6, 4, 2, −2. The gaps double, so 'school' jumps to 86.7%. Much sharper!
- Turn it up to 2 and the scores are 1.5, 1, 0.5, −0.5. The gaps shrink, the bars flatten, and pizza rises to 6.4%.
- All the way? Near 0, only first place is left: that's greedy (chapter 80). Very high, and every candidate is about the same.
- Let the toy model write: at 0.2 it goes in circles, at 1 it sounds natural, and at 2 it gets strange.
- Low temperature fits exact answers, high fits new ideas. It doesn't change what the model knows, only how the odds are shared.
Chapter summary
- Temperature: divide the scores by the temperature, then put them into softmax.
- Low temperature is sharp, so first place takes almost everything. High is flat, so picks spread out.
- Low temperature is steady, high temperature is varied. The model's knowledge stays the same.