-
Notifications
You must be signed in to change notification settings - Fork 17
Update AI Policy #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update AI Policy #664
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,25 +9,81 @@ | |
| AI Policy | ||
| ========= | ||
|
|
||
| Please ensure that when using Generative AI tools, appropriate guardrails are | ||
| in place and contributions have correct attribution. For Met Office | ||
| contributors, this includes adhering to the Use of Generative AI policy. | ||
| Contributors from other institutions should check if their institution has | ||
| similar policies, and follow the local policy. | ||
|
|
||
| Code where Generative AI tools have been used needs to have clear attribution to | ||
| meet the Met Office Generative AI policy. This includes attribution in the | ||
| commit message and in each modified file. Any file where a modification has been | ||
| made with Generative AI assistance must have a comment immediately before the | ||
| module level docstring, containing: | ||
|
|
||
| .. code-block:: | ||
|
|
||
| # Some of the content of this file has been produced with the assistance of | ||
| <Generative AI tool name>." | ||
|
|
||
| where ``<Generative AI tool name>`` should be replaced with the specific name of | ||
| the tool such as ``<Institution Name> Github Copilot Enterprise`` (e.g. Met | ||
| Office Github Copilot Enterprise), ``Github Copilot Personal``, | ||
| ``ChatGPT GPT-4``, etc. For Met Office contributors, Met Office Github Copilot | ||
| Enterprise is the only approved Generative AI tool. | ||
| The primary objective of this policy is to prevent the introduction of | ||
| Intellectual Property Rights (IPR) restricted code into our simulation systems. | ||
|
|
||
| Core Principles and Tool Restrictions | ||
| ------------------------------------- | ||
|
|
||
| * **Risk of Public-Domain AI**: AI tools trained on public repositories can emit | ||
| code that violates open-source licences or copyrights. | ||
| * **No Free-Tier Copilot**: The free tier of GitHub Copilot does not provide IPR | ||
| indemnity or legal protection for generated code. Its use is *strictly | ||
| prohibited* for any contributions to our simulation systems. | ||
| * **Contributor Liability**: Under all circumstances, individual *contributors bear | ||
| full legal and professional responsibility* for the integrity of the code they | ||
| generate and submit. | ||
| * **Met Office Staff**: Met Office contributors are only authorised to use the | ||
| officially provided *Met Office GitHub Copilot Enterprise* model, which | ||
| includes appropriate corporate guardrails and indemnities. | ||
| * **External Contributors**: External partners must operate under their own | ||
| institution's approved AI policies. If no corporate, indemnified AI tool is | ||
| available to you, you must write code manually. | ||
|
|
||
| Attribution Requirements | ||
| ------------------------ | ||
|
|
||
| If an authorised Generative AI tool is used to assist in writing or refactoring | ||
| code, you must provide clear attribution in two places: | ||
|
|
||
| #. **the source file header** | ||
|
|
||
| A comment immediately before the module level docstring, for example, | ||
|
|
||
| .. code-block:: fortran | ||
|
|
||
| ! Some of the content of this file has been produced with the assistance of | ||
| ! Met Office GitHub Copilot Enterprise (Claude Sonnet 4.6). | ||
|
|
||
| External collaborators should replace Met Office GitHub Copilot Enterprise | ||
| (Claude Sonnet 4.6) with their own institution's approved Generative AI tool, | ||
| e.g., University of XYZ GitHub Copilot Enterprise (GPT-5.3-Codex), etc. | ||
|
|
||
| #. **the commit message** | ||
|
|
||
| Your git commit message must explicitly state which tool was used and what it generated, for example, | ||
|
|
||
| .. code-block:: text | ||
|
|
||
| Refactor spatial interpolation routines to improve performance. | ||
|
|
||
| - Co-authored-by: Met Office GitHub Copilot Enterprise (Claude Sonnet 4.6) | ||
| - Assisted by: Met Office GitHub Copilot Enterprise (Claude Sonnet 4.6) | ||
| for spatial interpolation optimisation. | ||
|
|
||
| Code Review Guidelines | ||
| ---------------------- | ||
|
|
||
| Reviewers must remember that AI-generated code is not self-authenticating. | ||
| The human contributor remains fully responsible for its contents. | ||
|
|
||
| Reviewer Checklist Matrix | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| +------+--------------------+------------------------------+------------------------+ | ||
| | Step | Action | Pass Criteria | Fail Action | | ||
| +======+====================+==============================+========================+ | ||
| | 1 | Check file header | Explicitly names an approved | Reject immediately if | | ||
| | | and commit message | enterprise-tier tool | free/personal tier | | ||
| +------+--------------------+------------------------------+------------------------+ | ||
| | 2 | Check licence | Code contains no proprietary | Request rewrite/proof | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What exactly is the responsibility of the reviewer here ? How can they assert that a code hasn't been plagiarised ? It is not necessarily obvious. Should we change the text to code contains no obvious proprietary or restrictively licensed snippet.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's a good point. Slightly rewarded the content in the table. |
||
| | | compatibility | or restrictively licensed | of origin if | | ||
| | | | snippets | copy-paste suspected | | ||
| +------+--------------------+------------------------------+------------------------+ | ||
| | 3 | Assess Logic and | Reviewer understands every | Request revisions for | | ||
| | | Edge Cases | line; edge cases are handled | "black box" code | | ||
| +------+--------------------+------------------------------+------------------------+ | ||
| | 4 | Run Test Suite | Code passes all unit, | Block merge until | | ||
| | | | integration, and | tests pass natively | | ||
| | | | regression tests | | | ||
| +------+--------------------+------------------------------+------------------------+ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have been challenged by a contributor on the wording "bear full [] legal responsibility". Is this backed up by guidance from the legal team or a wider corporate guidance on Gen AI ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly in the ancillary space we've been advised in past (in a ever and rapidly evolving set of opinions and guidance) that it is the submitter's responsibility to ensure they're not violating someone else's IPR and that they've taken appropriate steps to avoid that. We ask the question explicitly regarding IPR in our submission templates, at which point the ANTS team is "acting in good faith" based on the information provided by the submitter who has confirmed that they've taken steps to avoid IPR violations, so the legal question would ultimately fall on the developer.
Our wider (Met Office) guidance only seems to consider the Met Office scope though. It's been somewhat grey in terms of how we interact with external bodies and international partners.
Something to take to the Science Codes Owner and Legal though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My question was precisely if this guidance is written down somewhere and approved by legal. If yes, maybe let's refer to it in the text.
Another point is that for me "integrity of the code" can be construed as wider than IPR issues.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. On that point, if this policy addition applies to the repositories you're using this license across: https://github.com/MetOffice/simulation-systems/blob/main/LICENSE then integrity itself probably needs defining very clearly. That license is a BSD 3-clause that says:
"THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
A contributor would not be able to be made liable by anyone accepting and running codebases with that license for quite a lot of things, regardless of whether they used generative AI or otherwise.