How to control response diversity with top_p
The top_p
parameter controls how much of the probability space the model uses when selecting the next word — this is called nucleus sampling.
Range: 0
to 1
Default: 1.0
- Lower
top_p
→ model chooses from a smaller set of highly likely words → more focused - Higher
top_p
→ model chooses from a broader set of words → more diverse