-
-
Notifications
You must be signed in to change notification settings - Fork 931
generative-ai: Add anti pattern example #1679
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
Open
corona10
wants to merge
9
commits into
python:main
Choose a base branch
from
corona10:ai-anti
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+18
−4
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
55e0a9e
generative-ai: Add anti pattern example
corona10 2a102b8
reformat
corona10 7a7bec2
Address code review
corona10 f0e60d0
Add one more case
corona10 131f62f
reformat
corona10 f7d40f8
Address code review
corona10 3b1b75c
fix
corona10 fdc2c42
Update heading and use sentence case
willingc 65f3bbe
Improve wording and spacing for principles
willingc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,10 +4,10 @@ | |||||||||
| Generative AI | ||||||||||
| ============= | ||||||||||
|
|
||||||||||
| Generative AI has evolved rapidly over the past decade and will continue in the future. | ||||||||||
| Using generative AI and large language models (LLMs) can be helpful tools for contributors. | ||||||||||
| Their overuse can also be problematic, such as generation of incorrect code, inaccurate documentation, and unneeded code churn. | ||||||||||
| Discretion, good judgement, and critical thinking **must** be used when opening issues and pull requests. | ||||||||||
| Generative AI has evolved rapidly and can be impressive. As with using any tool, the resulting contribution is | ||||||||||
| the responsibility of the contributor. We value good code, concise accurate documentation, and avoiding unneeded code | ||||||||||
| churn. Discretion, good judgment, and critical thinking are the foundation of all good contributions, regardless of the | ||||||||||
| tools used in their creation. | ||||||||||
|
|
||||||||||
| Acceptable uses | ||||||||||
| =============== | ||||||||||
|
|
@@ -24,3 +24,17 @@ Unacceptable uses | |||||||||
| Maintainers may close issues and PRs that are not useful or productive, including | ||||||||||
| those that are fully generated by AI. If a contributor repeatedly opens unproductive | ||||||||||
| issues or PRs, they may be blocked. | ||||||||||
|
|
||||||||||
| Considerations for success | ||||||||||
| ================================== | ||||||||||
|
Comment on lines
+28
to
+29
Collaborator
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.
Suggested change
|
||||||||||
| - While AI assisted tools such as autocompletion can enhance productivity, they sometimes rewrite entire code blocks instead of making small, focused edits. | ||||||||||
| 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. | ||||||||||
| Maintaining consistency with the original code helps preserve clarity, traceability, and meaningful reviews and also helps us avoid unnecessary code churn. | ||||||||||
| - Sometimes AI assisted tools make failing unit tests pass by altering or bypassing the tests rather than addressing the underlying problem in the code. | ||||||||||
| 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. | ||||||||||
| - Keep the following principles for the quality of your contributions in mind whether you use generative AI or not: | ||||||||||
|
|
||||||||||
| - Consider whether the change is necessary | ||||||||||
| - Make minimal, focused changes | ||||||||||
| - Follow existing coding style and patterns | ||||||||||
| - Write tests that exercise the change | ||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
Let's be explicit that Gen AI, agents, etc. are tools. I would prefer not to make the value judgement that the results are impressive.