Aknowledging the use of AI in pull requests, and general AI policy

With the rise of LLM-assisted programming, more and more content merged into the XWiki codebases has been generated by LLMs.

I believe that LLM usage should be disclosed in all pull requests going forward. Many projects adopted various policies regarding their usage ; a complete policy would be a different topic but I believe banning LLM programming entirely would be a bad move.

Instead, simply disclosing the usage of AI-assisted programming in pull requests, along with the exact methodology, would be a good compromise. An example could be stating the code was mostly LLM-generated, but it was then reviewed and improved by a human.

This requires little to no effort, and gives a better picture of AI usage inside XWiki codebases.

What do you think?

This has already been discussed, see AI attributions in commits?

That’s just too much. I’d be -1 for that (exact methodology, etc). I find it wasted time with little or no value. I prefer that people spend that time to write a better commit/PR or do more reviews. What’s important is that they are responsible for what they write. For me attribution is enough.

Also, almost all decisions a dev takes have also been discussed on the forum, on design.xwiki.org, on the #xwiki chat, with some colleagues, by reading a book written by someone, etc. So, with the same argument, they should disclose that information… It makes sense in some cases but not always.

Last, I believe 100% of what we write is already (or is soon going to) be partly helped by a LLM so I’m pretty sure we’ll have the AI attribution on every single commit very soon. And if not, then it means you’ve probably missed an opportunity to have your work reviewed by a LLM before pushing it and you’ve not done all you can to make sure that your commit is a good as it could be before asking a human to review it…

Thx

I heavily disagree on that part. IMO, using LLMs should not be an obligation. AI creates some serious concerns, including but not limited to its huge ecological impact. Requiring code to be reviewed by an LLM consumes quite a lot of tokens, and even if it can find some issues, it consumes a lot of resources while doing so.

I agree with you that contributors to the open source project contribute the way they want (using LLMs or not), and that doesn’t concern the project. What concerns the project is for devs to produce the best possible code and do the maximum verification before posting a PR or a commit.

Whether to use LLMs or not cannot be mandatory in an open source project IMO. As an individual you need to see the LLM policy of your company (if you’re contributing during your work hours).

(offtopic)
Regarding resource consumption by a LLM, that’s definitely true. But there lots of things consuming resources in an open source project, and a human consumes a lot more resources than a LLM (your travels, where you live, your food, etc) so it’s like saying that the project should not have a lot of devs because they use resources. And same for a lot of aspects (server consumption, etc).
(/offtopic)

Thx