Interview Prep/Agentic AI/LLM fundamentals

What is top-p (nucleus) sampling?

BeginnerConceptLLM fundamentals
Answer

Top-p limits the model to the smallest set of next tokens whose combined probability reaches p, for example 0.9, and samples only from those. It cuts off unlikely, odd tokens while keeping some variety. Most teams tune either temperature or top-p, not both at once, because they interact.

All Agentic AI questions Roadmap: LLM fundamentals & RAG

More on LLM fundamentals