Module 8 · LLM Concepts · Lesson 18 of 34
Generation settings, limits and choosing a model
Temperature and top-p, hallucination, knowledge cut-offs, reasoning models and how to pick one.
In this lesson · about 20 minutes
- Choose temperature and top-p for a task
- Explain why models hallucinate and how to reduce it
- Pick a model by weighing quality, speed, cost and context size
At each step the model produces a score for every token; softmax turns those scores into probabilities. Two settings shape the choice:
- Temperature divides the scores before softmax. Below 1 sharpens the distribution (the favourite wins more often); above 1 flattens it (long shots get a chance).
- Top-p (nucleus sampling) keeps only the most likely tokens whose probabilities add up to p, then picks among those. It cuts off the unlikely tail.
Use low temperature for extraction, classification, code and anything that must be consistent; moderate for chat; higher for brainstorming and creative variety. Change one setting at a time. Some newer models fix these values themselves, so check your provider's guidance.
Try it · simulator
Temperature and top-p, up close
Start from “The model”. Set top-p to 0.6 and watch tokens get cut; then raise the temperature and see the bars flatten.
Next-token probabilities after “cat”
Choosing a model
Providers usually offer a family: a large, most capable model; a mid-size all-rounder; and a small, fast, cheap one. Many also offer reasoning (or "thinking") modes that spend extra tokens working through a problem before answering: slower and pricier, much better on hard multi-step problems.
| Need | Usually pick |
|---|---|
| Routing, tagging, short extraction at high volume | Small, fast model |
| Everyday chat, summaries, RAG answers | Mid-size model |
| Complex coding, analysis, agents with many steps | Largest model, often with reasoning |
| Data that must stay on your own servers | An open-weight model you host |
Do not guess: build a small evaluation set (Module 9) and try two or three models on it. The cheapest model that passes is the right one.
Sorting drill
Low or high temperature?
Which setting suits each task?
- Pull invoice totals into JSON
- Classify tickets into 6 categories
- Friendly help-desk replies
- Brainstorm 30 product names
- Generate SQL from a question
0 of 5 sorted
Check your understanding0 of 3 correct
Pick the model settings for your project.
Consider these questions and write down your thoughts. What you write stays on this device.
Quiz score: 0 of 3
Written by Noviq Academy in its own words. The simulators are small teaching models that keep the real idea and leave out the scale; their numbers (prices, speeds, scores) are illustrative. Model names, prices and features change quickly, so check your provider's current documentation before you build. Read-aloud uses your device's built-in voices.