A→Z
A2ZAI
Back to Glossary
concepts

Temperature

A parameter controlling randomness and creativity in AI model outputs.

Share:

Definition

Temperature is a hyperparameter that controls how random or deterministic a model's outputs are.

  • **Scale (typically 0-2):**
  • 0: Deterministic, always picks most likely token
  • 0.5-0.7: Balanced creativity and consistency
  • 1.0: Default, moderate randomness
  • 1.5-2.0: High creativity, more unexpected outputs

When to Use Low Temperature (0-0.3): - Factual Q&A - Code generation - Data extraction - Consistent outputs needed

When to Use High Temperature (0.8-1.5): - Creative writing - Brainstorming - Story generation - Diverse ideas wanted

  • **Related Parameter:**
  • Top-p (nucleus sampling): Alternative way to control randomness

Examples

Setting temperature=0 for code generation, temperature=1.2 for creative stories.

Want more AI knowledge?

Get bite-sized AI concepts delivered to your inbox.

Free daily digest. No spam, unsubscribe anytime.

Discussion