Every time I ask an LLM to not write comments, it still litters it with comments. Is Gemini better about that?
Or something similar that does not rely on negation.
I also try and get it to channel that energy into the doc strings, so it isn't buried in the source.
Besides, other models seems to handle negation correctly, not sure why it's so difficult for the Gemini family of models to understand.
Refractor this. Do not write any comments.
<code to refractor>
As a reminder your task is to refractor the above code and do not write any comments.
Literally both of those are negations.
If you think negations never work tell Gemini 2.5 to "write 10 sentences that do not include the word the" and see what happens.
If it is ingesting data, there should also be a sample of the data in a comment.