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
Question Answering
Generation & TranslationAn NLP task where a system automatically answers questions posed in natural language based on given context.
Intent Detection
Generation & TranslationThe classification of user utterances into predefined categories representing the user's goal or purpose, a fundamental component of conversational AI and chatbot systems.
Semantic Search
Core NLPSearch technology that understands the meaning and intent behind queries rather than just matching keywords.
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.
Sentiment Analysis
Text AnalysisThe computational study of people's opinions, emotions, and attitudes expressed in text.
Text Embedding Model
Core NLPA neural network trained to convert text passages into fixed-dimensional vectors that capture semantic meaning, enabling similarity search, clustering, and retrieval applications.
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.
Part-of-Speech Tagging
Parsing & StructureThe process of assigning grammatical categories (noun, verb, adjective) to each word in a text.