Most AI tutorials tell you to set temperature = 0.7 and move on. I use 20 — and the entire decision fits in one line.
I woke up with my head somewhere else entirely: three hours polishing a new HackerNoon article about PC Workman. Screenshots, rewrites, captions. Submitted it. Felt great. Then at 17:00 I remembered it's Wednesday. Code Autopsy day. Good thing I'd been sitting on this one for three weeks.
Back in Code Autopsy #6 I mentioned the part I had most fun building: intent-aware temperature. People asked to see the code. Here it is. Every message sent to hck_GPT carries a hidden number — not an answer, a personality.
- "What CPU do I have?" — temperature 0.35. I want a surgeon: exact model, cores, clock. Creativity here means wrong numbers.
- "Why is my PC slow?" — temperature 0.45. Diagnostic but readable.
- "How are you?" — temperature 0.80. I want a friend. Warm. Funny. Human.
The entire decision:
temperature = _INTENT_TEMPERATURE.get(intent, TEMPERATURE)
One dict lookup. 20 intent types mapped to floats between 0.35 and 0.80. The 0.72 default kicks in only when nothing matches. Temperature isn't a setting — it's a personality selector. Set it once and you get one personality for everything; map it to intent and your AI fits the conversation.
This lives inside hybrid_engine.py — the same 600-line file that handles 9 routing layers, Ollama fallback and bilingual parsing. This one line might be the most valuable of all.
What temperature do you use in your projects?