Temperature in Large Language Models (LLMs) and other generative AI systems is a crucial control parameter that influences the randomness and creativity of the outputs. The value typically ranges from 0 to 1, where 0 represents highly deterministic (predictable) and 1 represents very random responses.
With a low temperature setting, the system consistently repeats the most probable answers and produces very consistent, but potentially less creative results. This is particularly desirable for fact-based queries or programming tasks.
A high temperature, on the other hand, leads to more diverse and surprising outputs, as the system also selects less probable word combinations. This can be advantageous for creative tasks such as story writing.
In practice, a medium value around 0.7 is often chosen, representing a good compromise between reliability and creativity. Temperature is thus one of the most important parameters that allows users to adapt the behavior of AI systems to their specific needs.