Skip to content

Commit 01c6b87

Browse files
corona10willingcnedbathugovk
authored
generative-ai: Add anti pattern example (gh-1679)
* generative-ai: Add anti pattern example * reformat * Address code review * Add one more case * reformat * Address code review * fix * Update heading and use sentence case Co-authored-by: Ned Batchelder <[email protected]> * Improve wording and spacing for principles Co-authored-by: Hugo van Kemenade <[email protected]> * Apply suggestions from code review Co-authored-by: Carol Willing <[email protected]> --------- Co-authored-by: Carol Willing <[email protected]> Co-authored-by: Ned Batchelder <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 006ad0e commit 01c6b87

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

getting-started/generative-ai.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
Generative AI
55
=============
66

7-
Generative AI has evolved rapidly over the past decade and will continue in the future.
8-
Using generative AI and large language models (LLMs) can be helpful tools for contributors.
9-
Their overuse can also be problematic, such as generation of incorrect code, inaccurate documentation, and unneeded code churn.
10-
Discretion, good judgement, and critical thinking **must** be used when opening issues and pull requests.
7+
Generative AI tools have evolved rapidly, and their suggested results can be helpful. As with using any tool, the resulting contribution is
8+
the responsibility of the contributor. We value good code, concise accurate documentation, and avoiding unneeded code
9+
churn. Discretion, good judgment, and critical thinking are the foundation of all good contributions, regardless of the
10+
tools used in their creation.
1111

1212
Acceptable uses
1313
===============
@@ -24,3 +24,17 @@ Unacceptable uses
2424
Maintainers may close issues and PRs that are not useful or productive, including
2525
those that are fully generated by AI. If a contributor repeatedly opens unproductive
2626
issues or PRs, they may be blocked.
27+
28+
Considerations for success
29+
==========================
30+
- While AI assisted tools such as autocompletion can enhance productivity, they sometimes rewrite entire code blocks instead of making small, focused edits.
31+
This can make it more difficult to review changes and to fully understand both the original intent of the code and the rationale behind the new modifications.
32+
Maintaining consistency with the original code helps preserve clarity, traceability, and meaningful reviews and also helps us avoid unnecessary code churn.
33+
- Sometimes AI assisted tools make failing unit tests pass by altering or bypassing the tests rather than addressing the underlying problem in the code.
34+
Such changes do not represent a real fix. Authors must review the work done by AI tooling in detail to ensure it actually makes sense before proposing it as a PR.
35+
- Keep the following principles for the quality of your contributions in mind whether you use generative AI or not:
36+
37+
- Consider whether the change is necessary
38+
- Make minimal, focused changes
39+
- Follow existing coding style and patterns
40+
- Write tests that exercise the change

0 commit comments

Comments
 (0)