2026-04-24

Halluzinationen: Rüdigers Lotto

Das Problem am Wort 'Halluzination' im Bezug auf KI ist nicht einfach nur, dass man dadurch diese Dinger anthropomorphisiert. Auf gewisse Weise ist es gegenüber der KI schon beinahe unfair, ihr Halluzinationen zu unterstellen.

Zeit für ein Gleichnis!

Rüdiger wäre gern reich. Er sieht, dass man durchs Lottospielen reich werden kann. Lottospielen ist auch erstaunlich einfach, man muss nur die richtigen Zahlen ankreuzen. Das ist anders als im Tiefbau, beispielsweise, dort muss man oft schwere körperliche Arbeit leisten und wird trotzdem nicht reich. Rüdiger denkt sich also eine tolle Zahlenreihe aus und kreuzt die auf dem Lottoschein an. Er ist sich sehr sicher, dass das klappt, er hat sich immerhin brav an alle Lottoregeln gehalten. Doch es stellt sich raus: seine Zahlenreihe war leider falsch.

Rüdiger zerbricht sich den Kopf. Er analysiert die bisherigen Lottoziehungen. Er schaut sich die zwei letzten Lottoziehungen an und bemerkt, dass die Zahlenreihe von vorletzter Woche eine kleinere Zahlensumme ergibt als die Zahlenreihe von letzter Woche. Rüdiger wähnt sich auf einer heißen Spur. Leider entzieht sich schon die Zahlenreihe von vor drei Wochen diesem eigentlich schönen Schema. Rüdiger analysiert weitere Lottoziehungen, doch er kann einfach keinen Sinn erkennen. Glücklicherweise ist Rüdiger Machine-Learning-Ingenieur. Er bastelt sich ein großes ML-Modell zusammen und "trainiert" es auf den Lottozahlen der letzten 20 Jahre. Dann fragt er das fertige Modell nach den Lottozahlen für nächsten Samstag. Er trägt die Zahlen auf dem Lottoschein ein und ist sich wieder sicher, dass es dieses mal klappt.

Es klappt nicht. Die gezogenen Zahlen sind andere als die, die sein Modell ausgespuckt hat. "Scheiß Modell", denkt Rüdiger, "das halluziniert ja wie blöde."

2026-01-06

Dijkstra on proof

That a proof is also the carrier of our understanding and that the joy of understanding is the last one we should delegate to machine is hardly stressed, probably because it cannot serve as a basis for funding.
Edsger W. Dijkstra, EWD 494

2025-12-22

AI does interpolations that I could have done myself

The current crop of AI image and video models washes a new class of videos ashore my Youtube recommendations: AI-enhanced historic footage. The 1920s, 1930s, etc. can now be watched in colour, high-definition and with clear sound. An artificial intelligence algorithm takes the original grainy black-and-white footage and interpolates what lies between the grains and below the film scratches. This is a fun party trick but it’s also utterly useless. The human brain already performs these interpolations and in most cases with less cliché and cringe. When I watch an original grainy recording of 1920s Berlin and then an AI-enhanced version thereof, I learn nothing new.

2025-12-22

Formal core, natural language shell

A fundamental architecture pattern of functional software architecture is Functional Core, Imperative Shell. The gist of this pattern is that you design the core of your application (your domain logic, or: business logic) in a pure, immutable, algebraic (i.e. functional) language, and there's a surrounding shell that deals with the messy outside world of side effects and mutable state.

While working on an application that was mandated to include an "AI component" -- by which the sponsor of course meant: large language models --, I got the epiphany that LLMs only ever make sense as part of the user interface. This leads to a software design pattern similar to Functional Core, Imperative Shell, which I clunkily call ‘Formal Core, Natural Language Shell’.

The rationale behind Formal Core, Natural Language Shell is similar to the rationale behind Functional Core, Imperative Shell. In both cases, the former allows for clear, concise reasoning, which is vital for the application logic to work as intended. The latter is either a neccessity for which we have not yet found better abstractions (imperative shell) or a nice add-on that makes life easier (natural language shell).

In the case of the aforementioned software I built, which follows this pattern, the formal core consists of an RDF knowledge graph along with a simple modification logic based on git. The natural language shell allows users to specify a set of facts in English prose. An LLM then tries to translate this prose into RDF and presents a graphical representation thereof to the user. When the user confirms, the corresponding RDF data is committed to the formal core.