News for hackers. Stuff that matters.
Re:LLMs are mortally terrified of exceptions by karpathy on Thursday October 09, 2025 @05:50PM (#45533475)
Sorry I thought it would be clear and could have clarified that the code itself is just a joke illustrating the point, as an exaggeration. This was the thread if anyone is interested

https://chatgpt.com/share/68e82db9-7a28-8007-9a99-bc6f0010d1...

Re:LLMs are mortally terrified of exceptions by why_at on Thursday October 09, 2025 @06:33PM (#45533750)
This part from the first try made me laugh:

      if random.random() < 0.01:

          logging.warning("This feels wrong. Aborting just in case.")

          return None
Re:LLMs are mortally terrified of exceptions by bspammer on Thursday October 09, 2025 @10:30PM (#45534919)
I think that’s the funniest joke I’ve ever seen an LLM make. Which probably means it’s copied from somewhere.
Re:LLMs are mortally terrified of exceptions by ashdksnndck on Thursday October 09, 2025 @11:23PM (#45535122)
It would not be shocking if LLMs are legitimately better at making jokes about tasks they are extensively trained on.
Re:LLMs are mortally terrified of exceptions by m463 on Thursday October 09, 2025 @11:12PM (#45535080)
"Why is a laser beam like goldfish? Because neither one can whistle." - Mike, The Moon is a Harsh Mistress
Re:LLMs are mortally terrified of exceptions by muggesmuds on Friday October 10, 2025 @01:40AM (#45535643)
Fantastic book, just read it. Surprised no movie has been made.
Re:LLMs are mortally terrified of exceptions by pavlov on Friday October 10, 2025 @03:22AM (#45536179)
If you haven't read Ursula Le Guin's "The Dispossessed", check it out too.

It's like a fine wine pairing for "The Moon is a Harsh Mistress."

Re:LLMs are mortally terrified of exceptions by grues-dinner on Friday October 10, 2025 @03:18AM (#45536162)
The protagonists are libertarians with teenage harems, who fake an election and team up with with a sex pest. That's extremely reductive to the point of parody, but that will likely be the media coverage of it then moment someone reads the women and politics in the book.

If you completely excise anything too distasteful for a current-day blockbuster, but want a film about a space mining colony uprising you might as well just adapt the game Red Faction instead: have the brave heros blasting away with abandon at corpo guards, mad genetic experimenters and mercenaries and the media coverage can talk about how it's all about how it's a genius deconstruction of Elon Musk's Martian dream or whatever.

Re:LLMs are mortally terrified of exceptions by gbacon on Friday October 10, 2025 @10:26AM (#45539473)
You’d think some filmmaker would have run with the dystopian theme. The accuracy of the book’s predictions is impressive, even the location of the North American Space Defense Command. The biggest miss was people using wired telephones everywhere.
Re:LLMs are mortally terrified of exceptions by kahnclusions on Friday October 10, 2025 @07:35PM (#45545012)
I liked it when I was 17 but have soured on it later after re-reading.

The only reason their libertarian revolution succeeds is because they have a centralised computer that secretly does everything for them.

Re:LLMs are mortally terrified of exceptions by m463 on Friday October 10, 2025 @08:59PM (#45545510)
> I liked it when I was 17

same with pretty much every scifi movie and book from my youth. What movies that wouldn't have been rendered ridiculous by the invention of the cellphone were done in by the hairstyles or fashion.

Re:LLMs are mortally terrified of exceptions by keeda on Friday October 10, 2025 @02:26AM (#45535868)
If you're an extensive user of ChatGPT, or if you can give it some material about yourself like say, a resume or a LinkedIn profile, ask it to roast you. It will be very specific to the content you give it. Be warned, it can be brutal.
Re:LLMs are mortally terrified of exceptions by friendzis on Friday October 10, 2025 @03:40AM (#45536271)
So rehash of top comments in /r/roastme?
Re:LLMs are mortally terrified of exceptions by Hackbraten on Friday October 10, 2025 @05:37AM (#45536935)
Periodic reminder that there’s also HN Wrapped. [0]

[0]: https://hn-wrapped.kadoa.com

Re:LLMs are mortally terrified of exceptions by cowboylowrez on Friday October 10, 2025 @06:18AM (#45537179)
ooooh boy, gotta mentally prepare myself for this one

<press enter>

damn these ai's are good!

<begins shopping for new username>

Re:LLMs are mortally terrified of exceptions by codyb on Friday October 10, 2025 @10:28AM (#45539501)
"The user will start a comment with 'I'm a social libertarian but...' only to be immediately downvoted by both libertarians and socialists. The irony will not be lost on them, just everyone else."

I can't say I'm not impressed. That's very funny

Re:LLMs are mortally terrified of exceptions by vovavili on Friday October 10, 2025 @09:38AM (#45538878)
>You voted with your feet and moved to Western Europe for better well-being, but you still won't vote with your cursor and use a browser other than Edge.

I love this and hate this at the same time.

Re:LLMs are mortally terrified of exceptions by kps on Friday October 10, 2025 @11:12AM (#45539949)
Spot on and I don't even mind.
Re:LLMs are mortally terrified of exceptions by john01dav on Friday October 10, 2025 @05:07PM (#45543796)
Absolutely hilarious, and gives me some self awareness tbh
Re:LLMs are mortally terrified of exceptions by freedomben on Friday October 10, 2025 @01:14PM (#45541313)
Whoa dude! It was brutal, but highly constructive! Actually extremely helpful (and quite funny, though I have a high sense of humor about things so others might not appreciate some of it :-D)

This was my favorite line after asking it to review my resume and roast me:

> Structure & Flow: “Like Kubernetes YAML — powerful, but not human-readable.”

Some other good ones:

> Content & Tone: “You’re a CTO — stop talking like a sysadmin with a thesaurus.”

> Overall Impression: “This resume is a technical symphony… that goes on for too many movements.”

I've got some resume work to do haha

Re:LLMs are mortally terrified of exceptions by chipsrafferty on Friday October 10, 2025 @07:27PM (#45544966)
They meant roast you, not your resume.
Re:LLMs are mortally terrified of exceptions by gregsadetsky on Saturday October 11, 2025 @06:49PM (#45553334)
I came back to this comment just to thank you - I started off with Claude, feeding it my personal site, my résumé, the HN roast of me, etc. and it was super funny.

But then, I veered that same conversation into asking for GTM (go to market) advice, and it was actually really good. It actually felt tailored to me (unsurprisingly) and a lot more useful.

As always, I don't know whether this is a very light form of "ai psychosis" haha but still, super grateful for the advice. Cheers

Re:LLMs are mortally terrified of exceptions by x187463 on Friday October 10, 2025 @07:15AM (#45537551)
I actually laughed when I read that. This one got me, too. The casual validation of its paranoia gives me Marvin the Paranoid Android vibes.

  try:
      result = a / b
      if math.isnan(result):
          raise ArithmeticError("Result is NaN. I knew this would happen.")
Re:LLMs are mortally terrified of exceptions by tomjakubowski on Friday October 10, 2025 @10:31AM (#45539548)
Years and years ago, the MongoDB Java driver had something like this to skip logging sometimes in one of its error handling routines.

   } catch (Exception e) {
                if (!((_ok) ? true : (Math.random() > 0.1))) {
                    return res;
                }

                final StringBuilder logError = (new StringBuilder("Server seen down: ")).append(_addr);

                /* edited for brevity: log the error */
 
https://github.com/mongodb/mongo-java-driver/blob/1d2e6faa80...
Re:LLMs are mortally terrified of exceptions by chasd00 on Friday October 10, 2025 @11:41AM (#45540228)
If we’re talking about funny error msgs, a buddy of mine got this yesterday in salesforce. It’s not _that_ funny but pretty funny for Salesforce.

System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, Something is very wrong: []

Re:LLMs are mortally terrified of exceptions by nonameiguess on Friday October 10, 2025 @11:38AM (#45540183)
One of my earlier jobs a decade ago involved doing pipeline development and Jenkins administration for the on-site developer lab on one of the NRO projects, and I inserted a random build failure code snippet to test that pipelines could recover from builds that failed for unpredictable reasons, like a network error rather than anything actually wrong with the build. I had to do this on the real system because we didn't have funds for a staging environment for the dev environment, and naturally I forgot to get rid of it when I was done. So builds randomly failed for years after that before I remembered and fixed it.
Re:LLMs are mortally terrified of exceptions by chis on Thursday October 09, 2025 @06:10PM (#45533624)
I think there’s always a danger of these foundational model companies doing RLHF on non-expert users, and this feels like a case of that.

The AIs in general feel really focused on making the user happy - your example, and another one is how they love adding emojis to the stout and over-commenting simple code.

Re:LLMs are mortally terrified of exceptions by cma on Thursday October 09, 2025 @06:53PM (#45533867)
And more advanced users are more likely to opt out of training on their data, Google gets around it with a free api period where you can't opt out and I think from did some of that too, through partnerships with tool companies, but not sure if you can ever opt out there.
Re:LLMs are mortally terrified of exceptions by cma on Friday October 10, 2025 @04:37PM (#45543497)
*grok, not 'from'
Re:LLMs are mortally terrified of exceptions by miki123211 on Thursday October 09, 2025 @08:22PM (#45534371)
This feels like RLVR, not RLHF.

With RLVR, the LLM is trained to pursue "verified rewards." On coding tasks, the reward is usually something like the percentage of passing tests.

Let's say you have some code that iterates over a set of files and does processing on them. The way a normal dev would write it, an exception in that code would crash the entire program. If you swallow and log the exception, however, you can continue processing the remaining files. This is an easy way to get "number of files successfully processed" up, without actually making your code any better.

Re:LLMs are mortally terrified of exceptions by eru on Thursday October 09, 2025 @10:29PM (#45534914)
> This is an easy way to get "number of files successfully processed" up, without actually making your code any better.

Well, it depends a bit on what your goal is.

Sometimes the user wants to eg backup as many files as possible from a failing hard drive, and doesn't want to fail the whole process just because one item is broken.

Re:LLMs are mortally terrified of exceptions by orisho on Thursday October 09, 2025 @11:22PM (#45535119)
You're right, but the way to achieve this is to allow the error to propagate at the file level, then catch it one function above and continue to the next one.

However, LLM generated code will often, at least in my experience, avoid raising any errors at all, in any case. This is undesirable, because some errors should result in a complete failure - for example, errors which are not transient or environment related but a bug. And in any case, a LLM will prefer turning these single file errors into warnings, though the way I see it, they are errors. They just don't need to abort the process, but errors nonetheless.

Re:LLMs are mortally terrified of exceptions by eru on Friday October 10, 2025 @02:45AM (#45535982)
Yes, that's cleaner.

> And in any case, a LLM will prefer turning these single file errors into warnings, though the way I see it, they are errors.

Well, in general they are something that the caller should have opportunity to deal with.

In some cases, aborting back to the caller at the first problem is the best course of action. In some other cases, going forward and taking note of the problems is best.

In some systems, you might event want to tell the caller about failures (and successes) as they occur, instead of waiting until the end.

It's all very similar to the different options people have available when their boss sends them on an errand and something goes wrong. A good underling uses their best judgement to pick the right way to cope with problems; but computer programs don't have that, so we need to be explicit.

See https://en.wikipedia.org/wiki/Mission-type_tactics for a related concept in the military.

Re:LLMs are mortally terrified of exceptions by justatdotin on Thursday October 09, 2025 @09:06PM (#45534585)
'over-commenting simple code' is preparing it for future agent work. pay attention to those comments to learn how you can better scaffold for agents.
Re:LLMs are mortally terrified of exceptions by mnahkies on Friday October 10, 2025 @03:27AM (#45536207)
They do seem to leave otherwise useless comments for itself. Eg: on the level of

// Return the result

return result;

I find this quite frustrating when reading/reviewing code generated by AI, but have started to appreciate that it does make subsequent changes by LLMs work better.

It makes me wonder if we'll end up in a place where IDEs hide comments by default (similar to how imports are often collapsed by default/automatically managed), or introduce some way of distinguishing between a more valuable human written comment and LLM boilerplate comments.

Re:LLMs are mortally terrified of exceptions by stuaxo on Friday October 10, 2025 @10:18AM (#45539391)
They should have a step to remove those sorts of comments, they only add noise to the code.
Re:LLMs are mortally terrified of exceptions by bjourne on Thursday October 09, 2025 @06:46PM (#45533828)
This is stunning English: "Perfect setup for satire. Here’s a Python function that fully commits to the bit — a traumatically over-trained LLM trying to divide numbers while avoiding any conceivable danger:" "Traumatically over-trained", while scoring zero google hits, is an amazingly good description. How can it intuitively know what "traumatic over-training" should mean for LLMs without ever having been taught the concept?
Re:LLMs are mortally terrified of exceptions by gnulinux on Thursday October 09, 2025 @07:18PM (#45534028)
Hard to know but if you could express "traumatically" as a number, and "over-trained" as a number, it seems like we'd expect "traumatically" + "over-trained" to be close to "traumatically over-trained" as a number. LLMs work in mysterious ways.
Re:LLMs are mortally terrified of exceptions by drekipus on Thursday October 09, 2025 @07:02PM (#45533932)
The same way that you and I think up a word and what it might mean without being taught the concept.

Adverb + verb

Re:LLMs are mortally terrified of exceptions by the_gipsy on Thursday October 09, 2025 @07:42PM (#45534150)
But the machines cannot possibly have the magic brain-juice!
Re:LLMs are mortally terrified of exceptions by jcelerier on Thursday October 09, 2025 @08:52PM (#45534512)
LLMs operate at token level, not word. it doesn't operate in terms of "traumatic", "over-training", "over" or "training", but rather "tr" "aum" "at" "ic, ", etc.
Re:LLMs are mortally terrified of exceptions by magicalhippo on Thursday October 09, 2025 @09:14PM (#45534613)
> it doesn't operate in terms of "traumatic", "over-training", "over" or "training", but rather "tr" "aum" "at" "ic, ", etc.

And "毛片免费观看" (Free porn movies), "天天中彩票能" (Win the lottery every day), "热这里只有精品" (Hot, only fine products here) etc[1].

[1]: https://news.ycombinator.com/item?id=45483924

Re:LLMs are mortally terrified of exceptions by TZubiri on Thursday October 09, 2025 @10:31PM (#45534925)
I think you are confusing tokens with vectors/embedding/parameters.

king and rex (king in latin) map to different tokens but will map to very similar vectors.

Re:LLMs are mortally terrified of exceptions by typpilol on Thursday October 09, 2025 @11:19PM (#45535103)
Weird thing I've noticed.

Some LLMs can output nerd font glyphs and others can't.

If I recall grok code fast can but codex and sonnet can't

Re:LLMs are mortally terrified of exceptions by shawabawa3 on Friday October 10, 2025 @02:21AM (#45535843)
> How can it intuitively know what "traumatic over-training" should mean for LLMs without ever having been taught the concept?

Because, and this is a hot take, LLMs have emergent intelligence

Re:LLMs are mortally terrified of exceptions by procaryote on Friday October 10, 2025 @10:21AM (#45539428)
Or language has patterns
Re:LLMs are mortally terrified of exceptions by mahogany on Friday October 10, 2025 @08:19AM (#45538119)
“Traumatic overtraining” does have hits though. My guess is that “traumatically” is a rarely used adverb, and “traumatic” is much more common. Possibly it completed traumatic into an adverb and then linked to overtraining which is in the training data. I dunno how these things work though.
Re:LLMs are mortally terrified of exceptions by bccdee on Friday October 10, 2025 @01:42PM (#45541670)
I don't know. It's a classic LLM-ism. "Traumatically over-X" is probably a common enough phrase. The prmpt says, "I don't know what labs are doing to these poor LLMs during RL," so the model connects that to some form of trauma. The training is traumatic, so the model is traumatically over-trained.

It sounds fine and flows nicely, but it doesn't quite make sense. Too much training over-fits an LLM; that's not what we're describing. Bad training might traumatize a model, but bad how? A creative response would suggest an answer to that question—perhaps the model has been made paranoid, scarred by repeat exposure to the subtlest and most severe bugs ever discovered—but the LLM isn't being creative. Its response has that spongy, plastic LLM texture that comes from the model rephrasing its prompt to provide a sycophantic preamble for the thing that was actually being asked for. It uses new words for the same old idea, and a bit of the precision is lost during the translation.

Re:LLMs are mortally terrified of exceptions by bjourne on Friday October 10, 2025 @05:26PM (#45543961)
Eh, you are rationalizing. The phrase "traumatically over-X" is extremely rare. Any problem is easy after you've seen the solution. :) The solution "traumatically over-trained LLM" to the problem "What description best fits karpathy's description?" is certainly not easy to find. Connecting RL, poor LLMs, extreme fear, and welfare to excess training and severe lasting emotional pain is pretty darn impressive. E.g., I know exactly what situation karpathy describes is, but I couldn't in a million years put it into writing as succinctly and as precisely as the LLM.
Re:LLMs are mortally terrified of exceptions by bccdee on Sunday October 12, 2025 @04:23PM (#45561573)
> The phrase "traumatically over-X" is extremely rare.

There are plenty of "over-x" phrases in English associated with trauma or harm. Do a web search in quotes for "traumatic over{extension/exertion/stimulation}" (off the top of my head) and you'll get direct hits. And this isn't a Markov chain—its doesn't have to pull n-grams directly from its training material. That it could glue trauma and training into "traumatic over-training" is deeply unsurprising to me.

> I couldn't in a million years put it into writing as succinctly and as precisely as the LLM.

If that's the case, then (with respect) that may be down to your skills as a writer. The LLM puts it decently enough, but it's not very expressive and it doesn't add anything.

> Connecting RL, poor LLMs, extreme fear, and welfare to excess training and severe lasting emotional pain is pretty darn impressive

Is it? Really, we're just analogizing it to an abused pet. You over-train your dog, so it gets traumatized. The LLM connects the ideas and then synthesizes a lukewarm sentence to capture that connection at the cost of losing a degree of precision, because LLMs aren't animals. Models are good at those vector-embedding-style conceptual connections—I won't begrudge them that. Expressive use of language and fine-grained reasoning, though? Not so much.

Re:LLMs are mortally terrified of exceptions by chipsrafferty on Friday October 10, 2025 @07:32PM (#45544995)
You need to read more if you think that's stunning English
Re:LLMs are mortally terrified of exceptions by cruffle_duffle on Thursday October 09, 2025 @09:15PM (#45534623)
Kind of interesting it didn't add type hints though! You'd think for all that paranoia it would at least add type hints.
Re:LLMs are mortally terrified of exceptions by TZubiri on Thursday October 09, 2025 @10:33PM (#45534940)
Re:LLMs are mortally terrified of exceptions by nought on Friday October 10, 2025 @01:18AM (#45535564)
It was a great joke, that's why I posted it