Live data from Hacker News

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

futurism.com

61–70 of 104 posts

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

#61
post #49

Earlier quoted context omitted.

> 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 :)

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

I don't think this is a valid comparison. If you'd read 10,000 hours of sheet music I'd wager you'd know how to read music.

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

#62
post #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.

I agree, but would say it different:

> AI will be a perfect programmer in the future for all NON-niche areas

There's going to be a positive/negative feedback loop that makes it hard for new languages and frameworks to gain popularity. And the lack of popularity means lack of training material being generated for the AI to learn.

When choosing a tech stack of the future, the ability for AI to pair will be a key consideration.

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

#63
post #52

Earlier quoted context omitted.

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.

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

But it will continue to outright lie to you in those follow-ups.

https://chatgpt.com/share/767d2810-b38f-46e2-8cde-09248bb636...

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

#64
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?

[deleted]

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

#66

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 requires:

- function calling: the LLM can take action

- Integration to your runtime: functions called by the LLM can run your tests, linters, compiler, etc

- Agents: the LLM can define what to do, execute a few tasks, and keep going with more tasks generated by itself

- Codebase/filesystem access: could be RAG or just ability to read files in your project

- Graceful integration of the human in the agent loop: this is just an iteration of the agent but it seems useful for it to ask inputs from the programmer. Maybe even something more sophisticated where the agent waits for the programmer to change stuff in the codebase

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

#67
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?

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

Harming them.

I told a new grad employee to write some unit tests for his code, explained the high level concepts and what I was looking for, and pointed him at some resources. He spun his wheels for weeks, and it turned out he was trying to get ChatGPT to teach him how to do it, but it would always give him wrong answers.

I eventually had to tell him, point blank, to stop using ChatGPT, read the articles, and ask me (or a teammate) if he needed help.

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

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

[deleted]
Post reply on HN