News for hackers. Stuff that matters.
Re:Things we learned about LLMs in 2024 by dartos on Tuesday December 31, 2024 @06:59PM (#42562805)
> Don't use LLMs where accuracy is paramount.

Then why do people keep pushing it for code related tasks?

Accuracy and precision is paramount with code. It needs to express exactly what needs to be done and how.

Re:Things we learned about LLMs in 2024 by simonw on Tuesday December 31, 2024 @07:04PM (#42562838)
Code is the best possible application of LLMs because you can TEST the output.

If the LLM hallucinates something the code won't compile or run.

If the LLM makes a logic error you'll catch it in the manual QA process.

(If you don't have good personal manual QA habits, don't try using LLMs to write your code. And maybe don't hit "accept" on other developer's code reviews either?)

Re:Things we learned about LLMs in 2024 by dartos on Tuesday December 31, 2024 @08:04PM (#42563118)
> Code is the best possible application of LLMs because you can TEST the output.

This is an overly simplistic view of software development.

Poorly made abstractions and functions will have knock on effects on future code that can be hard to predict.

Not to mention that code can have side effects that may not affect a given test case, or the code could be poorly optimized, etc.

Just because code compiles or passes a test does not mean it’s entirely correct. If it did, we wouldn’t have bugs anymore.

The usual response to this is something like “we can use the LLM to refactor LLM code if we need” but, in my experience, this leads to very complex, hard to reason about codebases.

Especially if the stack isn’t Python or JavaScript.

Re:Things we learned about LLMs in 2024 by simonw on Tuesday December 31, 2024 @08:06PM (#42563125)
So code review LLM-generated code and reject it (or require changes to it) if it doesn't fit your idea of what good code looks like.
Re:Things we learned about LLMs in 2024 by dartos on Tuesday December 31, 2024 @08:35PM (#42563264)
Or… yknow… I could just write the code…

Instead of going through a multi step process to get an LLM to generate it, review it, reject it, and repeat…

I wonder why you reply to these comments, but not my other asking what you use LLMs for and specifically explaining how they failed me.

Re:Things we learned about LLMs in 2024 by simonw on Tuesday December 31, 2024 @08:50PM (#42563344)
Found that comment here, about to reply: https://news.ycombinator.com/item?id=42562394
Re:Things we learned about LLMs in 2024 by BeetleB on Tuesday December 31, 2024 @09:01PM (#42563399)
> Then why do people keep pushing it for code related tasks?

They don't. You are likely experiencing selection bias. My guess is you work in SW, and so it makes sense that you're the target of those campaigns. The bulk of ChatGPT subscribers are not doing SW, and no one is bugging them to use it for code related tasks.

Re:Things we learned about LLMs in 2024 by dartos on Tuesday December 31, 2024 @10:21PM (#42563703)
I mean people in the software field absolutely push for LLMs to write code…

Obviously people not in the software field wouldn’t care…

Re:Things we learned about LLMs in 2024 by danielbln on Wednesday January 01, 2025 @08:59AM (#42566045)
Because there are other ways to validate the output, types being one of them, tests another. Or simply running the code. It's easy enough to validate the output given the right approach that code generated by an LLM (usually as the result of a conversation/discussion about what should be accomplished) is a net positive.

If you zero-prompt and copy-paste the first result into your codebase, yeah, the accuracy problem will rear its ugly head real quick.