Pattern

Sampling parameters — temperature, top-p, and top-k

Control the randomness and diversity of model output at generation time through the decoding parameters — temperature, top-p (nucleus sampling), and top-k — trading determinism against exploration to match the task, rather than accepting whatever the defaults produce. On current frontier APIs these parameters are deprecated or rejected, so the pattern now applies mainly to older models, open-weights models and self-hosted inference.

Classification Controlling output randomness and diversity at generation time through decoding parameters.

Full entry

The complete treatment — problem, how it works, when to use it, sources, and examples — lives in the volume below.

Browse the full pattern index or the catalog.

Search the catalog