Recipe: temperature defaults and a risk checklist
Starting points, not laws. Test them on your own examples.
Four recipes to keep next to every LLM feature: an input-budget helper, a daily-cost projection, starting temperatures per task, and a hallucination-risk checklist. Copy them, then replace the guesses with your own measurements.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 5 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write max_calls_per_day(budget_dollars, tokens_in, tokens_out, price_in, price_out) returning the whole number of calls a daily dollar budget pays for (prices per million tokens). Test: budget 60, 1500 in, 300 out, prices 0.50 and 1.50.
Write risk_level(score) returning low for 0 to 1, medium for 2 to 4 and high for 5 and above. Print the levels for scores 0, 3 and 7.
Explain it without notes
How do you compute how many input tokens you can send?
How do you estimate the monthly cost of a feature before building it?
How would you choose a starting temperature for a new feature?
How do you decide how much hallucination protection a feature needs?
Expected output
extract fields temperature 0.0
classify temperature 0.0
write code temperature 0.2
summarise temperature 0.3
chat temperature 0.7
brainstorm temperature 1.0
FAQ bot: score 7, risk high -> ground, verify quotes, add human review
poem generator: score 1, risk low -> ship with basic checks
docs helper: score 4, risk medium -> ground with sources and allow I do not know