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
Seq2Seq Model
Core NLPA neural network architecture that maps an input sequence to an output sequence, used in translation and summarisation.
Text-to-SQL
Generation & TranslationThe task of automatically converting natural language questions into executable SQL queries, enabling non-technical users to interrogate databases through conversational interfaces.
Text-to-Speech
Speech & AudioTechnology that converts written text into natural-sounding spoken audio using neural networks, enabling voice interfaces, accessibility tools, and content narration.
Speech Synthesis
Speech & AudioThe artificial production of human speech from text, also known as text-to-speech.
Abstractive Summarisation
Text AnalysisA text summarisation approach that generates novel sentences to capture the essential meaning of a document, rather than simply extracting and rearranging existing sentences.
Natural Language Generation
Core NLPThe subfield of NLP concerned with producing natural language text from structured data or representations.
Top-K Sampling
Generation & TranslationA text generation strategy that restricts the model to sampling from the K most probable next tokens.
Sentiment Analysis
Text AnalysisThe computational study of people's opinions, emotions, and attitudes expressed in text.