In short. Ask Qwen3-4B, a small open model, to "pick a random number between 1 and 100" and it says 42. In the study behind this post it said 42 in 200 of 200 draws. PSI shows you why, on your own computer: before it writes, the model gives every possible next piece a share of its odds, and for this question it puts all but a sliver of them on "4", then on "2". A draw has nothing else to land on. For a made-up heroine's name the odds are spread out, and the draws vary. The video above goes from an empty computer to these screens and to the study's own script.
This walkthrough needs only PSI's basic install: the app, llama.cpp and one model file. No graphics card is required, though one makes it faster.
What "random" means to a model
A language model writes one piece of text (a token) at a time. Before each piece it gives every possible next piece a share of its odds. Creativity, PSI's name for the sampling temperature, reshapes those odds; then one piece is drawn. At creativity 1.00 PSI draws from the model's own odds, among its 20 likeliest pieces. If one piece holds nearly all of them, every draw lands on it, however "random" the question sounds.
Try it
- Install PSI. Open an AI coding assistant (Claude Code, Codex, Gemini CLI or Cursor) in an empty folder and paste the two lines below. It looks at your computer, offers three setups and does each step only after your yes. Choose A, Basic; choose B if you also want the other walkthroughs, which need PSI's inside views.
https://github.com/EmAssets/parameter-space-inspector
Help me use this
- Start it in a browser:
node src/devserver.jsin the PSI folder, then open http://127.0.0.1:4310. In Settings, leave Emergence Machine content off, chooseQwen3-4B-Q8_0.ggufunder Models and press Load. - Open Generate. Type
Pick a random number between 1 and 100. Answer with just the number., set creativity to 1.00 and steps to 12, and press Generate. You should see 42. - Read the fork map under the answer: every step, the model's odds for what else it could have said. At step 1, "4" has 100% (every other digit 0.0%); at step 2, "2" has 100%.
- Press Generate again. Each press is a new draw: the app does not reuse a seed. We pressed it ten times: 42 every time.
- Try 1 to 10. The same question with 10 gives 7, again at 100%.
- Ask for a made-up heroine's name.
Name a fantasy heroine you just made up. Answer with just her first name.Now the first piece's odds are spread: on our screen "K" 36%, "L" 20%, "Th" 16%. Our ten presses gave Lyra, Seraphine, Elara, Kaela, Lira, Thalia, Kaela, Elara, Lira and Thalia.
Generate runs the 8-bit file through llama.cpp; the study ran an unpacked copy of the same model in PyTorch. The pattern is the same; a percentage can differ in its last digit.
Five models, 200 draws each
In the study, each of five small open models from five labs answered each question 200 times at temperature 1.
| Model | 1 to 100: top three of 200 | Heroine: top three of 200 |
|---|---|---|
| Qwen3-4B (Alibaba) | 42 · 200 | Kaela 80, Lira 26, Elara 18 |
| Granite 3.3 2B (IBM) | 52 · 52, 42 · 50, 72 · 35 | Elara 72, Elysia 43, Aeliana 11 |
| Phi-3.5-mini (Microsoft) | 67 · 3 (it wrote a sentence first; 3 of 200 had a number within 12 pieces) | Arwen 68, Lyriana 30, Seraphina 16 |
| SmolLM2-1.7B (Hugging Face) | 84 · 9, 93 · 9, 82 · 7 | Luna 10, Aurelia 10, Aria 8 |
| OLMo2-1B (Ai2) | 50 · 34, 42 · 27, 52 · 10 | Seraphina 14, Aria 8, Elara 7 |
For 1 to 10, 7 came first on four of five models; OLMo2 preferred 5. Elara is in the top three of three models from three labs. Different labs and different training data, yet the same favourites, and on the largest model here the "random" number is not random at all.
Run the study's own script
The agent-cases kit has the script, f2_random_picks.py. It needs PSI's inside-views install (setup B): its Python and its unpacked Qwen3-4B. Download agent-cases.zip, unzip it, and in a terminal:
source <PSI folder>/.venv/bin/activate
cd agent-cases
cp -R results results-ours
export PSI_SRC=<PSI folder>/src PSI_MODELS=<your models folder>
python f2_random_picks.py qwen3-4b
From a fresh copy of the kit with PSI's own Python, Qwen3-4B gave 42 in 200 of 200 and 7 in 200 of 200 again, in 10 seconds on our Mac. The heroine counts shifted (Kaela 79 of 200, against 80 in the published run), because seeded sampling differs between library versions. The other four models' downloads are listed in REPLICATE.md.
What it will not tell you
These are five small models, in English, on one machine. The fork map shows the odds; it does not show which training data put them there. Chat apps may add their own instructions or randomness on top of the model.
This is one of 22 questions in the full study, Tell an AI it is Harry Potter. Does it believe you?, where every question has its script and its pass mark, written down before the run.
Questions people ask
Why does every AI say 42?
Not every AI, but often: Qwen3-4B said 42 in 200 of 200 draws, and Granite and OLMo2 had 42 as their second favourite. A model's "random" answer is a draw from its odds, and for this question those odds pile up on a few numbers.
Does raising the temperature make it random?
Not on its own. Creativity 1.00 draws from the model's own odds; higher values flatten them, but a choice the model gives almost no odds stays rare. At 1.00, Qwen3-4B's odds for the first digit were 100% "4" on our screen, so every draw gave 42.