SIDE BY SIDE

Greedy vs sampling

A probability distribution does not dictate a single output. Decoding decides how the system turns that distribution into a sequence.

How the mechanisms differ
QuestionGreedy selectionSampling
ChoiceSelect a highest-scoring next tokenDraw a token using probabilities
RepeatabilityRepeatable with fixed scores and tie handlingRepeatable in a deterministic toy with a fixed seed
TemperaturePositive scaling does not change the highest scoreChanges how concentrated the distribution is
DiversityOne local choice per stepCan produce different continuations
TruthfulnessNot guaranteedNot guaranteed
MAKE THE DISTINCTION CONCRETE

If “blue” has probability 0.6 and “green” has 0.4, greedy always selects blue under fixed scores. Sampling can select either; neither number is a probability that a factual claim is true.

Follow the evidence

Read the connected lessons for detailed mechanisms, assumptions, and primary references.

← All comparisons