Temperature
Executive Definition: Temperature — A configuration parameter that controls the randomness and creativity of an AI model’s text generation.
Temperature is a parameter (typically between 0 and 2) that dictates how deterministic a model’s output is. A low temperature produces highly predictable text, while a higher temperature encourages creative, varied responses.
Frequently Asked Questions
What temperature should I use?
Use 0.0 to 0.3 for factual tasks like data extraction and coding. Use 0.7 to 1.0 for creative tasks like brainstorming and content generation.
Does temperature affect accuracy?
Yes. Lower temperatures produce more consistent and factually accurate outputs. Higher temperatures increase the likelihood of hallucinations and logical errors.
Is temperature the only way to control randomness?
No. Top-p (nucleus sampling) limits the pool of tokens the model considers. Many developers tune both parameters for fine-grained control.