Top-p (nucleus sampling)
Definition: Top-p, or nucleus sampling, restricts the next-word choice to the smallest set of candidates whose cumulative probabilities reach a threshold p (e.g. 0.9).
This drops very unlikely words while keeping diversity, unlike a purely deterministic choice. It is tuned, often alongside temperature, to balance coherence and creativity.