LLM Fundamentals · TRACK 06/06
Sampling, Temperature & Hallucination
Why the same prompt gives different answers, and why some of them are wrong.
// THE TRACK
01 · START HERETemperatureLearn what the temperature dial really does to token probabilities and pick the right value for your use case with confidence.BEGINNERHallucinationUnderstand why confident nonsense is baked into how LLMs work — and which mitigations actually move the needle.BEGINNERTop-p vs Top-kGo beyond temperature: see how top-p and top-k trim the token lottery and which knob to turn for your task.INTERMEDIATEKnowledge CutoffLearn why every model's knowledge stops at a date — and how search, tools, and RAG smuggle in the present.BEGINNERIn-Context LearningDiscover the emergent ability that lets a frozen model learn a new task from a few examples in the prompt — and why it isn't real learning.INTERMEDIATEFrequency vs Presence PenaltyLearn the difference between the two repetition penalties, frequency and presence, and how to use them to stop a model from looping or droning on the same words.INTERMEDIATENondeterministic OutputsUnderstand the several reasons an LLM can give different answers to the identical prompt, and why even temperature 0 doesn't fully guarantee reproducibility.INTERMEDIATELLMs and ArithmeticUnderstand why a model that writes flawless code can still botch simple arithmetic, and how tools, reasoning steps, and code execution fix it.BEGINNER