Live data from Hacker News

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

futurism.com

41–50 of 104 posts

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

#41
post #14
post #6

Earlier quoted context omitted.

That’s how you, an experienced programmer, use it. What does this do to beginners that are just learning to program? Is this helping them by forcing them to become critical reviewers or harming them by being a bad role model?

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 you have no input from other people about this answer too.

Edit: After writing my reply, I saw that roughly four other people (so far) made the exact same point and posted it a couple of minutes before. I think your question is a good one (made me think a little) and apologies it feels like you're being piled on.

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

#42
post #6

Earlier quoted context omitted.

That’s how you, an experienced programmer, use it. What does this do to beginners that are just learning to program? Is this helping them by forcing them to become critical reviewers or harming them by being a bad role model?

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

Agreed; but isn’t this on the same continuum as programming assembly -> IDE autocomplete -> LLM autocomplete? You’re still writing code, but generally adding abstractions has been net good (unsure of this opinion tbf, but that’s my hunch)

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

#43
post #2

This is looking at the wrong metric. I'm not expecting it to be 100% correct when I use it. I expect it to get me in the ballpark faster than I would have on my own. And then I can take it from there. Sometimes that means I have a follow on question & iterate from there. That's fine too.

This is how we've all adapted to use these tools, but it's not what was originally pitched.

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

#44
post #9
post #2

This is looking at the wrong metric. I'm not expecting it to be 100% correct when I use it. I expect it to get me in the ballpark faster than I would have on my own. And then I can take it from there. Sometimes that means I have a follow on question & iterate from there. That's fine too.

> 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.

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

#45
post #6
post #2

This is looking at the wrong metric. I'm not expecting it to be 100% correct when I use it. I expect it to get me in the ballpark faster than I would have on my own. And then I can take it from there. Sometimes that means I have a follow on question & iterate from there. That's fine too.

That’s how you, an experienced programmer, use it. What does this do to beginners that are just learning to program? Is this helping them by forcing them to become critical reviewers or harming them by being a bad role model?

I've been saying from the start that this is not a tool for beginners and learners. My students use it constantly and I keep telling them when they go to chat GPT for answers, it's like they are going to a senior for help -- they know a lot but they are often wrong in subtle and important ways.

That's why classes are taught by professors and not undergrads. Professors are at least supposed to know what they don't know.

When students think of ChatGPT as their drunk frat bro they see doing keg stands at the Friday basement party rather than as an expert they use it differently.

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

#46

Similar to how programmers work, the AI needs feedback from the runtime in order to iterate towards a workable program. My expectation isn’t that the AI generate correct code. The AI will be useful as an ‘agent in the loop’: - Spec or test suite written as bullets - Define tests and/or types - Human intevenes with edits to keep it in the right direction - LLM generates code, runs complier/tests - Output is part of ne…

This workflow is very close to being possible. I gave it a try last year by adding exceptions and test output to clipboard automatically (requires custom code for your stack). The context has increased considerably since my last attempt and agents are now a thing (ReAct loop, etc).

This should be feasible this holiday season.

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

#47
iirc, I saw some other study (or an experiment some random guy had ran) where original GPT4 had vastly outperformed its later incarnations for code generation.

current openai products either use much lower parameter models under the hood than they did originally, or maybe it's a side-effect of context stretching.

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

#48
post #6
post #2

This is looking at the wrong metric. I'm not expecting it to be 100% correct when I use it. I expect it to get me in the ballpark faster than I would have on my own. And then I can take it from there. Sometimes that means I have a follow on question & iterate from there. That's fine too.

That’s how you, an experienced programmer, use it. What does this do to beginners that are just learning to program? Is this helping them by forcing them to become critical reviewers or harming them by being a bad role model?

Beginners tend to write awful code without GPT's help, so I don't think it makes things worse.

Answers don't exist in a vacuum. The chat interface allows feedback and corrections. Users can paste an error they're getting, or even say "it doesn't work", and GPT may correct itself or suggest an alternative.

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

#49
post #6

Earlier quoted context omitted.

That’s how you, an experienced programmer, use it. What does this do to beginners that are just learning to program? Is this helping them by forcing them to become critical reviewers or harming them by being a bad role model?

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.

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

#50
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.

I'd guess that React code is a lot easier for a LLM, since it's a frequent occurrence in its training dataset and frontend code tends to be repetitive and full of boilerplate.

I believe that AI will be a perfect programmer in the future for all niche areas. My point is that frontend will probably be the first niche to be mastered.

Post reply on HN