7 ms·
This is a bit off topic to the actual article, but I see a lot of top ranking comments complaining that ChatGPT has become lazy at coding. I wanted to make two
by anotherpaulg 3y ago
This is a bit off topic to the actual article, but I see a lot of top ranking comments complaining that ChatGPT has become lazy at coding. I wanted to make two observations:
1. Yes, GPT-4 Turbo is quantitatively getting lazier at coding. I benchmarked the last 2 updates to GPT-4 Turbo, and it got lazier each time.
2. For coding, asking GPT-4 Turbo to emit code changes as unified diffs causes a 3X reduction in lazy coding.
Here are some articles that discuss these topics in much more detail.
https://aider.chat/docs/unified-diffs.html https://aider.chat/docs/unified-diffs.html
https://aider.chat/docs/benchmarks-0125.html https://aider.chat/docs/benchmarks-0125.html
- ed_balls 3y agoVoice Chat in ChatGPT4 was speaking perfect Polish. Now it sounds like a foreigner that is learning.
- omalled 3y agoCan you say in one or two sentences what you mean by “lazy at coding” in this context?
- Me1000 3y agoIt has a tendency to do: "// ... the rest of your code goes here" in it's responses, rather than writing it all out.
- asaddhamani 3y agoIt's incredibly lazy. I've tried to coax it into returning the full code and it will claim to follow the instructions while regurgitating the same output you complained about. GPT-4 was great, GPT-4 Turbo first version was pretty terrible bordering on unusable, then they came out with the Turbo second version, which almost feels worse to me, though I haven't compared, but if someone comes claiming they fixed an issue, but you still see it, it will bias you to see it more. Claude is doing much better in this area, local/open LLMs are getting quite good, it feels like OpenAI is not heading in a good direction here, and I hope they course correct.
- mistermann 3y agoI have a feeling full powered LLM's are reserved for the more equal animals. I hope some people remember and document details of this era, future generations may be so impressed with future reality that they may not even think to question it's fidelity, if that concept even exists in the future.
- akdor1154 3y ago> I hope some people remember and document details of this era, future generations may be so impressed with future reality that they may not even think to question it's fidelity, if that concept even exists in the future. The former sounds like a great training set to enable the latter. :(
- bbor 3y ago…could you clarify? Is this about “LLMs can be biased, thus making fake news a bigger problem”?
- mistermann 3y agoI confidently predict that we sheep will not have access to the same power our shepherds will have.
- _puk 3y agoImagine if the first version of ChatGPT we all saw was fully sanitised.. We know it knows how to make gunpowder (for example), but only because it would initially tell us. Now it won't without a lot of trickery. Would we even be pushing to try and trick it into doing so if we didn't know it actually could?
- ForHackernews 3y ago> Would we even be pushing to try and trick it into doing so if we didn't know it actually could? Would somebody try to push a technical system to do things it wasn't necessarily designed to be capable of? Uh... yes. You're asking this question on _Hacker_ News?
- bbor 3y agoIt’s so interesting to see this discussion. I think this is a matter of “more experienced coders like and expect and reward that kind of output, while less experienced ones want very explicit responses”. So there’s this huge LLM Laziness epidemic that half the users cant even see
- doctorpangloss 3y agoI'm paying for ChatGPT GPT4 to complete extremely tedious, repetitive coding tasks. The newly occurring laziness directly, negatively impacts my day to day use where I'm now willing to try alternatives. I still think I get value - indeed I'd probably pay $1,000/mo instead of $20/mo - but I'm only going to pay for one service.
- moffkalast 3y agoI mean, isn't that better as long as it actually writes the part that was asked? Who wants to wait for it to sluggishly generate the entire script for the 5th time and then copy the entire thing yet again.
- anotherpaulg 3y agoShort answer: Rather than fully writing code, GPT-4 Turbo often inserts comments like "... finish implementing function here ...". I made a benchmark based on asking it to refactor code that provokes and quantifies that behavior. Longer answer: I found that I could provoke lazy coding by giving GPT-4 Turbo refactoring tasks, where I ask it to refactor a large method out of a large class. I analyzed 9 popular open source python repos and found 89 such methods that were conceptually easy to refactor, and built them into a benchmark [0]. GPT succeeds on this task if it can remove the method from its original class and add it to the top level of the file with appropriate changes to the size of the abstract syntax tree. By checking that the size of the AST hasn't changed much, we can infer that GPT didn't replace a bunch of code with a comment like "... insert original method here...". The benchmark also gathers other laziness metrics like counting the number of new comments that contain "...". These metrics correlate well with the AST size tests. [0] https://github.com/paul-gauthier/refactor-benchmark https://github.com/paul-gauthier/refactor-benchmark
- TaylorAlexander 3y agoI have a bunch of code I need to refactor, and also write tests for. (I guess I should make the tests before the refactor). How do you do a refactor with GPT-4? Do you just dump the file in to the chat window? I also pay for github copilot, but not GPT-4. Can I use copilot for this? Any advice appreciated!
- rkuykendall-com 3y ago> Do you just dump the file in to the chat window? Yes, along with what you want it to do. > I also pay for github copilot, but not GPT-4. Can I use copilot for this? Not that I know of. CoPilot is good at generating new code but can't change existing code.
- redblacktree 3y agoCopilot will change existing code. (though I find it's often not very good at it) I frequently highlight a section of code that has an issue, press ctrl-i and type something like "/fix SomeError: You did it wrong"
- stainablesteel 3y agoit was really good at some point last fall, solving problems that it had previously completely failed at, albeit after a lot of iterations via autogpt. at least for the tests i was giving it which usually involved heavy stats and complicated algorithms, i was surprised it passed. despite it passing the code was slower than what i had personally solved the problem with, but i was completely impressed because i asked hard problems. nowadays the autogpt gives up sooner, seems less competent, and doesnt even come close to solving the same problems
- anon115 3y agothis is exactly what I noticed too
- thelittleone 3y agoHamstringing high value tasks (complete code) to give forthcoming premium offerings greater differentiation could be a strategy. But in counter to this, doing so would open the door for competitors.
- wolpoli 3y agoThe question I have been wondering is if they are hamstringing high value tasks to creating room for premium offerings or are they trying to minimize cost per task.
- djmips 3y agoI think it's the latter. Reading between the lines on costs gives me the impression they have strived to lower computational costs. They already added a cap of 30 queries per 3 hours...
- th0ma5 3y agoHow is laziness programmatically defined or used as a benchmark
- makestuff 3y agoPersonally I have seen it saying stuff like: public someComplexLogic() { // Complex logic goes here } or another example when the code is long (ex: asking it to create a vue component) is that it will just add a comment saying the rest of the code goes here. So you could test for it by asking it to create long/complex code and then running the output against unit tests that you created.
- rvnx 3y agoYeah this is a typical issue: - Can you do XXX (something complex) ? - Yes of course, to do XXX, you need to implement XXX, and then you are good, here is how you can do: int main(int argc, char **argv) { /* add your implementation here */ }
- drcode 3y agothanks for these posts, I implemented a version of the idea a whole ago and am getting good results
- klohto 3y agoFYI, also make sure you’re using the Classic version not the augmented one. The classic has no (at least completely altering) prompt as the default one. EDIT: This of course applies only if you’re using the UI. Using the API is the same.
- vl 3y agoAre you using API or UI? If UI, how do you know which model is used?
- nprateem 3y ago> This is a bit off topic to the actual article It wouldn't be the top comment if it wasn't
- fillipvt 3y agoyou'd have to write every comment expecting it to become the top comment
- emporas 3y agoLazy coding is a feature not a bug. My guess is that it breaks aider automation, but by analyzing the AST that wouldn't be a problem. My experience with lazy coding, is it omits the irrelevant code, and focuses on the relevant part. That's good! As a side note, i wrote a very simple small program to analyze Rust syntax, and single out functions and methods using the syn crate [1]. My purpose was exactly to make it ignore lazy-coded functions. [1]https://github.com/pramatias/replacefn/tree/master/src https://github.com/pramatias/replacefn/tree/master/src
- anotherpaulg 3y agoIt sounds like you've been extremely lucky and only had GPT "omit the irrelevant code". That has not been my experience working intensively on this problem and evaluating numerous solutions through quantitative benchmarking. For example, GPT will do things like write a class with all the methods as simply stubs with comments describing their function. Your link appears to be ~100 lines of code that use rust's syntax parser to search rust source code for a function with a given name and count the number of AST tokens it contains. Your intuitions are correct, there are lots of ways that an AST can be useful for an AI coding tool. Aider makes extensive use of tree-sitter, in order to parse the ASTs of a ~dozen different languages [0]. But an AST parser seems unlikely to solve the problem of GPT being lazy and not writing the code you need. [0] https://aider.chat/docs/repomap.html https://aider.chat/docs/repomap.html
- emporas 3y ago>For example, GPT will do things like write a class with all the methods as simply stubs with comments describing their function. The tool needs a way to guide it to be more effective. It is not exactly trivial to get good results. I have been using GPT for 3.5 years and the problem you describe never happens to me. I could share with you just from last week, 500 to 1000 prompts i used to generate code, but the prompts i used to write the replacefn, can be found here [1]. Maybe there are some tips that could help. [1] https://chat.openai.com/share/e0d2ab50-6a6b-4ee9-963a-066e18139aa4 https://chat.openai.com/share/e0d2ab50-6a6b-4ee9-963a-066e18...
- CGamesPlay 3y agoI have not noticed any reduction in laziness with later generations, although I don't use ChatGPT in the same way that Aider does. I've had a lot of luck with using a chain-of-thought-style system prompt to get it to produce results. Here are a few cherry-picked conversations where I feel like it does a good job (including the system prompt). A common theme in the system prompts is that I say that this is an "expert-to-expert" conversation, which I found tends to make it include less generic explanatory content and be more willing to dive into the details. - System prompt 1: https://sharegpt.com/c/osmngsQ https://sharegpt.com/c/osmngsQ - System prompt 2: https://sharegpt.com/c/9jAIqHM https://sharegpt.com/c/9jAIqHM - System prompt 3: https://sharegpt.com/c/cTIqAil https://sharegpt.com/c/cTIqAil Note: I had to nudge ChatGPT on this one. All of this is anecdotal, but perhaps this style of prompting would be useful to benchmark.