🎛️ Machines That Talk · Day 6

The Creativity Dial

Here's a secret about AI: the exact same model can write something boring and safe, or something wild and weird — and only one dial decides which. It's called temperature. Grab the dial and find out.

↓ turn the dial
🎛️ Lab · The Creativity Dial

One dial. Same brain. Different mood.

This tiny AI predicts one word at a time (you trained one just like it earlier!). The dial doesn't change what it knows — it changes how daring it is. Low = always grabs the safest word. High = takes risks. Turn it, then hit Generate.

0.80

temperature (❄️ safe → 🔥 daring)

🙂 balanced
Press Generate to watch the AI write…
🙂 balanced — a mix of safe and surprising.
📊 Peek Inside · Reshaping the Odds

Why the dial works

Every step, the AI has a list of possible next words, each with a chance. The dial reshapes those chances. Turn it down → one bar towers over the rest (it always picks that word — boring!). Turn it up → the bars flatten out (any word could win — surprises!). These are the real odds for the word after "the":

See the shape change? Low temperature = a tall spike = the AI plays it safe every time. High temperature = flat bars = the AI rolls the dice. Picking a word by chance instead of always the tallest bar is the whole magic.
🐞 Break-It Challenge

Freeze it. Then boil it.

A good writer lives in the middle. Push the dial to the edges and watch it break in two different ways. Tap each button a few times and read what comes out.

Tap a button…
Watch for this: at 0 the AI freezes into a loop — it keeps grabbing the same "safe" words and repeats itself, over and over. At max it overheats into gibberish — a random word salad that barely makes sense. Real AI writers tune the dial to the sweet spot in between. That tuning is a real job!
🏷️ The pro wordThe creativity dial is really called temperature. And picking the next word by chance — rolling the weighted dice instead of always taking the tallest bar — is called sampling. Low temperature ≈ almost no sampling (it just takes the top word). Crank the temperature and the sampling gets bold. Every chatbot you've used has this dial hidden under the hood.
🎯 Boss Build · Match the Vibe

Set the dial to hit the mood

I'll ask for a vibe. Use the dial up in the Lab to land in the right zone, then hit Generate for the vibe. Land in the zone 3 times to earn the final badge!

🎯 Target vibe:
press New vibe to start
Matched: 0 / 3
Set the dial, then generate…
🚀 Beyond the Basics

How the pros really do it

Our dial is the real idea, simplified. Here's how word-picking grew up — from "always play safe" to the clever tricks inside real chatbots:

🥇

Always the top word (the safe robot)

Ignore the dice — just grab the single highest bar every time. ✅ Never says anything crazy. ⚠️ Gets stuck in loops and sounds like a broken record.

🎲

Roll the weighted dice (what you built)

Sample a word by chance, and use temperature to make the dice fair or wild. ✅ Creative and lively. ⚠️ At high heat it can pick a silly, super-rare word and derail.

✂️

Cut off the junk first (the real deal)

Before rolling, throw away the unlikely words — keep only the best handful, then sample. ✅ Creative and stays on the rails. ⚠️ One more knob to tune.

🏷️ Pro names to look upAlways-the-top-word is greedy decoding, a.k.a. argmax. Rolling the weighted dice is sampling with temperature. The "cut off the junk" tricks are top-k (keep the best k words) and top-p (nucleus) sampling (keep the smallest set of words that add up to p% of the odds). Real chatbots mix temperature + top-p every single time they type.
🔬 Real Model Lab

Turn the dial on a REAL model

Now do it for real. This is SmolLM2 (small enough for a basic laptop) running on your device. Set a start, drag the temperature, and generate — the same beginning goes from safe-and-boring to wild-and-weird, using real sampling. (~180 MB one-time download, then offline.)

not loaded

🎉 Day 6 Complete!

You found the creativity dialtemperature. Same AI brain, but low temperature plays it safe (and loops), high temperature takes wild risks (and rambles), and the pros tune it to the sweet spot. Picking words by chance is called sampling. You now know a knob most grown-ups have never heard of.

Day 7: The Probability Race →
Tomorrow: we turn word-guessing into a race — watch the AI sprint through probabilities to build a whole sentence. 🏁
AI Adventure · Machines That Talk · Day 6 — made for young inventors 🚀