Live data from Hacker News

A study on robustness and reliability of large language model code generation

arxiv.org

161–170 of 229 posts

Re: A study on robustness and reliability of large language model code generation

#161

Run the code it writes, if it gives an error, paste it into the chat and 90% of the time the LLM can fix the issue. People are missing the point here - it's not about writing code in one-shot. An LLM-enabled loop can generate the code and test and refine it until it works

If you're writing eg a bash script and it contains a difficult to spot bug which causes causes data loss (see [1] caused by a single space), what then?

[1] https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/issue...

Re: A study on robustness and reliability of large language model code generation

#162

I'm sympathetic to the viewpoint that GPT-4 is prone to mistakes when writing code. Unfortunately, the analysis in this paper is pretty bad and doesn't support that conclusion. The authors assume that for any given method under consideration, it must only occur within a particular pattern of other method calls and control flow instructions. But the templates they have chosen are clearly only applicable in certain sit…

I see humans do this all the time, especially abuse of exception handling, even among “Senior” developers. They don’t have a semantic understanding of what they are doing or why they are creating a race conditions or creating perverse control flow logic N layers down in the stack.

The fact that researchers get it wrong is, well, unsurprising. LLMs might actually be an improvement.

Re: A study on robustness and reliability of large language model code generation

#163

I feel like AI for programming has been so overhyped. I've attempted to use ChatGPT for programming so many times, and almost every time it's just wasted my time. Giving me outright lies or generating stuff that looks right but doesn't work. And just throwing out it's answer and starting from scratch is faster than fixing its output. I've only found it useful for explaining basic terminology or concepts for a topic I…

You have to put it in context: How good is the human alternative? I have interviewed hundreds of engineers across the entire skill spectrum. I think GPT4 right now is about on-par with a mid level developer. It makes a lot of mistakes, especially around counting, and usually can notice and fix them if they're pointed out. Humans do this all the time -- how often do you get a compiler error from something silly? It of…

> I think GPT4 right now is about on-par with a mid level developer.

At writing code, that might be a slight exaggeration. At explaining code it's at least at mid level, possibly better.

Re: A study on robustness and reliability of large language model code generation

#164

I'm sympathetic to the viewpoint that GPT-4 is prone to mistakes when writing code. Unfortunately, the analysis in this paper is pretty bad and doesn't support that conclusion. The authors assume that for any given method under consideration, it must only occur within a particular pattern of other method calls and control flow instructions. But the templates they have chosen are clearly only applicable in certain sit…

If you take the point of view that LLM's have been trained on all the code that humans write, then that sort of things is probably 'correct' to the model.

For coding it seems like there almost needs to be a weighting to certain 'correct and orthodox' handling of events if you're going to give over control of code generation to an LLM.

Re: A study on robustness and reliability of large language model code generation

#165

Is this worth reading? When authors cannot write a grammatically correct abstract I tune out. Try to make sense of this monster sentence: “The misuse of APIs in the generated code could lead to severe problem, such as resource leaks, program crashes, this http URL make things worse, the users of LLM code generation services are actually the developers that are most vulnerable to these code that seems right -- They ar…

Bear in mind that most researchers are not native English speakers.

I’m confused, do you think we’re not aware of that?

Re: A study on robustness and reliability of large language model code generation

#166

Earlier quoted context omitted.

Meh. I started coding professionally in the age of AI. My productivity is way higher than it should be. I don't let the AI "write" the code for me. I use it as a companion that I asked question of and suggestions. It suggests solutions to problems, I add the complexity. So far my code has been both clear and performant. This should not be the case at my level.

> I started coding professionally in the age of AI. What does this mean? Copilot was released in March of this year. ChatGPT 4, which the community considers to be the only version of ChatGPT to be competent enough at coding tasks, was also released in March. My guess is that you didn't mean that statement to be a fancy way of saying "I've been coding professionally for around 6 months", but I don't know what else yo…

Minor correction - the original version of GitHub Copilot was released in late-2021.

Re: A study on robustness and reliability of large language model code generation

#167

Earlier quoted context omitted.

Bear in mind that most researchers are not native English speakers.

I’m confused, do you think we’re not aware of that?

I try to restrict my comments to addressing the content of the parent comment, rather than what my assumptions about people are.

Re: A study on robustness and reliability of large language model code generation

#168

Earlier quoted context omitted.

I’m confused, do you think we’re not aware of that?

I try to restrict my comments to addressing the content of the parent comment, rather than what my assumptions about people are.

I don't see how it added any extra information to the parent comment

Re: A study on robustness and reliability of large language model code generation

#169

I'm sympathetic to the viewpoint that GPT-4 is prone to mistakes when writing code. Unfortunately, the analysis in this paper is pretty bad and doesn't support that conclusion. The authors assume that for any given method under consideration, it must only occur within a particular pattern of other method calls and control flow instructions. But the templates they have chosen are clearly only applicable in certain sit…

I see humans do this all the time, especially abuse of exception handling, even among “Senior” developers. They don’t have a semantic understanding of what they are doing or why they are creating a race conditions or creating perverse control flow logic N layers down in the stack. The fact that researchers get it wrong is, well, unsurprising. LLMs might actually be an improvement.

But this is because almost everyone gets taught this badly. When you ask how to do exception handling best practices etc, even from teachers/college profs etc you get wildly different answers from every single one of them. So people either learn themselves or from colleagues or, most likely, not at all.

Re: A study on robustness and reliability of large language model code generation

#170

Earlier quoted context omitted.

I try to restrict my comments to addressing the content of the parent comment, rather than what my assumptions about people are.

I don't see how it added any extra information to the parent comment

They asked whether this paper was worth reading, because the English wasn't conventional in their dialect.

I'm pointing out that that isn't a good way to screen papers, because most English speakers don't share the same dialect.

Perhaps unstated or understated is the implication that, were you to discard papers in this way, you're liable to miss out.

I'll leave it to you whether that added information. That wasn't really my goal in this case, my goal was to respond to the question in the manner I viewed appropriate. Feel free to downvote my comment if you don't feel it was appropriate or informative or otherwise didn't uphold whatever criteria you're judging it by.

Post reply on HN