Live data from Hacker News

Study finds that 52% of ChatGPT answers to programming questions are wrong

futurism.com

51–60 of 104 posts

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#51
I use ChatGPT for coding constantly and the 52% error rate seems about right to me. I manually approve every single line of code that ChatGPT generates for me. If I copy-paste 120 lines of code that ChatGPT has generated for me directly into my app, that is because I have gone over all 120 lines with a fine-toothed comb, and probably iterated 3-4 times already. I constantly ask ChatGPT to think about the same question, but this time with an additional caveat.

I find ChatGPT more useful from a software architecture point of view and from a trivial code point of view, and least useful at the mid-range stuff.

It can write you a great regex (make sure you double-check it) and it can explain a lot of high-level concepts in insightful ways, but it has no theory of mind -- so it never responds with "It doesn't make sense to ask me that question -- what are you really trying to achieve here?", which is the kind of thing an actually intelligent software engineer might say from time to time.

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#52
post #14

Earlier quoted context omitted.

How is this any different than the age old "googling stack overflow" method everyone's been using for years?

Stack Overflow is a community with an answer-rating system and there is often some level of review from other people commenting on the answer's advantages and shortcomings. You often have multiple answers to choose from too. Those features build trust in an answer or prompt you to look elsewhere. The UI for an LLM answer would have difficulty replicating the same thing since every answer is (probably) a new one and y…

LLMs have been trained on these answers, and can generate "it depends" too. Sometimes they're even too patronising and non-committal.

Chat interface has an advantage of having user-specific context and follow up questions, so it can filter and refine answers for the user.

With StackOverflow search it's up to the user to judge whether the answer they've found applies to their situation.

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#53
post #49

Earlier quoted context omitted.

If you’re learning to program pretty much the best approach is to write and debug programs. There isn’t a shortcut It’s like the saying “the fog of war” (at best you have incomplete and flawed information). Programming is just like that

> If you’re learning to program pretty much the best approach is to write and debug programs. I'd argue the best way to learn is to read a lot of production-quality code to get a sense of structure and best practices in any given language.

I’ve listened to 10,000 hours of piano music and I still can’t play anything

Debugging is the primary skill of a programmer. 90% of programming is fixing bugs, the other 10% is writing bugs.

Maybe the LLM is teaching debugging by giving bad examples :)

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#54
post #24

To those who constantly claim ChatGPT is "like an intern," just how low are the standards for interns?

I've heard anecdotal claims that most applicants (not just interns) can't even write fizz buzz, so...pretty low?

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#55
post #29

I scanned the paper and it doesn't mention what model they were using within chatgpt. If it was 3.5 turbo, then these results are already meaningless. GPT-4 and 4o are much more accurate. I just used GPT-4o to refactor 50 files from react classes to react function components and it did so almost perfectly everytime. Some of these classes were as long as 500 loc.

It says they used GPT-3.5.

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#56
From the paper:

> For each of the 517 SO [Stack Overflow] questions, the first two authors manually used the SO question’s title, body, and tags to form one question prompt1 and fed that to the free version of ChatGPT, which is based on GPT-3.5. We chose the free version of ChatGPT because it captures the majority of the target population of this work. Since the target population of this research is not only industry developers but also programmers of all levels, including students and freelancers around the world, the free version of ChatGPT has significantly more users than the paid version, which costs a monthly rate of 20 US dollars.

Note that GPT-4o is now also freely available, although with usage caps. Allegedly the limit is one fifth the turns of paid Plus users, who are said to be limited to 80 turns every three hours. Which would mean 16 free GPT-4o turns per 3 hours. Though there is some indication the limits are currently somewhat lower in practice and overall in flux.

In any case, GPT-4o answers should be far more competent than those by GPT-3.5, so the study is already somewhat outdated.

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#57
post #24

To those who constantly claim ChatGPT is "like an intern," just how low are the standards for interns?

I've heard anecdotal claims that most applicants (not just interns) can't even write fizz buzz, so...pretty low?

[flagged]

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#58
post #29

I scanned the paper and it doesn't mention what model they were using within chatgpt. If it was 3.5 turbo, then these results are already meaningless. GPT-4 and 4o are much more accurate. I just used GPT-4o to refactor 50 files from react classes to react function components and it did so almost perfectly everytime. Some of these classes were as long as 500 loc.

It says they used GPT-3.5.

Ya if it's GPT-3.5, I'm actually surprised the accuracies were so high!

I've been pairing with GPT since 3.5-turbo. I run 20-100 queries a day (have an IDE integration). The improvements for GPT-4 over 3.5 are significant.

So far GPT-4o seems like a step-up for most (not all) queries I've run through it. Based on the pricing and speed, my guess is it's a smaller, more optimized model and there are some tradeoffs in that. I'm guessing we'll see a more expensive flagship model from OpenAI this year.

But honestly, these details don't really matter... Regardless of the performance and accuracy of the models today, the trend is obvious. AI will be the primary interface for writing all but the most cutting edge code.

Two years ago, I thought an AI writing code was 50 years away. Yesterday, I took a picture of an invoice on my phone, and asked GPT to recreate it in HTML and it did so perfectly.

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#59
post #44
post #9

Earlier quoted context omitted.

> I expect it to get me in the ballpark faster than I would have on my own. This is great if you are an experienced developer who can tell the difference between "in the ballpark" and fixable and "in the ballpark" but hopeless.

> This is great if you are an experienced developer who can tell the difference between "in the ballpark" and fixable and "in the ballpark" but hopeless. While true, Stack Overflow wasn't much different. New devs would go there, grab a chunk of code and move on with their day. The canonical example being the PHP SQL injection advise shared there for more than a decade.

> While true, Stack Overflow wasn't much different.

StackOverflow has the advantage that, if an answer is wrong, other users can downvote it, and/or leave a comment explaining the mistake.

Re: Study finds that 52% of ChatGPT answers to programming questions are wrong

#60

Can someone email the author and explain what a LLM is? People asking for 'right' answers, don't really get it. I'm sorry if that sounds abrasive, but these people give LLMs a bad name due to their own ignorance/malice. I remember having some Amazon programmer trash LLMs for 'not being 100% accurate'. It was really an iD10t error. LLMs arent used for 100% accuracy. If you are doing that, you don't understand the tech…

The real problem is that it's not marketed that way. WE may understand that but most people, heck even in my experience a large percentage of tech people, don't. They think there is some kind of true intelligence (it's literally in the name) behind it. Just like I also understand that the top results on Google are not always the best.. but my parents don't.
Post reply on HN