A Setting That Decides How Much Answers Vary
Temperature is a setting that decides how much an LLM's answers vary. The model picks the next word from many options ranked by how likely they are. Temperature decides whether it picks only the most likely words or leaves room to pick less likely ones too.
Google describes temperature as the degree of randomness in how tokens are chosen, and says that at a temperature of 0 the most likely answer is always chosen.
Low and High Temperature
With a low temperature, the same question returns nearly the same answer. This suits work where there is one correct answer, such as classification, extraction, and multiple choice questions. With a high temperature, the phrasing and ideas widen. This suits work where you want to choose from several answers, such as brainstorming drafts and rewording.
Anthropic's API reference also recommends values near 0 for analysis and multiple choice, and higher values for creative work. It notes, however, that even at 0 the answer will not necessarily be exactly the same every time.
Some Models Cannot Be Set
Some newer models do not let you change the temperature. As of October 2026, Anthropic and Google each explain that some of their newer models reject or ignore a temperature setting. In that case, shape the answers through how you write instructions or through the thinking setting of a reasoning model.
Even when you can change the temperature, the safe approach is to try the default first and lower it only when the variation causes problems. In chat apps, users often cannot change the temperature. To check how much answers vary, send the same question several times and compare.