Top-p is an alternative or complement to temperature for steering output diversity. Instead of considering all possible tokens, the model restricts itself to the smallest set whose probabilities together reach the threshold p. Low top-p values make the output more focused and predictable, high values more varied. In practice you usually vary either temperature or top-p, not both strongly at once.
