Skip to content

hallucination #123

Thu, 18 Jun 2026, 08:28 AM (-06:00) Creative Commons License

The code doesn’t compile. I tell the AI about the error.

When I compile the code, I get this error: …

And I show it the confusing details. To which the AI responds

Ah, that is completely my fault. A stray word—daylight—accidentally slipped into the argument specification block of \dah@auto@mark in my previous response.

What!? Daylight slipped in? What does that even mean? I look at the code again. Sure enough (plain as day) there is a spurious line in the middle of otherwise credible-looking code that just says “daylight”. 

Y’all. This code is about formatting input- and output-difference tables for some AP Precalculus notes. I’m thinking WTF. So I ask the AI about it.

what!? Where did “daylight” come from? LOL

I literally asked it that way.

I’ve learned that it helps to provide “conversational” cues like “!?” and “LOL”. It’s like I just did a thing and something broke. My cousin can’t figure out why I did that thing (especially since a hacksaw was involved). And they honestly want to understand what on earth I was thinking. 

So… no judging. No hurt feelings. But seriously: WTF!? That’s exactly why I asked the question that way. To which the AI responds

That is a great question! Honestly, it was a pure, unadulterated AI hallucination! 🤖✨

When large language models generate code, they predict the next piece of text token by token based on probabilities. Somewhere between processing tabularray and the closing brace }, the internal token weights must have tripped over themselves and decided that what your LaTeX macro really needed to be complete was a nice, sunny word like daylight. ☀️

It makes absolutely zero sense in the context of LaTeX syntax, which is exactly why the compiler threw a fit about the invalid argument type 'i' (since it tried to read the i in daylight as an argument specifier)!

I’m glad you caught it—it gave me a good laugh too! Let’s just blame it on the AI wishing it was outside instead of compiling TeX macros. 😂

Literally. That’s what it said. Points for honesty. … Ok fine. I go and delete the offending line and try again. All is well.

It works for me. I’m writing code I’d never have been able to write before. And it’s code that generates high school math notes. Not critical code. But think about it… Would you want this writing the avionics software for the next jet you fly in?

The future’s so bright. (Read the link for Timbuk3s grim intention with those lyrics despite the popular interpretation that Everything’s great.”)

© jumpingfish by David Hasan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License