90

To be more specific, I flagged a question recently as it was of the type "ChatGPT generated this but I need some more help fixing this". But I was told by a mod that asking a question about code is fine, which led to my confusion here.

Here is the post I am referring to. And here is the response -

asking a question about code produced by CGPT is fine. Not sure why you’d want to, but it is not banned. ChatGPT is not a programmer or a mathematician, it doesn’t use logic to construct code but is based on statistics. That rarely produces code that is actually fit for purpose.

I was under the impression that my flag should have been correct based on reading what-should-i-do-if-i-suspect-that-a-question-or-answer-is-written-by-chatgpt and are-questions-about-chatgpt-code-okay-to-ask


Don't the same reasons for which answers are banned, apply to questions as well?

  • It can be used to generate a ton of 'fake' questions on the platform
  • It could attract upvotes, due to the well-formatted and "confident" looking content
  • Bad questions created by will have to be handled the same way as any other question, but high volumes of such questions will waste precious moderator and community time.

Would love to hear from mods on the policy around this.

28
  • 27
    Yes. That's what banned means. No use of it to generate content is permitted
    – Zoe is on strike Mod
    Jan 1, 2023 at 13:41
  • 17
    @ZoestandswithUkraine, there is a subtle difference here. The question wasnt generated by ChatGPT but the code the OP was referring to (for his doubts) was generated by ChatGPT. Does the same thing apply here? Jan 1, 2023 at 13:43
  • 14
    Seems fine to me really, the origin of the code doesn’t really matter in most cases
    – user438383
    Jan 1, 2023 at 13:46
  • 14
    The mod had a valid response to the original question as well - the question isn't generated by the AI, only the code, about which the user has asked a question, in their own words. That's no different from asking a question about code found in documentation, or in a tutorial, or an answer on this site. It's attributed so we know the source. This does make a ton of sense, but I am still confused about whether asking a question about ChatGPT code is part of the ban. because as @ZoestandswithUkraine mentioned, no use of generated content is permitted in questions or in answers. Jan 1, 2023 at 13:49
  • 4
    I think my concern here is from the fact that HYPOTHETICALLY - I can create 20 different pieces of code from ChatGPT, run them, get an error and paste them as a question "in my own words" on SO for try to farm reputation. Isn't that a misuse of AI generated content on the platform? Jan 1, 2023 at 13:52
  • 11
    Again, "banned", "no use of it to generate content is permitted". It's a blanket ban with no exceptions for the time being. Seems the mod in question doesn't roll with that though. This answer also sides with it not being okay, and has community support. The initial announcement and FAQ entry does not make exceptions for partial CGPT content, because again, it's currently a blanket ban.
    – Zoe is on strike Mod
    Jan 1, 2023 at 13:53
  • 7
    A mod deciding to overrule the current consensus makes this complicated precisely because of the confusion and discussions it creates
    – Zoe is on strike Mod
    Jan 1, 2023 at 13:56
  • 4
    When the question asks about specifics about a piece of code, when it shouldn't matter if it came from a colleague, a school assignment, an OS lib, or chatGPT. It makes no sense to why it should be banned for those cases as well. If the whole question were written by chatGPT or the question itself is off-topic for other reasons, then it would be a different matter.
    – Tom
    Jan 1, 2023 at 13:56
  • 2
    While I agree to that @Tom, doesn't that make the assessment of these cases super complicated? Where does one go from a heavily chatgpt generated question to a question asked in "their own words" but referring to a chatgpt question? If I have 20 lines of chatgpt code, 2 lines around the problem "in my own words" and 5 lines of trace (hypothetically) .. is that different from a 1 line chatgpt code and 100 lines of my explanation of the error i am facing? From what I understood myself, it was supposed to be a blanket ban as mentioned before. Jan 1, 2023 at 13:59
  • 3
    FWIW, I don't think it matters here that the code came from ChatGPT. The reason being that one could cut out the ChatGPT code and it would still be the same question; the code is more of a naive attempt, not the actual focus of the question. That said, I also think that a "blanket ban" makes sense simply to avoid the work of assessing every single edge case, which is ultimately the reason for having the ban in the first place. Jan 1, 2023 at 14:05
  • 12
    That's precisely why it's a blanket ban. Dealing with every single nuance is an exercise in unnecessary work. There's a lot of variations, and every single one of them could cause a meta discussion and arguing if it wasn't a blanket ban. Banning every use of it to generate content is primarily meant to reduce work while we curb the tidal wave
    – Zoe is on strike Mod
    Jan 1, 2023 at 14:13
  • 17
    @Zoe: the point is that this isn't generating content for questions or answers. If the user had asked the same question about the same code found a tutorial or blog post it'd have been fine, the difference is academical at this point. There is no need for us to vet this, there is no need to have to distinguish the AI content from real questions, etc. This is very neatly compatimentalised and clear, at least to me.
    – Martijn Pieters Mod
    Jan 1, 2023 at 14:24
  • 4
    @AkshaySehgal: if you can write a coherent on-topic question then you deserve the rep, because that's the goal of this site. I doubt you will get much from it, though.
    – Martijn Pieters Mod
    Jan 1, 2023 at 14:34
  • 8
    @AkshaySehgal: the issue with AI generated posts is that they are easy to generate and so loads of users think that this is a ticket to quick rep. A good question about ChatGPT code is not easy to generate.
    – Martijn Pieters Mod
    Jan 1, 2023 at 14:36
  • 2
    ChatGPT does write code, definitely. Just not always very useful one. A bit like a beginner. There seems to be some way to go still. Jan 4, 2023 at 8:16

3 Answers 3

110

The point here is that the specific question was not written by ChatGPT.

There is a difference between having ChatGPT write the question for you, and asking a question (in your own words) about something that ChatGPT generated. The former is prohibited; the latter is fine, provided the question is otherwise on-topic, and you attribute the source of the code.

Asking a question about ChatGPT output is no different from asking questions about other code you found somewhere, be that documentation, a tutorial, or another Stack Overflow answer.

Note that there may be grounds to close such a question as off-topic, but not because ChatGPT was involved, but simply because of the way the question is worded. It could be too broad (asking us to explain the whole thing), a typo (ChatGPT didn't put in the required punctuation), etc. That's not a reason to flag for moderator attention; that's a reason to flag or vote to close.

21
  • 2
    Thanks for the answer @martijnpieters, could you also elaborate on how the latter (asking a question (in your own words) about something that ChatGPT generated) fits in with the blanket ban as well? Jan 1, 2023 at 14:23
  • 29
    @AkshaySehgal: the ban is clear: don't generate questions or answers or comments with AI. This isn't such a case.
    – Martijn Pieters Mod
    Jan 1, 2023 at 14:26
  • So hypothetically (mentioned this as a comment before), if someone generated 20 pieces of code, ran them, copied the error messages and wrapped the code + trace in a problem description and posted 20 questions, that is acceptable and not banned? just to clarify Jan 1, 2023 at 14:27
  • 1
    @AkshaySehgal: If the question is about why the code produces error messages, yes, that's fine. I think that trusting ChatGPT to the point that you are surprised to see errors is unwise, but I'm not here to judge why others seem to expect ChatGPT to know about logic, maths and other programming skills.
    – Martijn Pieters Mod
    Jan 1, 2023 at 14:30
  • 3
    Completely understand @martijnpieters and agree with that, but then based on your answer is it fine for me to understand that "Help me fix this ChatGPT generated Code" type questions are valid? And that the answer to this post is invalid? Jan 1, 2023 at 14:32
  • 4
    @AkshaySehgal FWIW, the question in question does ask "How do I do this?", as advised in the post you link to. It just uses ChatGPT code as a cheap way to generate an attempt, not as the sole point of the question. Jan 1, 2023 at 14:36
  • 16
    Stack Overflow licensing policy is that user contributions [are] licensed under CC BY-SA, but if someone posts ChatGPT generated code, can they actually agree to such a license?
    – dbc
    Jan 1, 2023 at 17:01
  • 25
    I appreciate the logic here, but I think there are more subtleties in allowing questions about chatGPT-generated code that are worth considering. I fear we will become the clean-up service for reams of chatGPT generated code that is close but still contains at least some complete nonsense. I remember one piece of python code that looked 100% correct except for a single import statement at the beginning that was utter garbage but still looked convincing. Do we want to answer those questions? We don't have reams of these yet so perhaps my concerns are premature. Jan 2, 2023 at 4:45
  • 7
    It is not OK to spam 20 questions at once (and probably runs into a ban anyway). It is not ok to copy code from anywhere as a cheap substitution for one's own attempt. It is not OK to post a chunk of code without having a clue and asking us to debug/fix it. All of these are reasons to downvote for lack of effort, and vote to close. But it doesn't matter whether the asker uses ChatGPT for this - it also happens without, and stating the source of the copied code is still better than not stating it at all. For now, current moderation tools suffice to cope with this, we don't need a complete ban.
    – Bergi
    Jan 2, 2023 at 6:04
  • 4
    Still expect such questions to be downvoted though. I wouldn't use the word "fine" myself but more the "it's... fine I guess?" variant. You can try, but don't go writing angry meta posts about it when you get automatically banned from asking questions because of it.
    – Gimby
    Jan 2, 2023 at 9:27
  • 6
    @PresidentJamesK.Polk there haven’t been many questions and even fewer that were on topic. The post that sparked this debate was closed as a duplicate, and the error made was not unlike something many newbies might have made. Had the term “ChatGPT” not been included in the post no-one would have noticed.
    – Martijn Pieters Mod
    Jan 2, 2023 at 9:29
  • 7
    @PresidentJamesK.Polk Plus, the post quality system will land you in post ban hell a lot quicker for bad questions than it does for bad answers.
    – Martijn Pieters Mod
    Jan 2, 2023 at 9:31
  • 7
    @MartijnPieters the ban is not clear, especially since the Note in the ban states "the ban applies to all content on Stack Overflow, except each user's profile content" So that would seem to apply to asking questions about ChatGPT generated code. The text of the note in the ban is overreaching and needs to be qualified to clarify this particular situation to explicitly say that it does not apply to human-generated questions about ChatGPT-generated code.
    – Wyck
    Mar 13, 2023 at 15:11
  • 4
    This position is in violation of the Temporary policy: Generative AI (e.g., ChatGPT) is banned, which states "All use of generative AI (e.g., ChatGPT1 and other LLMs) is banned when posting content on Stack Overflow." which means you cannot ask a question about ChatGPT/genAI code, either. Please adjust the response here or adjust the policy to reflect what is actually being enforced.
    – TylerH
    Nov 28, 2023 at 16:40
  • 1
    @MartijnPieters as others have pointed out, you’re simply mistaken. The ban indicates this answer is wrong, it’s straightforward. Dec 6, 2023 at 12:46
46

It seems highly unlikely to me that ChatGPT code could support a worthwhile question. A question using such code would presumably be either:

  • "Does this ChatGPT generated code do what it's intended to do?" We aren't a debugging service, and we certainly aren't a testing service.

  • "What does this ChatGPT generated code do?" - almost certainly needs more focus; and if properly focused, there would be no reason to leave behind enough code for it to still have any signature of AI generation.

  • "I tried using this ChatGPT generated code in my project, and it doesn't do what I want it to do; how do I fix it?" - almost certainly needs debugging details, even if the user has included example input, a stack trace, a description of expected output etc. The problem is that the code will not be a minimal reproducible example. Since we aren't a debugging service, the question needs to be about the specific part of the code that causes the problem; this entails that OP is responsible for determining which part that is.

  • "I have a problem with my code; to maintain NDA, I used ChatGPT to generate a MRE...." - really? And you verified by hand that the generated MRE is minimal, reproducible, and exemplifies the actual problem? Was that easier than actually just writing the code by hand, or copying and pasting the relevant lines and changing some variable names? Do you also use ChatGPT to create unit tests, and trust the result of those tests without human intervention?


That said, we care about the questions, not the code. The reason we care about banning ChatGPT content is because the ease of generating it means that relatively few users could easily overwhelm the capacity of moderators and curators (who are already overwhelmed by thousands of almost-all-worthless new questions per day). Having to write everything by hand except the actual code, certainly mitigates the problem.

7
  • 17
    The answer to "why doesn't this ChatGPT code do what I want?" is always the same: ChatGPT is a language model. It has no understanding of programming, computer science, or your goals. The code doesn't do what you want because ChatGPT is not an appropriate tool for generating code you couldn't have written yourself. Jan 2, 2023 at 15:27
  • 5
    @JamesWestman it has as much understanding of programming as it does English, which is a surprisingly good ability to generate a plausible stream of convincing BS - and the most convincing BS is BS that happens to be correct - but not always.
    – user253751
    Jan 2, 2023 at 20:22
  • 7
    @user253751 Right. If you ask a magic 8 ball a question and then come to Stack Overflow asking if that answer is correct, well, you should just ask us your original question. If it's on topic. Jan 2, 2023 at 22:45
  • 8
    As true as all of this may be, it fundamentally does not answer the question that was asked here, which is whether questions that contain code generated by ChatGPT should be flagged as using code generated by ChatGPT, under our current, blanket ban of all ChatGPT-generated content. Jan 3, 2023 at 8:28
  • I'm not convinced by the third and fourth point. The M in MRE very often does not get taken verbatim; it's very common to have bloated examples. Using ChatGPT to generate debugging questions would very well be doable with the current curation standards. It's convincing that moderators don't see this happening so it doesn't need special handling, but it's not convincing to me that that regular curation could handle such questions if people were to press our on-topic debugging capabilities. Jan 17, 2023 at 9:19
  • My point is that "current curation standards" are a) abysmal and b) due to their history of being applied the same way, the reason why I constantly am unable to find canonical duplicates that should be obvious. Jan 17, 2023 at 9:20
  • "it's not convincing to me that that regular curation could handle such questions if people were to press our on-topic debugging capabilities" - "our on-topic debugging capabilities" are approximately zero, and we know this; which is exactly why we should demand that questions not actually test those capabilities. As I've explained before: putting the appropriate work into a debugging question makes it effectively not a debugging question any more. Jan 17, 2023 at 9:22
-3

Two points I feel like I have to bring up here:

  • We are not a code-generating service
  • We are not a debugging service

There are exceptions to this, however.

ChatGPT, especially GPT-4, has evolved somewhat... over the course of the years it has been with us. With this said, its capabilities in coding is mostly limited to the two points mentioned above. Therefore, if you ask it to generate code a tad bit advanced, or debug a program, it will not yield sufficient results to be considered for SO. However, personally I feel like the code-generating feature is useful at times. As many say, ask a question in the form that you would, to your colleague who has to catch a bus in 5 minutes. Make it concise and easily readable. Therefore, the answer-posters should not have to spend a lot of time answering a question.

I believe that ChatGPT is useful in the aspect of generating examples. It does a good job in generating easily understandable code snippets, since it uses descriptive variable/function names, explained what parts of the code do in comments, and usually add an explanation of the code below or before. Of course, the code is still error-prone, so if used for Stack Overflow would need to be checked over and run to make sure they work.

1
  • 2
    This is not the place to argue in favor of ChatGPT. The policy is set already. LLM-generated text is not allowed on SO.
    – Cerbrus
    Jul 7, 2023 at 6:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .