How Language Models Work

Lesson 05

Hallucination

It isn’t lying to you. It’s finishing the sentence.

The model has exactly one move: carry on the text in a way that looks likely. Here it is, making that same move twice: once where the likely thing is true, and once where it is completely made up. When it invents something, people call that a hallucination.

A rabbit folded from pale lilac paper, sitting upright with its ears raised.
Produced out of the hat with total confidence. A made-up answer is folded from exactly the same paper as a true one, which is why it looks the same.

1Pick a question

Do thisRun the first one, note how confident it looks, then run the second one and compare. Nothing about the machine changes between them.

2It writes one chunk at a time (the small number is how sure it was of that chunk)