Skip to content

Ai usage guidelines - #2168

Open
voodoos wants to merge 3 commits into
ocaml:mainfrom
voodoos:AI-usage-guidelines
Open

voodoos wants to merge 3 commits into
ocaml:mainfrom
voodoos:AI-usage-guidelines

Conversation

@voodoos

@voodoos voodoos commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

This is a copy of the compiler guidelines (in the first commit).
I added a restriction on prose writing which should IMO remain purely human.

cc @pitag-ha @xvw @lyrm @Tim-ats-d @PizieDust @panglesd

@voodoos
voodoos requested review from panglesd, pitag-ha and xvw November 23, 2026 15:39

@panglesd panglesd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are perfectly right!

I also wonder if we shouldn't link the file in CONTRIBUTING.md? I would say so.

Comment thread AI.md
Comment on lines +41 to +60
## Guidelines relevant to AI-assisted bug reports

Our advice is to avoid adding LLM-generated contents or explanations to
your initial bug report: a bug report should be to the point and
contain only human-verified information. Adding LLM-generated contents
runs counter to those objectives, even if the generated contents
looks useful to you.

Indeed, judging the quality of a LLM-generated content about an
unknown code base requires a lot of effort. Simultaneously, estimating
the faithfulness of LLM-generated contents without knowing your prior
understanding of the code base, nor your prompt, nor the model context
also requires a lot of effort. Such efforts are in most cases better
spent investigating the bug itself.

Moreover, mixing human and LLM-generated contents in the same report
without a clear separation should be imperatively avoided. Indeed,
the absence of a clear delineation between the two contents makes it
very hard to ascertain the reliability of any part of the mixed
contents.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section seems to imply that it is acceptable to include LLM output in github comments/issues. I agree with the stricter requirements that LLM are not used at all to communicate.

Suggested change
## Guidelines relevant to AI-assisted bug reports
Our advice is to avoid adding LLM-generated contents or explanations to
your initial bug report: a bug report should be to the point and
contain only human-verified information. Adding LLM-generated contents
runs counter to those objectives, even if the generated contents
looks useful to you.
Indeed, judging the quality of a LLM-generated content about an
unknown code base requires a lot of effort. Simultaneously, estimating
the faithfulness of LLM-generated contents without knowing your prior
understanding of the code base, nor your prompt, nor the model context
also requires a lot of effort. Such efforts are in most cases better
spent investigating the bug itself.
Moreover, mixing human and LLM-generated contents in the same report
without a clear separation should be imperatively avoided. Indeed,
the absence of a clear delineation between the two contents makes it
very hard to ascertain the reliability of any part of the mixed
contents.
## Guidelines relevant to AI-assisted bug reports
While LLM can be very useful at finding bugs, we ask that the report prose is human-written. It makes a better experience for the maintainer and avoids reports that the contributor does not understand well, and save the maintainer's time for fixing the bug.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the original version weakens the "no human-addressed content should be AI-generated" rule. A more straightforward prose, as proposed by @panglesd, is stricter but simpler to apply.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I kept it to stay as close as possible with the compiler's guidelines, but I was a bit uncomfortable with them too.

@panglesd panglesd added the no changelog Turn off CI changelog-check label Nov 23, 2026
@lyrm

lyrm commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Silly question: what about the use of AI to improve the language/format and fix the typos in human-addressed content? Typically, I have Grammarly activated all the time, and it can rewrite quite a bit in a message.

Comment thread AI.md
Comment on lines +22 to +28
3. We ask that any human-addressed prose be written by yourself. This notably
includes Github comments, issues and PR descriptions, but also code comments
and documentation. Additionally, if a significant portion of your code has
been AI-generated, this must be disclosed, stating which tool was used and
for what. Reviewing AI-produced code can require a different approach from
human-written code. You should have an acknowledgement anyway even if
another *human* contributor did some of the work.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this mush together different topics?
The start is about prose (in opposition to code), then moves to reviewing AI-produced code, and finishes on attribution for other contributors (I think?).

@voodoos voodoos Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing! That's a fair point, I initially wanted to add a new list item but chose this approach to reduce the diff with upstream. It is indeed a bit muddy like that, I will split in two bullets.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog Turn off CI changelog-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants