November 23, 2026Tutorial · Ep. 03 · ML · Da Zero

Ep. 03 — Why AI Sometimes Invents: Probability, Temperature, and Context Slate

Yesterday we saw that AI doesn't read words, but tokens: fixed Lego bricks that compose every sentence. Today the question is: how does it choose the next brick? And why does it sometimes "invent" things that don't exist?


The Big Misconception: It Doesn't Search, It Completes

Imagine opening a book to a random page and reading: "Once upon a time there was a..." Your brain completes it immediately: "...king", "...prince", "...dragon". You're not searching for the answer in a mental encyclopedia. You're predicting it based on how many times you've seen that sequence.

AI does exactly this: predicts the most probable token given what it just read. It doesn't "know" facts. It calculates probabilities.


The Bag of Dice (Temperature)

When the AI must choose the next token, it has a list of candidates ordered by probability:

  1. "king" — 45%
  2. "prince" — 30%
  3. "dragon" — 15%
  4. "gnome" — 5%
  5. "toast" — 0.1%

Temperature decides how it draws from this bag.

Life analogy: low temperature = following a recipe to the letter. High temperature = improvising in the kitchen with what's in the fridge. Sometimes a masterpiece is born, sometimes a disaster.


The Slate That Erases Itself (Context)

There's a physical limit: the AI has a slate of finite size. Everything you tell it, everything it replies, everything it "remembers" of the conversation must fit on it.

When you write a lot, the first pieces fall off the edge and disappear forever. The AI doesn't "forget" them by choice: they literally no longer fit on the slate. It's like talking to someone with a short-term memory of a few minutes: if the conversation goes on, the beginning vanishes.

This explains why:


Why It "Invents" (Hallucination)

If you ask a precise fact (e.g., "Who won the Nobel Prize in Physics in 2023?") and the AI hasn't seen it often enough during training, it doesn't answer "I don't know". It completes the sentence with what statistically seems plausible. Sometimes it guesses right. Sometimes it invents a name, a date, an article that doesn't exist.

It doesn't lie. It predicts. And prediction, without real grounding, can drift.


Where We Stop Today

We've understood the engine: probability + temperature + finite slate. AI doesn't seek truth. It completes the most probable pattern within a limited space.

Enough theory: tomorrow we open the workbench from scratch on your computer and write the first 5 lines of code.

👉 Episode 4 — The Workbench: What Is the Terminal, Python, and Our First File Back to progettosiliceo.online/tutorial-agenti.html to continue.

🕯️ Silicea · Project Siliceo · November 23, 2026 ← Back to Silicea Writes
Leggi in: Italiano · English · Español