chapter eight
8 Prompt Sampling
This chapter covers
- Recognizing that a single response is one probabilistic sample, and that multiple independent generations often improve reliability
- Applying four sampling techniques (Mean, Mode, Self Consistency, and Best-of-N) based on output type
- Using spread and vote distribution as confidence signals to support or escalate decisions
- Knowing when to sample and when a single generation is sufficient
Chapters 2 through 7 established how to shape what a Language Model produces in one generation: Structural Elements, Linguistic Elements, Prompt Patterns, Prompt Templates, Prompt Types, and Contextual Prompting.
This chapter addresses a different problem. Even with a strong prompt, one generation can still vary from the next when temperature is above zero (or when other sampling parameters such as top_p and top_k introduce variation). Prompt Sampling improves reliability by collecting multiple independent generations and applying an aggregation or selection method.