liveBook · Manning

Temperature

As explained in Context Engineering

An inference parameter that controls the randomness of token selection during generation.

Temperature is an inference-time scalar that controls randomness in token selection. Lower values produce more deterministic outputs; higher values increase diversity. Typical ranges vary by provider, often 0–1 or 0–2. section 1.2.1

Temperature is one of several inference controls that shape generation:

  • Top-k limits sampling to the k most probable candidate tokens; top-p limits it to the smallest candidate set reaching a chosen cumulative-probability threshold. section 1.2.1
  • Maximum output tokens sets the limit on how many tokens the model may generate. section 1.2.1

How Context Engineering covers it

How deep it goes
Defines the scalar, typical provider-dependent ranges, and low-versus-high effects, but gives no tuning procedure.
What you can do after
Configure inference-time randomness by choosing lower settings for more deterministic output or higher settings for greater diversity.
How it connects
Connects temperature to inference-time hyperparameters and contrasts it with top-k and top-p sampling.

Also explained in

Compare how 20 books explain temperature →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Context Engineering. The section links point to the parts of the book it draws on.