Overview
Direct Answer
Temperature is a hyperparameter in language models that scales the probability distribution of predicted tokens, controlling output variability. Lower values (near 0) sharpen the distribution toward the most likely tokens, producing deterministic and conservative text; higher values (above 1.0) flatten the distribution, increasing diversity and unpredictability.
How It Works
During token generation, language models compute logits for each possible next token. Temperature divides these logits before applying softmax normalisation, effectively rescaling the probability landscape. A temperature of 1.0 applies softmax unmodified; values below 1.0 amplify differences between high-probability and low-probability tokens, whilst values above 1.0 diminish these differences, permitting lower-ranked tokens greater selection probability.
Why It Matters
Controlling randomness directly affects output quality, consistency, and business outcomes. Creative applications like content generation require higher temperature to avoid repetitive, template-like responses; safety-critical tasks such as code generation or financial analysis demand lower temperature to ensure reliability and predictability. Practitioners must balance creativity against accuracy constraints.
Common Applications
Customer service chatbots typically use moderate temperature (0.7–0.9) for natural conversation whilst maintaining factual accuracy. Content creation tools employ higher settings (1.2–1.5) to generate varied marketing copy. Data extraction and question-answering systems use lower values (0.2–0.5) to minimise hallucinations and preserve precision.
Key Considerations
Temperature interacts with other sampling methods such as top-k and nucleus sampling; combining multiple controls requires careful tuning to avoid unintended effects. No single optimal value exists across domains—effective temperature selection demands empirical testing against domain-specific quality metrics.
Cross-References(1)
Cited Across coldai.org11 pages mention Temperature
Industry pages, services, technologies, capabilities, case studies and insights on coldai.org that reference Temperature — providing applied context for how the concept is used in client engagements.
Referenced By1 term mentions Temperature
Other entries in the wiki whose definition references Temperature — useful for understanding how this concept connects across Natural Language Processing and adjacent domains.
More in Natural Language Processing
Slot Filling
Core NLPThe task of extracting specific parameter values from user utterances to fulfil a detected intent, such as identifying dates, locations, and names in booking requests.
Instruction Following
Semantics & RepresentationThe capability of language models to accurately interpret and execute natural language instructions, a core skill developed through instruction tuning and alignment training.
Text Generation
Generation & TranslationThe process of producing coherent and contextually relevant text using AI language models.
Natural Language Processing
Core NLPThe field of AI focused on enabling computers to understand, interpret, and generate human language.
Relation Extraction
Parsing & StructureIdentifying semantic relationships between entities mentioned in text.
Long-Context Modelling
Semantics & RepresentationTechniques and architectures that enable language models to process and reason over extremely long input sequences, from tens of thousands to millions of tokens.
Cross-Lingual Transfer
Core NLPThe application of models trained in one language to perform tasks in another language, leveraging shared multilingual representations learned during pre-training.
Text Classification
Text AnalysisThe task of assigning predefined categories or labels to text documents based on their content.