Chapter 5: The model

Now the question most people start with: why does it sound so sure when it is wrong?

Hallucination

Output that reads as fact and isn't: a package, function, flag or citation that doesn't exist. It is produced by the same step as correct output, so nothing in the text marks it, and confident wording tells you nothing.

Agents act on it. They import packages and call methods that were never there. Type checks and installs catch a lot of this, but reading alone won't. Invented package names also give attackers something to register.

Say it to your agent

“Before you add any dependency, run npm view <name> version repository.url and show me the output. If it doesn't exist or the repository looks wrong, stop and tell me.”

The workshop

Name a word, or describe what you mean in everyday language.