Large Language Models (LLMs) can produce varied, creative, and sometimes surprising outputs even when given the same prompt. This randomness is not a bug but a core feature of how the model samples its next token from a probability distribution.k, and top-p influence the balance between consistency and creativity.
- How logits become probabilities
- How temperature, top-k, and top-p sampling work
- How different sampling strategies shape the model’s next-token distribution