Researchers have found that large language models (LLMs) tend to parrot buggy code when tasked with completing flawed snippets.
That is to say, when shown a snippet of shoddy code and asked to fill in the blanks, AI models are just as likely to repeat the mistake as to fix it.
As a software developer I’ve never used AI to write code, but several of my friends use it daily and they say it really helps them in their jobs. To explain this to non-programmers, they don’t tell it “Write some code” and then watch TV while it does their job. Coding involves a lot of very routine busy work that’s little more than typing. AI can generate approximately what they want, which they then edit, and according to them this helps them work a lot faster.
AI isn’t binary good/bad. Neither is a hammer - which can’t build a building by itself and is really shitty as a drill. AI is a tool with good uses.
taladar@sh.itjust.works 2 weeks ago
I don’t see why anyone would expect anything else out of a “what is the most likely way to continue this” algorithm.
skip0110@lemm.ee 2 weeks ago
To be fair, if you give me a shit code base and expect me to add features with no time to fix the existing ones, I will also just add more shit on the pile. Because obviously that’s how you want your codebase to look.
sugar_in_your_tea@sh.itjust.works 2 weeks ago
And if you do that without saying you want to factor, I likely won’t stand up for you on the next round of layoffs. If I wanted to make the codebase worse, I’d use AI.
xthexder@l.sw0.com 2 weeks ago
It doesn’t help that the AI also has no ability to go backwards or edit code, it can only append. The best it can do is write it all out again with changes made, but even then, the chance of it losing the plot while doing that is pretty high.
Lemminary@lemmy.world 2 weeks ago
Yeah, that’s what the canvas feature is for with ChatGPT. And you guessed it, it’s behind a paywall. :)
Goun@lemmy.ml 2 weeks ago
This is what I was thinking, if you give the code to a person and ask them to finish it, they would do the same.
If you rather ask the LLM to give some insights about the code, it might tell you what’s wrong with it.