Repository navigation
Replies: 5 comments
|
Same concern was raised in stb#1919 recently. One thing worth noting beyond the plagiarism/quality angle: LLM-generated code introduces a category of bugs that standard review processes completely miss — hallucinated dependencies (imports referencing nonexistent packages), deprecated API usage masked by version pinning, and cross-file context breaks from multi-session generation. These are not hypothetical. They compile, they pass tests, they pass code review — and they break in production. Traditional tools like SonarQube and ESLint do not catch them because the failure mode is structurally different from hand-written code bugs. Whether projects decide to ban LLM contributions or not, having a verification layer that catches these AI-native defects seems increasingly necessary. |
|
I'm fairly neutral on AI for code generation. There are definitely things I think should be banned and I'm largely on the same page, but I do not agree with a full 100% ban on literally everything AI because there are trivial things where it just doesn't matter, examples being things like fixing typos or simple range bounds checks or null pointer guards. These are such trivial changes that they'd be indistinguishable from a human and would be unproductive in banning when the human-written equivalent would be the same anyway. In practice, AI-generated code contributions have largely been a non-issue across my projects (though this one popped up earlier today which made me angry and reminded me to get back to you: mackron/fs#12). The bigger issue is actually those AI slop "security" bug reports. The excessive verbiage drives me crazy, but at the same time they do often report actual bugs which I would like to fix. I'm not entirely sure where the balance lies there. But it's now getting to point that it might be worth putting my foot down, especially since the motivation for a lot of those reports is just to be given credit for finding the issue so they can put it on their resume. Just looking at my PRs, it looks like I've merged only 7 PRs in the last year, all of which are trivial. One of them I suspect was AI, but it was properly reviewed, including a manual change by me, and I have absolutely no concerns with it (for reference if you care: #292). I don't think AI contributions are an immediate urgent concern for this project, but I think it's reasonable to put a statement somewhere to formalize some rules and clarify my own policy. Blatant AI slop should definitely be banned, but not trivial things like fixes for typos. Will leave this ticket open while I consider it. |
The problem is, apparently every single snippet no matter how small can possibly be plagiarized: Chan-jo.Jun.Co-Pilot.Copyright.Infringement.webmDo you want to take a legal guess everytime if it's small enough? What if you get it wrong? (I'm not a lawyer, these are just questions that made me stay out of LLMs. This isn't legal advice.) Also see how plagiarism is apparently correlating with model performance: https://www.sciencedirect.com/science/article/pii/S2949719123000213#b7
The issue with having no policy is, many coders consider LLMs normal and won't mention it. So there's seemingly no neutral stance, since a lack of a ban seems to be often interpreted as encouragement. Sorry to be annoying, I just wanted to point it out. |
|
If somebody submits a change that replaces the misuse of "it's" with "its" (a common mistake I make) and that is rejected because they used AI to find and fix the typos, then I'm sorry, but that is just so absolutely ridiculous. Same with code snippets like this: if (pObject == NULL) {
return;
}I have absolutely no concern whatsoever about any legal complications with these kinds of changes. These kinds of things are so trivial and are identical to what many humans would do that I refuse to believe any just legal system would have any issue here. To be entirely honest, and I don't mean this to sound offensive, but I think this is just anti-AI ideology getting in the way of common sense. To be clear, I actually support the idea of banning non-trivial AI contributions, and I admit it can be hard to quantify exactly what makes something "trivial", but I believe a little bit of common sense can go a long way. It's not even a bad idea to ask people to disclose whether or not they used AI, but I will not be putting down a blanket ban. I will sit on this and consider. If people have any feedback or comments I'd welcome some honest debate! |
|
At the risk of repeating myself, for clarity: I'm not disagreeing there could be a snippet size small enough to be safe. I'm merely suggesting perhaps you don't want to be forced to judge that, with often unclear extent of AI involvement. Silght tangent: And there are ethical and accessibility reasons, e.g. tying your workflow to big tech and an expensive service, skill erosion, etc., that support disallowing LLM code contributions entirely. (Note nothing I'm suggesting rules out passive analysis using natural language, but at some point I think it's fair to ask if those few remaining LLM uses are worth bothering with, given the many issues of the ecosystem.) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm concerned about generative AI LLM code in dr_libs, including AI auto completion use in editors, and I'm wondering whether the project should adopt a policy to ban it. Please note this doesn't involve "passive" uses of generative AI where no output of the AI is committed into the code base and potentially "tainting" the code base, e.g. having the AI comment on potential issues with a commit using natural language.
(I'm not suggesting you use AI LLM code reviews, I'm just saying they aren't what concerns me the most.)
Here is why I'm concerned about LLM code or LLM documentation inclusion into the project repository:
Even the most latest studies point to serious doubts regarding longer term productivity gains and significant code base degradation: https://www.coderabbit.ai/blog/state-of-ai-vs-human-code-generation-report
https://dl.acm.org/doi/10.1145/3543507.3583199 As far as I can tell this field study suggests that even when not baited to plagiarize, there is a regular level of plagiarism in LLM output of at least 2-5%.
https://lcamtuf.substack.com/p/large-language-models-and-plagiarism This case study appears to show how even punctuation and other very basic elements can apparently end up plagiarized, even if the model wasn't prompted and baited into completing a known text. (This one was shown using an older model, most of the other sources concern more recent models.)
https://www.pcgamer.com/software/ai/microsoft-uses-plagiarized-ai-slop-flowchart-to-explain-how-github-works-removes-it-after-original-creator-calls-it-out-careless-blatantly-amateuristic-and-lacking-any-ambition-to-put-it-gently/ This seems to be a high-profile example, run into by Microsoft no less, of somebody using gen AI to create something from scratch without intention to plagiarize, where the end result was an apparently significantly plagiarized copy based on a single creator.
https://openreview.net/forum?id=TatRHT_1cK This scientific paper seems to suggest that not only is "memorization", that is reproduction of the training material, inherent but it also grows with model size and therefore might be an escalating problem: "On the whole, we find that memorization in LLMs is more prevalent than previously believed and will likely get worse as models continues to scale, at least without active mitigations."
https://www.theatlantic.com/technology/2026/01/ai-memorization-research/685552/ This article and examination seems to suggest that even with the latest models, the mitigations to prevent them from directly plagiarizing larger sources are insufficient.
https://www.sciencedirect.com/science/article/pii/S2949719123000213#b7 This study seems to suggest that not only is the memorization and plagiarism inherent, but that it is required to make a high-performing model: "In this work we explored the relationship between discourse quality and memorization for LLMs. We found that the models that consistently output the highest-quality text are also the ones that have the highest memorization rate." I think this raises direct questions for the often-praised Claude Code, and whether it plagiarizes even more than previous models.
https://www.twobirds.com/en/insights/2025/landmark-ruling-of-the-munich-regional-court-(gema-v-openai)-on-copyright-and-ai-training This court ruling seems to suggest that there may not be clarity yet on whether AIs will be regarded as transformative enough that the assumption that it'll not be regarded as derivative of training data seems potentially untested. Please note I'm not a lawyer so assume I'm wrong.
Nothing in this post is legal advice, read the sources for yourself. But hopefully, the points above will explain why I'm concerned. If you want even more sources, go here for more studies.
As a result, I suggest a ban on any LLM code or LLM documentation contributions to keep the code base clean. And I'm sorry to bother you with this at all, but the current reality seems to be unless there's a ban, people will just assume it's allowed and not always declare it, especially with AI code completion.
All reactions