Live data from Hacker News

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

arxiv.org

191–200 of 229 posts

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

#191

Earlier quoted context omitted.

I'm not going to rebut everything but I want to point out that I think Geoffrey Hinton is way more in your camp in regards to faith in the technology (which is what we're discussing). I'm in the camp that thinks LLMs are at best a viable competitor to furby -- I have zero existential fears and have very little confidence in them. I'm not opposed to AIs, I just think the state of the art is really really bad (sorry) a…

Your hypothesis is "our company will destroy the world" is a marketing move? Look. People in reality are basically never this gigabrained. Maybe consider as your first-line theory, that when people say "AI will destroy the world", that they mean to express that they believe that AI will destroy the world?

It's definitely a marketing strategy. "Our technology is so good it might destroy the world. So we're letting you use it for 19.99 a month." It's just a completely inconsistent position. Who benefits from the government saying only openAI and a few other companies can make this stuff? Would openAI rather talk about the (non-existent) existential threat of AGI or actual problems with their technology like data privacy issues and the amount of power their bullshit consumes?

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

#192

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…

I have been happy about 90% to 95% of the time with code that gets spat out by ChatGPT, though I don't fear for my job being taken by an LLM any time soon. It usually gives good insight in to unfamiliar code, or code in a language that I am familiar with but might have forgotten how to use. That said, I don't use it for every piece of code I write. Usually sections where I am exploring an idea. At times, I need to co…

you probably don’t fear your job loss because you’re still generating a bunch of shit your PMO is still confused by. That’s the game developers are going to be playing for a while I think.

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

#193

While I do see LLMs helping programmers a lot, I'm not super impressed by seeing it write what looks like a lot of boilerplate. If things become so common that it can be replicated by an LLM, it seems like we need to be abstracting it away.

The worst programmers I know are the busiest.

We’re already in this world. Seriously develop and app with Django and tell me how much actually “code” you write ?

I’ve been a developer for almost 2 decades and the coding part of the job is about 5% of my time :) The rest is stopping people from building stupid shit they don’t need to build and trying to make sense of “the business”

With generative AI, you can have all the stupid code you want in 1/1000th of the time :) :)

For me personally, we invented computers so we can spend time at the beach…ever seen the early Apple computer ads ? We shouldn’t be writing code constantly if we’re doing our jobs properly. We should be enjoying our lives which technology should be working and affording us the time to do so.

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

#194

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…

> But of course, this will cause execution to continue as though the I/O was successful, which might be exactly the wrong thing to do!

Almost always is the wrong thing to do when I encounter this antipattern. GPT-4 beats these researches in code quality is my takeaway here.

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

#195
post #174

Earlier quoted context omitted.

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.

Hi, do you have a recommended read for those of us who might inadvertently create race conditions?

For Java, Effective Java, 3rd Edition, chapter 11. For a more detailed treatment, Java Concurrency in Practice is the book to read.

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

#196

Earlier quoted context omitted.

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.

How many mid level developers do you know that understand the syntax and apis of every single programming language in existence?

I’ve used chatgpt recently to build an entire c++ game with sound, keyboard and mouse control, ai, etc, having never used c++ before. I’ve also never built a game before. I’ve worked with a lot mid level developers and I’ve never seen any that can write me a a c++ file giving me working code for a collision system in 30 seconds. Let me know if you find one though.

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

#197

Earlier quoted context omitted.

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 would peg gpt as between junior and mid. Mids (around 5-10 years of experience) tend to produce overly complex code for the problem at hand.

Dude, chatgpt as a junior or mid level programmer? Have you actually met junior or mid level programmers?

I’ve got 20 years of experience in the tech industry and chatgpt is far far better than any mid level engineer I’ve ever met and I include FAANG engineers too.

Chatgpt can answer any leetcode programming question in essentially every programming language in existence in less than 20 seconds.

Chatgpt can analyze classes for errors written in every language in seconds.

Chatgpt helped me write animation, ai, sound handling code in c++ and helped me build a full working game, the total code generation time for chatgpt “thinking” was on the order of one hour.

I don’t know any senior engineer who could help me (a c++ newbie) write a whole working game engine with all the necessary systems in less than one hour of “thinking time”.

I’m starting to think that all the “naysayers” of chatgpt simply used it once or twice, saw one error and dismissed the whole thing. Or they’re simply afraid for their own skills and avoid chatgpt as the alternative scares them too much.

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

#198

Earlier quoted context omitted.

I think you’re missing the point here. Language models scale. It doesn’t matter if a single pass doesn’t solve the problem, has syntax errors, etc. A single pass costs a fraction of a cent. You can just automate the process of code -> create variant -> fix from LLM -> apply deterministic tests until the code at least compiles -> pass it to the user; the fact you can’t do that with chatgpt is just because it’s not a c…

Sounds kind of silly, just run the thing till it gives the right answer ? How do you know each pass has not introduced a new problem ?

Yup.

…and if it works (and it does) then it really goes to show that you (and me, and people in general) have poor intuition about this stuff.

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

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

Not all reading is the same. If I tell an AI to write code that does X then checking if a provided code actually does X is a lot faster than writing it myself.

The way I use AI is to think at a high level how I want to implement something and then instead of writing the code tell the AI to write it by giving it specific instructions. Then proof-read it and fix the 1-2 things that it inevitably gets wrong.

I'm not reading some random code that I don't know what it's supposed to be doing. I'm reading the output of an instruction I gave that include some technical detail on how to implement it. Reading it and doing minor fixes is really fast.

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

#200

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.

What’s a “senior” developer these days? 3-4 years experience on average?
Post reply on HN