Temperature
A sampling parameter that controls the randomness and creativity of model outputs.
Full Definition
Temperature scales the logit distribution before sampling the next token: values below 1.0 sharpen the distribution (making the most probable tokens even more likely, producing focused, deterministic output), while values above 1.0 flatten it (increasing diversity and creativity at the risk of incoherence). At temperature 0, the model greedily picks the highest-probability token every time, making output fully deterministic. At temperature 1.0, the model samples from the raw distribution. Typical production settings are 0.0–0.3 for factual or code tasks and 0.7–1.0 for creative writing. Temperature interacts with top-p: both should not be set to non-default values simultaneously.
Examples
Setting temperature=0 when generating code to ensure consistent, reproducible outputs across repeated calls.
Setting temperature=0.9 when brainstorming marketing slogans to get diverse, unexpected suggestions.
Apply this in your prompts
PromptITIN automatically uses techniques like Temperature to build better prompts for you.
Related Terms
Top-P (Nucleus Sampling)
A sampling strategy that limits token selection to the smallest set covering a c…
View →Logit
The raw, unnormalised score a model assigns to each vocabulary token before conv…
View →Self-Consistency
Sampling multiple reasoning paths and selecting the most common answer to improv…
View →