Live data from Hacker News

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

arxiv.org

141–150 of 229 posts

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

#141
I think we're seeing a re-iteration of the last generation's "greybeards vs young hipsters" wars. Last time it was "those hipsters are just copy pasting stuff they find on Google and call it a day". This time the young hipsters turned greybeards undercutting the good parts of gpt or copilot.

That said, I'm really underwhelmed by the output of both those tools in the context of the ongoing hype. They're far away from taking anyone's job. They're producing misleading and even manipulative output in such fine-granular deceiving manners, it's like reading a whole contract in fine-print. Given that our job is already mostly reading and understanding vast amounts of code, I don't really see a productivity boost in reading generated erroneous code. And if it boosts productivity because of boilerplate, we already have plenty of old tools to deal with that. Heck, every CRUD Framework from mid-2000s is better at generating boilerplate code, with 100% correctness.

So there's no "big disruptive innovation" going on but new nice-to-have tools. Just know, when not to use it.

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

#142

I think we're seeing a re-iteration of the last generation's "greybeards vs young hipsters" wars. Last time it was "those hipsters are just copy pasting stuff they find on Google and call it a day". This time the young hipsters turned greybeards undercutting the good parts of gpt or copilot. That said, I'm really underwhelmed by the output of both those tools in the context of the ongoing hype. They're far away from…

[deleted]

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

#144

I mean the landing page of GitHub Copilot just shoves text unencoded into a urlencoded body, this is nothing new... const response = await fetch(`http://text-processing.com/api/sentiment/`, { method: "POST", body: `text=${text}`, headers: { "Content-Type": "application/x-www-form-urlencoded", }, });

I find it kind of crazy that they haven’t fixed given how prominently it was called out. The Go example is wrong too. It doesn’t check the database call for a final error.

I think to avoid false advertising claims they are using actual outputs. And if the listed examples are doing their job (getting people to sign up) they won’t change them.

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

#145
post #128

Earlier quoted context omitted.

Evidently, THEY are calling the following API misuses: "To evaluate the API usage correctness in code, RO- BUSTAPI detects the API misuses against the API usage rules by extracting call consequences and control structures from the code snippet, as shown in Figure 2. The code checker firstly check the code snippets to see whether it is a snippet of a method or a method of a class, so that it can enclose this code snip…

"compare the call sequence against the API usage rules" The validity of this entire paper would seem to depend on how robust and agreed upon these "API usage rules" are.

Everything depends on something else. That's life.

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

#146
post #89

Earlier quoted context omitted.

Someone posted a transcript of having chatgpt write them a bash script with the comment "see how much easier this was than figuring it out" and it took like a dozen tries of pasting error messages back in. I was infuriated just reading it. I cannot imagine trying to develop this way. But if people like it, whatever blows your hair back. Allegedly the benefit is it will do the boring stuff like write the error handlin…

> I cannot imagine trying to develop this way. But if people like it, whatever blows your hair back. I agree; who am I to comment on how you write the code, as long as it gets written, right? That said, I've already had a "this is really odd code you committed last week, what's up with that?" and the reply was "oh, dunno, that's just what ChatGPT gave me". Meh. Actually writing things yourself does increase your unde…

Anyone committing code they don’t understand should be put on a PIP.

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

#147
Given that chat gpt is trained on the internet. Places like Reddit.

Think to how many times you have seen code written with the caveat 'this is a general gist. I haven't tested this code'

I've seen it many times. More than anything else really. So it should come as no surprise that models trained on that data produce similarly wonky code.

This is then compounded by the fact that the user thinks of the model as they would a person. They receive a humanesqe response. So attribute the expected human backend. The understanding of the request and the feedback.

All current "AI" LLMs are just Chinese rooms.

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

#148
post #44
post #8

Ok but what are we calling API misuses? We collect 1208 coding questions from StackOverflow on 24 representative Java APIs. We summarize thecommon misuse patterns of these APIs and evaluate them oncurrent popular LLMs. The evaluation results show that evenfor GPT-4, 62% of the generated code contains API misuses,which would cause unexpected consequences if the code isintroduced into real-world software. Should have u…

I just don’t see how it could save time. Programmers nearly universally agree that reading code is harder than writing it. So when you have chat GPT writing your code, you have to read and understand it to ensure it’s actually doing what you need it to without awkward bugs or problems. Given that it’s harder to read than write code, it seems to stand to reason that the “time savings” must be nil.

It depends on your baseline. If you're comparing it with "I know how to do this already but don't want to type" I think ChatGPT is slower. If you're comparing it to "I can't remember how to use this API so I'm going to read a bunch of Stack Overflow posts" than ChatGPT is seriously faster.

One of the reasons is that you can iterate to refine and expand your answer. Here's a transcript of a recent chat, where I was too lazy to write a script:

Me> I have a CSV file with a header row, whose first column is a date formatted like this: "March 16, 2022 1:51:19 PM". Could you write a script to convert the dates in this CSV to ISO date format? I am using a mac would would prefer to not install any software, but other than that you can choose any language you'd like

ChatGPT>Sure! Since macOS comes with Python pre-installed, you can use a Python script to read the CSV file and convert the dates to the ISO date format.

Me> the first row is a header row, could you please modify the script to handle that?

ChatGPT> Certainly! We'll modify the script to handle the header row separately, ensuring that it is copied to the output file without modification.

Me> can you make it so the input file is a commandline argument?

ChatGPT> Certainly! We can modify the script to accept the input file path as a command-line argument. Here's the updated code

You get the idea.

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

#149

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…

The community is wrong, ChatGPT 3.5 is fine.

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

#150
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 are always novice developers that are not familiar with the APIs that LLMs generate code for them.”

Post reply on HN