LESSON 1.2
Temperature and sampling
Learn key techniques and workflows in Building AI Apps with LLMs.
8m
intermediate
25,017 students
Overview
Sampling parameters decide how the next token is picked. Low temperature for extraction and classification, higher for anything that should feel varied.
In this lesson you will:
- Trade determinism against variety with temperature
- Know what top-p changes and when to touch it
- Pick settings per task rather than globally
Pro Tip
Use caching and revalidation wisely to ensure your app stays fast and data remains fresh without unnecessary requests.