What Is Temperature and What Sampling Parameters Exist?
Temperature
Section titled “Temperature”Temperature controls how deterministic or creative the model’s responses are.
| Temperature | Behavior | Typical Use Case |
|---|---|---|
| 0.0 | Deterministic: same question → same answer | Classification, code generation, fact lookup |
| 0.3 to 0.7 | Slight variation, factual | Chat, summaries, translation |
| 0.8 to 1.2 | Creative, multiple valid answers | Brainstorming, creative writing |
| >1.2 | Very chaotic, often unusable | Experimental |
Other Parameters
Section titled “Other Parameters”- Top-P: only considers candidates up to a cumulative probability P (nucleus sampling)
- Top-K: limits the selection to the K most likely candidates
- Presence Penalty / Repetition Penalty: reduces repetition in the output
Recommendation
Section titled “Recommendation”For production systems, generally choose a low temperature (0 to 0.3). The default values are well-tested and should only be changed for a specific reason.
