Back to glossary
AI GLOSSARY
Sampling
Large Language Model (LLM) Terms
A decoding strategy where the model selects the next token by randomly drawing from its probability distribution rather than always picking the highest-probability option. Sampling introduces variety and creativity into outputs, controlled by parameters like temperature and top-p sampling. It's the standard approach for conversational and creative applications — purely deterministic decoding tends to produce repetitive, flat text.