Top-p (Nucleus Sampling)
1 min read

Top-p, or nucleus sampling, restricts decoding to the smallest set of tokens whose cumulative probability mass exceeds p, balancing diversity and coherence. Like temperature, top-p influences variance and failure modes: higher p can increase creative exploration but also inject off-format tokens or unsupported claims. Prompt mining treats top-p as part of the prompt’s operating envelope, testing which templates remain robust under realistic sampling. For structured outputs, the best prompts often combine clear schemas with conservative sampling. PromptMining.com(TM) enables AI Prompt Mining that jointly tunes Prompts and decoding parameters, helping teams achieve consistent outputs without excessive determinism or token waste.
Related
Related
View all- Prompt Versioning Prompt versioning is the practice of tracking prompt changes over time with immutable identifiers, change logs, and deployment stages …
- Context Window The context window is the maximum number of tokens an LLM can attend to in a single request, including system messages, user inputs, …
- Rubric Scoring Rubric scoring evaluates LLM outputs against explicit criteria-accuracy, completeness, tone, safety, citation quality, reasoning clarity, …
- Prompt Chaining Prompt chaining decomposes a complex task into a sequence of smaller prompts whose outputs feed subsequent steps (e.g., plan retrieve draft …
- In-Context Learning In-context learning is the phenomenon where an LLM learns a task from examples provided in the prompt, without updating model weights. It …

