Skip to content

Commit 216ccff

Browse files
Merge pull request #765 from ocaml-multicore/ai-hacking-guidance
Add advice about using AI for code generation
2 parents f8c9441 + a65fd2e commit 216ccff

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

HACKING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,15 @@ Try to avoid making unnecessary changes; this makes review harder and clutters u
135135
`ocamlformat` may be useful to get badly messed up code to a baseline unformatted state,
136136
from which human formatting can be added where needed.
137137

138+
## AI-generated Code
139+
140+
Contributing to Eio should not be done _solely_ using "AI tools" such as ChatGPT. This is for a few reasons:
141+
142+
1. **It obfuscates how you think**. Purely AI-generated code tells us little about how you think and the problems you might be having. This makes it harder to provide good feedback on PRs and issues.
143+
2. **It is often more work to review**. Particularly for the OCaml ecosystem and libraries like Eio, it seems that these tools are not very good and generate a lot of believable code that is in actual fact completely wrong. PR comments and the code submitted with them can say completely different things.
144+
3. **It is a grey area for licensing**. Models like ChatGPT have been trained on lots of code with different licenses and has been known to simply copy code as an answer to a prompt. We would like to avoid this headache as best we can.
145+
146+
Use AI tools, if you wish, to help you understand OCaml and Eio. Do not offload all of the work of a PR or a comment to these tools.
147+
138148
[dscheck]: https://github.com/ocaml-multicore/dscheck
149+

0 commit comments

Comments
 (0)