Temperature
Also: Teplota (temperature), LLM temperature, Sampling temperature
Temperature (temp) is a hyperparameter in generative AI that controls the degree of randomness and creativity in text generation. A lower value leads to more predictable, factual, and consistent outputs, as the model selects the most likely words. Conversely, a higher value encourages diversity and novel combinations at the cost of a higher risk of hallucinations.
What it means for a company
Setting the right temperature is crucial for companies when integrating AI into specific business processes. If you use language models for data extraction from contracts, support ticket classification, or coding, you require precision and reliability. In these cases, a temperature close to zero is chosen. On the other hand, in marketing, when brainstorming campaign ideas or writing creative copy, you need variability to avoid robotic phrases. Here, it makes sense to increase the temperature. An incorrectly chosen value will either limit the model's potential or make the outputs unreliable for corporate use.
In practice
Imagine an enterprise chatbot operating over an internal knowledge base (RAG). If the temperature is set to 0, the model accurately cites the vacation policy without making things up. It answers concisely and factually. However, if a developer mistakenly sets the temperature to 1, the model might phrase its answers too creatively or even start combining unrelated rules, providing employees with inaccurate information.
Frequently asked questions
What temperature value should I set for common business tasks?
The answer depends on the specific goal of the task. For analytical tasks, translations, and working with facts, use a value between 0 and 0.2. For writing emails, 0.5 to 0.7 is suitable, and for creative brainstorming, you can go up to 0.8 to 1.0.
Does a zero temperature mean the model will never make a mistake?
No, a zero temperature does not completely eliminate mistakes or hallucinations. It only means that the output will be highly deterministic, and you will usually get the same response for the same prompt. The model can still hallucinate if it considers the false information to be the most statistically probable continuation.