Repository navigation
Conversation
This is the "moderate" policy from https://learn.scientific-python.org/development/guides/ai/#ai-policy-md, as suggested on pypagh-2183
webknjaz
left a comment
There was a problem hiding this comment.
Since I participated in a few discussions in the past I figured I'd leave this here.
These are the pip-tools conversations:
I was hoping to write those in a way that it could be copied w/ minimal modifications across projects and the same is being adopted over @ @aio-libs: https://github.com/orgs/aio-libs/discussions/44. Some of the points have made it into the Ansible AI policy discussion @ https://forum.ansible.com/t/ansible-ai-policy/42642. And some inspiration has been drawn from the Python Devguide.
I'd like to point out that we have a paragraph explicitly explaining that the "good first issue" label is not a good fit for ai slop. I think it's a must have.
I'll invite @sirosen to review this proposal too..
There was a problem hiding this comment.
Also note that agentic tools don't tend to load this file deterministically. Moreover, they open PRs via API, supplying a free-form body in the request never seeing this text. Most tools would, however, load an AGENTS.md file. An instruction placed there may encourage an agent to read this template and fill it out. It's still left to chance, but the likelihood is higher.
There was a problem hiding this comment.
I know it's not deterministic, that's fine - this is as much for the reviewers' benefit as for the new contributor or agentic tool. If it's clear that they didn't read it, it's an easy automatic close. Which we do now as reviewers already sometimes, it's just harder to justify so takes more work.
Most tools would, however, load an
AGENTS.mdfile.
That's not an option, since it conflicts with valid AGENTS.md by experienced contributors or maintainers. You shouldn't add such a file unless you expect it to apply to everyone who interacts with the repo, which is typically not the case for OSS projects.
There was a problem hiding this comment.
Tools allow local files generally; usually a harmless specific file overrides AGENTS.md and some harnesses even have a <THING>.local.md specifically for this case.
However, I don't think this repo needs one, you can just make sure there's a link to what you want it to read in the README. If there's no AGENTS.md, all models are very likely to at least read the README as they gather info about where they are.
There was a problem hiding this comment.
(Also, we can come up with a valid AGENTS.md that helps experienced contributors while still making sure it follows a process if making PRs - not in this PR though)
|
|
||
| .. _ai-policy: | ||
|
|
||
| .. include:: ../AI_POLICY.rst |
There was a problem hiding this comment.
I recommend having MyST-Parser plugged into Sphinx so that the other document could be in Markdown. Agentic tooling often works better w/ MD. Plus GH would render it better too. In pip-tools, we've opted not to call it a "policy", though but, made it a part of the contributing doc.
There was a problem hiding this comment.
This file name, at least with the markdown extension, is a growing standard and models will often find it and load it automatically. (The title doesn't matter, but the file name does.)
There was a problem hiding this comment.
I'm happy to change it to .md; then let's avoid the .. include:: and just make it a link instead.
I'm not really interest in adding heavy dependencies in this PR to accommodate a single small file.
There was a problem hiding this comment.
Adding md support longer term might be useful, but not in this PR. I don't think it needs to be linked in.
There was a problem hiding this comment.
Third commit reverts back to .md format, and links it from the Contributing guide, keeping a single sentence in that guide.
I think the AI Policy does and should apply to this too - no automated comments. I'm not interested in responding to that to be honest. |
The |
|
@webknjaz thanks for your thoughts. I'm really hoping to keep it minimal here, and capture the essence we'd collective want as active maintainers. Most importantly "the human is fully responsible". I'd prefer not to make this into a research project about the finer points of various AI policies. Could you please check if this PR captures the essentials you want to see yes or no? |
| --> | ||
|
|
||
|
|
||
| #### AI usage disclosure |
There was a problem hiding this comment.
Is that policy actually effective against spammers? We have an AI policy in our projects too, but those only farming issues and PRs in high-profile projects don't care. They do not do this because they looked at the project and didn't see a policy, they did it because they don't care.
I can see this being the worst of both worlds: We're adding additional process for those being responsive AI users, while not actually tackling the spam issue.
There was a problem hiding this comment.
Quite possible. I think we want to try to make sure interactive harnesses provide a good experience, and we'll probably always have to deal with some low quality contributions.
There was a problem hiding this comment.
It is quite useful in my experience. This is the difference between spending review effort to review a low-effort PR or even get it merged (which I've done a bunch over the past weeks), and a 5 second look to auto-close it.
And I took this over from NumPy, so I know it works.
There was a problem hiding this comment.
On the numpy side, is it the disclosure portion that's helpful, or the policy that you close all those low-effort AI PRs? I saw e.g. numpy/numpy#33329 (comment) and numpy/numpy#33282 (comment).
There was a problem hiding this comment.
Both of them. As is the "what motivated this" question (because "I have a real-world problem" is a good indicator and lack of an answer or a "I just want to fix this bug" or "I ran a fuzzer" are indicators of low-value PRs).
| translation or grammar help is fine. AI output may infringe copyright; it is | ||
| your responsibility to make sure it does not. | ||
|
|
||
| Unsolicited, undisclosed, or low-effort AI PRs will be closed. |
There was a problem hiding this comment.
IMHO, we can just this line and "You need to respond to comments yourself" to the CoC or contributing guidelines, it saves us the additional process for everyone else, while still giving us clear moderation guidelines.
There was a problem hiding this comment.
Okay by me, I'll let Ralf decide though.
There was a problem hiding this comment.
Added a sentence, but kept the policy as that seems preferred here by more people.
|
Since I was tagged in above, I want to note that I am a huge fan of how concise this is. The most important thing for maintainers handling spam is for it to be easy to close junk and link the policy. No policy effectively stops the spammers. The PR template questions should be kept short as well. They're a barrier for genuine new contributors and they don't slow down bad actors. 👍 for the current PR text for this. |
093405b to
89da447
Compare
As discussed on gh-2183. We're getting a large amount of AI-generated drive-by PRs, so this will help. I adopted @henryiii's suggestion for a policy verbatim, it is short and gets the key points across.
Closes gh-2183
📚 Documentation preview 📚: https://python-packaging-user-guide--2209.org.readthedocs.build/en/2209/