AI Terminology
/Intermediate
Temperature
Definition
A hyperparameter in LLMs that controls the randomness and creativity of the generated output. It scales the probabilities of the next token before sampling.
Explain Like I'm New
The 'Creativity Dial'. Set it to 0, and the AI is a boring robot that always picks the most obvious, predictable word. Set it to 1, and the AI takes creative risks, writing beautiful poetry. Set it to 2, and the AI goes insane and writes gibberish.
Real World Example
If you are using an LLM to write code or extract JSON data, you set Temperature = 0 to guarantee strict consistency. If you are using an LLM to brainstorm marketing slogans, you set Temperature = 0.8 to get wild, varied ideas.
Common Use Cases
- •Prompt engineering
- •API configuration
Interview Questions
basic
- If you want the AI to give you the exact same answer every time you ask a question, what should you set the Temperature to?
intermediate
- Mathematically, how does Temperature affect the 'Softmax' layer probabilities?