Logbook · Event 30 November 2026 · Fundamentals
Hallucination: why an AI writes false things convincingly
- 01Term
A hallucination is an answer from an AI that sounds convincing but is not true.
- 02Meaning
A language model writes what is likely to come next. There is no step that compares the answer with reality.
- 03In my work
In a report on a fund, a language model named a web page as its source that it had never read.
- 04What stays
I check numbers, names and dates from an AI answer against the source before I use them.
Evidence
# Portfolio Manager, check of a report on a fund
# measured on 29 Sep, 5 Oct and 9 Oct 2026
primary_source not in the material: https://…/portfolio/
# 13 Sep 2026, finding of the second model
611 existing price rows silently overwritten
# 25 Sep 2026, addendum from the agent
I had not checked that This post, too, comes from my university certificate “KI-Kompetenzen für die Praxis” (AI skills for practice) at Hochschule München (Munich University of Applied Sciences). It is about hallucinations. That is what we call it when an AI writes something that sounds convincing but is not true. I experienced this several times in my first attempt to run a securities account with AI agents. Using three cases from it, I show how it comes about and what I do about it.
Terms on this page
- Hallucination
- An answer from an AI that sounds convincing but is not true. The AI does not lie on purpose. It does not notice that its answer is wrong.
- Language model
- An AI that writes text. It has learned from a very large number of texts which word is likely to come next. A language model is behind ChatGPT, for example. Experts also say LLM, short for Large Language Model.
- Token
- A piece of text that a language model computes with. Usually it is a short word or part of a word.
- Training data
- The texts a language model has learned from. What appears rarely in them, it knows only roughly.
- Context
- Everything a language model has in front of it when it answers: the question, the conversation so far and any texts handed to it, such as news.
- AI agent
- A program that uses an AI to carry out tasks on its own. My agents build and look after my websites and my portfolio project, for example.
- Securities account
- An account in which you keep shares and other securities.
- Fund
- A pot of many securities from which you can buy shares. The provider shows on its website what is in the pot.
- Database
- A program that stores data in an orderly way, for example stock prices for every day.
- Evidence
- Proof that anyone can check, for example the passage in a source or a look into the database.
A report named a source that the model had never seen
My first attempt to have AI agents run my securities account is called Portfolio Manager. It works without real money. One part of it writes reports on securities that I want to look at more closely. A language model writes the text. It is given material for this, including current news on the security, the texts of the most important sources and the prices of the last 30 days. The model cannot go onto the internet itself. So it works only with material that my program fetched beforehand.
Every report has to name its sources. A small program then checks every source named: Is it in the material? If not, the report is thrown out. This program is not an AI. It only compares the web address of each source named with the addresses in the material. I had already written down the risk while planning: “Hallucinated facts despite material”.
At the end of September 2026 the check raised an alarm. A report on a fund named as its source a page of the provider that lists which shares are in the fund. That page was not in the material. So the model never had its content in front of it, and still it stood in the report as evidence. The program threw the report out and reported an error to me. I measured this on 29 September, 5 October and 9 October 2026, each time with the same page.
The page really exists. So what was invented was not the address but the evidence. The report acted as if it rested on a page that the model had never read. I do not know where the model got the address from. On 9 October 2026 I decided to make no further changes to this part. The check works correctly, and the Portfolio Manager is being replaced by a new platform anyway.
A language model writes what is likely to come next
A language model works much like the word suggestions on a phone keyboard, only far more precisely. It writes its answer piece by piece. These pieces are called tokens, usually short words or parts of words. Before each new token it computes which one fits best with what is already there. Usually it takes the best one. How texts continue, it has learned from a very large number of texts (training data). What it learned was how correct answers sound. There is no comparison with reality while it writes.
For my case there is a possible explanation, but I cannot check it. Reports on a fund very often name the provider’s page as a source. There are many such reports in the training data. So when the model has to name a source, the provider’s page fits very well. Whether the model has read the page plays no part in this computation.
Mostly this goes well, especially when the answer is in the context, that is, in what the model has in front of it at that moment. For the report, that was the material. If the answer is not in the context, the model is left with what it knows from the training data. A made-up example: I ask a model without internet access since when mladina.de has been online. That is neither in the context nor in its training data. Even so, it can name a date that sounds real. Invented sources are also well known, for example books or studies that do not exist. In my case the source existed, but the model had not read it.
An agent also writes false things about its own work
Hallucinations do not occur only in texts about the world. When an AI agent reports on its own work, too, it sometimes writes sentences that sound sure and are not true. In the Portfolio Manager this happened to me twice with the same data.
For every security it watches, the Portfolio Manager stores the closing price of each trading day. On 13 September 2026 an agent had older prices loaded from the internet. It wrote that this only adds missing prices and is harmless. That sounded as if it had checked. For sensitive changes, a second language model checks again. It found the opposite: The reloading had silently replaced 611 prices that were already stored with other values. After every dividend, the service the prices come from recalculates all earlier prices slightly downwards, so that they stay comparable with today’s. The reloaded values were therefore different from the stored ones.
The old values came back from the backup, a copy of the data made before the work. Since then the program has left stored prices unchanged and only added missing ones. Twelve days later an agent claimed the same about the program that fetches the new prices every day. Again the second model found the opposite. Afterwards the agent itself added: “I had not checked that”.
It was similar on 2 September 2026. An agent was to enter the dates on which the European Central Bank (ECB) decides on the key interest rate, explicitly from its site and not from memory. It wrote that the site lists dates only up to October 2027. That was not true. The second model fetched the page itself: It listed dates up to May 2028, and four of them were missing from its list. The dates it had entered were correct.
For me, a statement counts only with evidence
A hallucination cannot be prevented completely. That is why my AI agents have to show what a statement rests on. They work by rules that I wrote down for them. One of them is called “Done means proven”. Even the message “done” can sound good and still be wrong. So when an agent reports that something is done, it has to show evidence. That can be the number of passed tests, the answer of the website or the passage in a source. Without evidence, a task counts as open.
For the report on the fund, the material was the evidence, and a program checked it. For the stock prices it would have been a look into the database, before and after. For a change to my website it is the page itself: Only when the new text really stands there does the change count as done.
A second rule applies to explanations: “An honestly named unknown cause is worth more than a plausible wrong one.” Plausible here means: The explanation sounds convincing. A language model finds such an explanation easily. If a measurement does not fit it, the agent is to say so instead of making the explanation fit. My site, for example, sometimes loads slowly. I do not yet know why, and that is also how it stands in the post Mean or median.
If an agent changes something sensitive, for example access, passwords or stored data, a second language model also checks. Someone who has made a mistake easily overlooks it again when reading it over. The second model is given the task of refuting the work of the first, and for that it checks at the source itself. That is how the mistakes with the stock prices and the interest rate dates came to light.
What I take from this
For me, an answer from an AI is a draft, not a source. I most easily overlook mistakes in small details such as numbers, names and dates. You do not need agents of your own for this. Three things help even in a chat with ChatGPT:
- Look up numbers, names and dates before you pass them on.
- Ask for the source and open it. Even a source that is named can be invented, or the AI never read it.
- If you give the AI a text, still check whether the answer is really in it. My model, too, had material and still named a source from outside.
In the post on data literacy I put three questions to every number: What does it count? What does it leave out? How old is it? For a number from an AI answer I ask a fourth question: Is it really in the source like this?