Temperature (degree of variation)

Temperature (degree of variation)

In the field of AI, temperature is a parameter that controls how random the generated text should be. Temperature can be adjusted in the selection phase, where the model chooses the next word based on calculated probabilities. Low temperature (for example 0.1-0.3) makes the model more often choose the most probable words, giving more predictable and conservative responses. High temperature (for example 0.8-1.0) increases the chance that it chooses more unexpected or less probable words, giving more creative and varied responses. For medical applications, choosing lower temperature would ensure more precise and consistent responses.

Example (generated by ChatGPT-4o): Question: "What are common causes of headache?"

  • Low temperature (0.2) gives a concise, accurate, and objective response: "Common causes of headache include stress, dehydration, muscle tension, sleep deprivation, and migraine. Some medical conditions, such as high blood pressure or sinusitis, can also cause headache."
  • High temperature (0.8) gives a more varied, informal, and descriptive response: "Headache can be caused by everything from stress and dehydration to poor sleep or tense neck muscles. Some get headaches from strong smells or loud sounds, while others may experience it as a symptom of underlying diseases such as sinusitis or migraine. In rare cases, headache can be a sign of more serious conditions."