|
| 1 | +.. _ai_policy: |
| 2 | + |
| 3 | +AI Policy |
| 4 | +========= |
| 5 | + |
| 6 | +"AI" herein refers to generative AI tools like large language models (LLMs) |
| 7 | +that can generate, edit, and review software code, create and manipulate |
| 8 | +images, or generate human-like communication. |
| 9 | + |
| 10 | +Responsibility |
| 11 | +-------------- |
| 12 | + |
| 13 | +You are responsible for any code you submit to NumPy's repositories, regardless |
| 14 | +of whether it was manually written or generated by AI. You must understand and be able |
| 15 | +to explain the code you submit as well as the existing related code. It is not |
| 16 | +acceptable to submit a patch that you cannot understand and explain yourself. |
| 17 | +In explaining your contribution, do not use AI to automatically generate |
| 18 | +comments, pull request descriptions, or issue descriptions. See below for our |
| 19 | +policy on AI translation systems. |
| 20 | + |
| 21 | +Disclosure |
| 22 | +---------- |
| 23 | + |
| 24 | +You must disclose whether AI has been used to assist in the development of |
| 25 | +your pull request. |
| 26 | +If so, you must document which tool(s) have been used, how they were used, |
| 27 | +and specify what code or text is AI generated. We will reject any pull request |
| 28 | +that does not include the disclosure. |
| 29 | + |
| 30 | +Code Quality |
| 31 | +------------ |
| 32 | + |
| 33 | +Contributors are expected to submit code that meets NumPy's standards. We will |
| 34 | +reject pull requests that we deem to be "`AI slop`_". Do not waste developers' |
| 35 | +time by submitting code that is fully or mostly generated by AI, and doesn't |
| 36 | +meet our standards. |
| 37 | + |
| 38 | +.. _AI slop: https://en.wikipedia.org/wiki/AI_slop |
| 39 | + |
| 40 | +Copyright |
| 41 | +--------- |
| 42 | + |
| 43 | +All code in NumPy is released under the BSD 3-clause copyright license. |
| 44 | +Contributors to NumPy license their code under the same license when it is |
| 45 | +included in NumPy's version control repository. That means contributors must |
| 46 | +own the copyright of any code submitted to NumPy or must include the BSD |
| 47 | +3-clause compatible open source license(s) associated with the submitted code |
| 48 | +in the patch. Code generated by AI may infringe on copyright and it is the |
| 49 | +submitter's responsibility to not infringe. We reserve the right to reject any pull |
| 50 | +requests, AI-generated or not, where the copyright is in question. |
| 51 | + |
| 52 | +Communication |
| 53 | +------------- |
| 54 | + |
| 55 | +When interacting with developers (forums, discussions, |
| 56 | +issues, pull requests, etc.) do not use AI to speak for you, except for |
| 57 | +translation or grammar editing. If the developers want to chat with a chatbot, |
| 58 | +they can do so themselves. Human-to-human communication is essential for an |
| 59 | +open source community to thrive. |
| 60 | + |
| 61 | +AI Agents |
| 62 | +--------- |
| 63 | +The use of an AI agent that writes code and then submits a pull request autonomously is |
| 64 | +not permitted. A human must check any generated code and submit a pull request according |
| 65 | +to the 'Responsibility' section above. |
| 66 | + |
| 67 | +Other Resources |
| 68 | +--------------- |
| 69 | +While these do not formally form part of NumPy's AI policy, the following resources |
| 70 | +may be helpful in understanding some pitfalls associated with using AI to contribute to |
| 71 | +NumPy: |
| 72 | + |
| 73 | +- https://llvm.org/docs/AIToolPolicy.html |
| 74 | +- https://github.com/melissawm/open-source-ai-contribution-policies |
| 75 | +- https://blog.scientific-python.org/scientific-python/community-considerations-around-ai/ |
| 76 | + |
| 77 | +Acknowledgements |
| 78 | +---------------- |
| 79 | +We thank the SciPy developers for their AI policy, upon which this document is largely |
| 80 | +based. |
0 commit comments