Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

ChatGPT Answers Programming Questions Incorrectly 52% of the Time: Study

The research from Purdue University, first spotted by news outlet Futurism, was presented earlier this month at the Computer-Human Interaction Conference in Hawaii and looked at 517 programming questions on Stack Overflow that were then fed to ChatGPT.

“Our analysis shows that 52% of ChatGPT answers contain incorrect information and 77% are verbose,” the new study explained. “Nonetheless, our user study participants still preferred ChatGPT answers 35% of the time due to their comprehensiveness and well-articulated language style.”

Disturbingly, programmers in the study didn’t always catch the mistakes being produced by the AI chatbot.

“However, they also overlooked the misinformation in the ChatGPT answers 39% of the time,” according to the study. “This implies the need to counter misinformation in ChatGPT answers to programming questions and raise awareness of the risks associated with seemingly correct answers.”

Chrishmax ,

Using the best signals, you can turn $500 into $3000 in just a few days of trading in the future and on the site, just start copying our signals and start enjoying your trades.As for a referral for good trading, checking out EXPERT ELOISE WILBERT ON INSTAGRAM, They have a user-friendly platform and offer a wide range of trading options.

Chrishmax ,

Using the best signals, you can turn $500 into $3000 in just a few days of trading in the future and on the site, just start copying our signals and start enjoying your trades.As for a referral for good trading, checking out (Expert~~Eloi$e Wilbert) on ilint$ttrragrram, They have a user-friendly platform and offer a wide range of trading options.

disconnectikacio ,

Yes there are mistakes, but if you direct it to the right direction, it can give you correct answers

agelord ,

In my experience, if you have the necessary skills to point it at the right direction, you don't need to use it at the first place

andallthat , (edited )

it's just a convenience, not a magic wand. Sure relying on AI blindly and exclusively is a horrible idea (that lots of people peddle and quite a few suckers buy), but there's room for a supervised and careful use of AI, same as we started using google instead of manpages and (grudgingly, for the older of us) tolerated the addition of syntax highlighting and even some code completion to all but the most basic text editors.

pearsaltchocolatebar ,

AI is a tool, not a solution.

interdimensionalmeme ,

Yesterday, I wrote all of this, working javascript code
https://github.com/igorlogius/gather-from-tabs/discussions/8
And I don't know a lick of javascript
I know other languages but that barely was needed. I just gave it plain language instructions and reported the errors until it worked.

Test_Tickles ,

So we should all live alone in the woods in shacks we built for ourselves, wearing the pelts of random animals we caught and ate?
Just because I have the skills to live like a savage doesn't mean I want to. Hell, even the idea of glamping sounds awful to me.
No thanks, I will use modern technology to ease my life just as much as I can.

agelord ,

Bruh, where in my comment did I tell people not to use it?

Test_Tickles ,

you don't need to use it at the first place

agelord ,

Bad reading comprehension is bad.

Test_Tickles ,

Drunk posting is sad.

agelord ,

"you don't need to use it" ≠ "do not use it"

the_crotch ,

That actually sounds awesome sign me up

aidan ,

It can, it also sometimes can't unless you ask it "could it be x answer"

Vespair ,

Anyone else tired of these clickbait headlines and studies about LLM which center around fundamental misunderstandings of how LLMs work, or is it just me?

"ChatGPT didn't get a single answer on my algebra exam correct!!" Well yes, because LLMs work on predictive generation, not traditional calculation, so of course they're not going to do math or anything else with non-language-based patterns properly. That's what a calculator is for.

All of these articles are like complaining that a chainsaw is an inefficient tool for driving nails into wood. Yeah; because that's not the job this tool was made for.

And it's so stupid because there are ton of legitimate criticisms about AI and the AI rollout to be had; we don't have to look for disingenuous cases of misuse for critique.

OhNoMoreLemmy ,

That would be fine, if people weren't using LLMs to write code, or to do school work,

But they are. So it's important to write these articles that say "if you keep using a chainsaw to drive nails, here are the limitations you need to be aware of."

Vespair ,

I see your point and I agree, except that that isn't what these headlines are saying. Granted, perhaps that's just the standard issue of sensationalism and clickbait rather than being specific to this issue, but the point remains that while the articles may be as you claim, the headlines are still presented instead as "A chainsaw can't even drive a simple nail into wood without issue and that's why you should be angry anytime you hear a chainsaw." I dunno. I'm just so exhausted.

efstajas ,

Yeah it's wrong a lot but as a developer, damn it's useful. I use Gemini for asking questions and Copilot in my IDE personally, and it's really good at doing mundane text editing bullshit quickly and writing boilerplate, which is a massive time saver. Gemini has at least pointed me in the right direction with quite obscure issues or helped pinpoint the cause of hidden bugs many times. I treat it like an intelligent rubber duck rather than expecting it to just solve everything for me outright.

InternetPerson ,

That's a good way to use it. Like every technological evolution it comes with risks and downsides. But if you are aware of that and know how to use it, it can be a useful tool.
And as always, it only gets better over time. One day we will probably rely more heavily on such AI tools, so it's a good idea to adapt quickly.

Jimmyeatsausage ,

Same here. It's good for writing your basic unit tests, and the explain feature is useful getting for getting your head wrapped around complex syntax, especially as bad as searching for useful documentation has gotten on Google and ddg.

person420 ,

I tend to agree, but I've found that most LLMs are worse than I am with regex, and that's quite the achievement considering how bad I am with them.

efstajas ,

Hey, at least we can rest easy knowing that human devs will be needed to write regex for quite a while longer.

... Wait, I'm horrible at Regex. Oh well.

S13Ni ,

It does but when you input error logs it does pretty good job at finding issues.
I tried it out first by making game of snake that plays itself. Took some prompting to get all features I wanted but in the end it worked great in no time.
After that I decided to try to make distortion VST3 plugin similar to ZVEX Fuzz Factory guitar pedal.
It took lot's of prompting to get out something that actually builds without error I was quickly able to fix those when I copied the error log to the prompt.
After that I kept prompting it further eg. "great, now it works but Gate knob doesn't seem to do anything and knobs are not centered".

In the end I got perfectly functional distortion plugin. Haven't compared it to an actual pedal version yet.
Not that AI will just replace us all but it can be truly powerful once you go beyond initial answer.

aesthelete ,

Sounds low

interdimensionalmeme ,

Yes, and even if it was only right 1% of the time it would still be amazing

Also hallucinations are not a universally bad thing.

NotMyOldRedditName ,

My experience with an AI coding tool today.

Me: Can you optimize this method.

AI: Okay, here's an optimized method.

Me seeing the AI completely removed a critical conditional check.

Me: Hey, you completely removed this check with variable xyz

Ai: oops you're right, here you go I fixed it.

It did this 3 times on 3 different optimization requests.

It was 0 for 3

Although there was some good suggestions in the suggestions once you get past the blatant first error

Zos_Kia ,
@Zos_Kia@lemmynsfw.com avatar

Don't mean to victim blame but i don't understand why you would use ChatGPT for hard problems like optimization. And i say this as a heavy ChatGPT/Copilot user.

From my observation, the angle of LLMs on code is linked to the linguistic / syntactic aspects, not to the technical effects of it.

NotMyOldRedditName , (edited )

Because I had some methods I thought were too complex and I wanted to see what it'd come up with?

In one case part of the method was checking if a value was within one of 4 ranges and it just dropped 2 of the ranges in the output.

I don't think that's asking too much of it.

Zos_Kia ,
@Zos_Kia@lemmynsfw.com avatar

I don’t think that’s asking too much of it.

Apparently it was :D i mean the confines of the tool are very limited, despite what the Devin.ai cult would like to believe.

eupraxia ,
@eupraxia@lemmy.blahaj.zone avatar

That's been my experience with GPT - every answer Is a hallucination to some extent, so nearly every answer I receive is inaccurate in some ways. However, the same applies if I was asking a human colleague unfamiliar with a particular system to help me debug something - their answers will be quite inaccurate too, but I'm not expecting them to be accurate, just to have helpful suggestions of things to try.

I still prefer the human colleague in most situations, but if that's not possible or convenient GPT sometimes at least gets me on the right path.

eatthecake ,

I'm curious about what percentage of programmers would give error free answers to these questions in seconds.

NotMyOldRedditName ,

Probably less than the same amount of developers whose code runs on the first try.

NotMyOldRedditName ,

And ya, it did provide some useful info, so it's not like it was all wrong.

I'm more just surprised that it was wrong in that way.

piecat ,

My favorite is when I ask for something and it gets stuck in a loop, pasting the same comment over and over

https://lemmy.world/pictrs/image/1f5d573a-1f35-4f39-9b10-339eef86aa86.png

foremanguy92_ ,

We have to wait a bit to have an useful assistant (but maybe something like copilot or more coded focused ai are better)

shotgun_crab ,

I always thought of it as a tool to write boilerplate faster, so no surprises for me

dependencyinjection ,

Sure does, but even when wrong it still gives a good start. Meaning in writing less syntax.

Particularly for boring stuff.

Example: My boss is a fan of useMemo in react, not bothered about the overhead, so I just write a comment for the repetitive stuff like sorting easier to write

// Sort members by last name ascending

And then pressing return a few times. Plus with integration in to Visual Studio Professional it will learn from your other files so if you have coding standards it’s great for that.

Is it perfect? No. Does it same time and allow us to actually solve complex problems? Yes.

Zos_Kia ,
@Zos_Kia@lemmynsfw.com avatar

Agreed and i have the exact same approach. It's like having a colleague next to you who's not very good but who's super patient and always willing to help. It's like having a rubber duck on Adderall who has read all the documentation that exists.

It seems people are in such a hurry to reject this technology that they fall into the age old trap of forming completely unrealistic expectations then being disappointed when they don't pan out.

dependencyinjection ,

Exactly. I suspect many of the people that complain about its inadequacies don’t really work in an industry that can leverage the potential of this tool.

You’re spot on about the documentation aspect. I can install a package and rely on the LLM to know the methods and such and if it doesn’t, then I can spend some time to read it.

Also, I suck at regex but writing a comment about what the regex will do will make the LLM do it for me. Then I’ll test it.

Zos_Kia ,
@Zos_Kia@lemmynsfw.com avatar

Honestly i started at a new job 2 weeks ago and i've been breezing through subjects (notably thanks to ChatGPT) at an alarming rate. I'm happy, the boss is happy, OpenAI get their 20 bucks a month. It's fascinating to read all the posts from people who claim it cannot generate any good code - sounds like a skill issue to me.

Subverb ,

ChatGPT and github copilot are great tools, but they're like a chainsaw: if you apply them incorrectly or become too casual and careless with them, they will kickback at you and fuck your day up.

cultsuperstar ,

Not a programmer by any means (haven't done any since college) but I've asked it for help in writing Jira queries or Excel mess and it's been pretty solid with that stuff.

exanime ,

You have no idea how many times I mentioned this observation from my own experience and people attacked me like I called their baby ugly

ChatGPT in its current form is good help, but nowhere ready to actually replace anyone

UnderpantsWeevil ,
@UnderpantsWeevil@lemmy.world avatar

A lot of firms are trying to outsource their dev work overseas to communities of non-English speakers, and then handing the result off to a tiny support team.

ChatGPT lets the cheap low skill workers churn out miles of spaghetti code in short order, creating the illusion of efficiency for people who don't know (or care) what they're buying.

exanime ,

Yeap.... Another brilliant short term strategy to catch a few eager fools that won't last mid term

postmateDumbass ,

The compiler is such a racist boomer it won't make my program.

reksas ,

I just use it to get ideas about how to do something or ask it to write short functions for stuff i wouldnt know that well. I tried using it to create graphical ui for script but that was constant struggle to keep it on track. It managed to create something that kind of worked but it was like trying to hold 2 magnets of opposing polarity together and I had to constantly reset the conversation after it got "corrupted".

Its useful tool if you dont rely on it, use it correctly and dont trust it too much.

boatsnhos931 ,

I couldn't have said it better

tea ,

This has been true for code you pull from posts on stackoverflow since forever. There are some good ideas, but they a. Aren't exactly what you are trying to solve and b. Some of the ideas are incomplete or just bad and it is up to you to sort the wheat from the chaff.

VirtualOdour ,

Yeah I've been trying to recreate the same gui tools with every version and it is getting much better but it still struggles. The python specific gpt actually manages to create what I ask for and can make changes once it's got the base established, I have to correct a few little glitches but nothing too terrible.

For functions like save all the info in text boxes to Json and fill that info back in when load is pressed it never fails at. Making little test scripts for functions or layouts it saves me huge amounts of mental effort.

It's like image gen, you have to know what to expect to get the most out of it, ask for something it finds difficult it's easy to confuse it but ask for things it's good at and it'll amaze you.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • technology@lemmy.world
  • random
  • incremental_games
  • meta
  • All magazines