Definition
Temperature is a sampling parameter that controls randomness in language model output. At temperature 0, the model picks the most likely next token every time, producing deterministic output. At temperature 1.0+, sampling becomes more diverse and creative. Common settings: 0 for factual extraction and code; 0.7 for balanced everyday tasks (default in most APIs); 1.0+ for brainstorming and creative variation.
Example
Temperature 0: 'The capital of France is Paris.' (consistent every time). Temperature 1.5: 'The radiant capital of France is the city of Paris, jewel of Europe.' (variation, sometimes creative).
When to use
Set 0 for extraction/code, 0.7 for default, 1.0+ for creative variation. Adjust per-task, not globally.