← All notes AI · Craft

LLM temperature, explained by task: settings that make AI output usable

Temperature is the most visible knob in every AI tool and the least deliberately used. Most people pick one value per app and never think again. Then they wonder why their classifier hallucinates and their brainstormer is boring.

The actual mechanism (30 seconds)

Temperature reshapes the probability distribution the model samples from. Low values sharpen it — the model almost always picks its top choice. High values flatten it — unlikely words become reachable. Neither setting is "better"; they trade consistency for variety.

Settings that survive production

TaskTempWhy
Classification / triage / routing0.2–0.4You want the same input to always yield the same label
Data extraction, JSON generation0.3–0.5Structure integrity beats creativity; combine with JSON mode
SEO outlines, technical docs0.5–0.6Structured but not frozen
Social posts, hooks, titles0.8–1.0Variety IS the value; you curate from many options
Localization0.6Natural phrasing without drift from meaning

Three companion rules

  1. Prompt quality first. Temperature can't fix a vague instruction. "Make it engaging" at any temperature produces mush; explicit output contracts produce usable drafts even before tuning.
  2. Pair JSON mode with low temp for machine-read outputs, and still wrap your parser in error handling — models lie about valid JSON occasionally regardless of temperature.
  3. When generating options, generate quantity: high temperature plus "give me exactly 10" beats asking for one perfect anything. Selection is cheaper than generation.

The meta-skill is matching the knob to the failure mode you fear: fear of randomness → lower it; fear of blandness → raise it. Every workflow in my packs ships with these values already tiered per node — generation nodes hot, analysis nodes cold.

Pre-tuned templates: Content Repurposing Engine (n8n) and Dify Content Engine both ship production temperature tiers per task type — no knob-guessing on day one.