# Do AI detectors work on code comments and technical documentation?

Source: https://forum.aicontentauthenticity.com/thread/do-ai-detectors-work-on-code-comments-and-technical-documentation/
Site: AI Content Authenticity Forum, category AI text detection
Published: 2026-11-16. Updated: 2026-11-20. Replies: 7.

## Question by Felix B., 2026-11-16

I build moderation pipelines for a developer community site. Members post tutorials, README files and long comment blocks in code samples. A product manager wants an "AI generated" signal on posts and asked me to wire a detector API into the intake queue.

I ran a small batch of our older tutorials, written years before any of this tooling existed, through two detector APIs. Prose paragraphs mostly looked fine. The pages that scored badly were the ones that were mostly comment blocks, API reference tables, step lists and templated "Parameters" sections. One of the worst was a human-written changelog.

My read is that these tools are tuned for essays and articles and fall over on anything formulaic. Before I write that into a design doc, has anyone seen vendor guidance on this? Do any detectors claim to handle code, comments or reference docs? And how would you set up the pipeline so that a bad score on a templated page does not turn into a moderation action?

## Reply 1 by Petra S., 2026-11-17

Your read matches how these classifiers work. They estimate how predictable text is to a language model. Boilerplate is predictable by construction, whoever wrote it. A "Returns: a list of strings" line is going to look machine-like because every human who writes docs writes it the same way.

Turnitin's FAQ says its model tries to drop text it predicts is not real sentences, including lists, headers, references, tables and text that looks like code or formulas, and says it does not reliably detect AI text in non-prose or code. That is a vendor telling you the limit. Source: [Turnitin AI writing detection FAQs](https://guides.turnitin.com/hc/en-us/articles/28477544839821-Turnitin-s-AI-writing-detection-capabilities-FAQs).

## Reply 2 by Ella M., 2026-11-17

Technical writer friends of mine use style guides that literally prescribe sentence patterns for reference pages. Consistency is the job. If a detector punishes consistency it will punish the best docs team in the building first.

## Reply 3 by Theo R., 2026-11-18

Simple answer: if the comments read like a robot wrote them, a robot probably wrote them. I would flag those and let the moderators sort out the rest, since a quick flag costs nothing.

## Reply 4 by Felix B., 2026-11-18

@Theo R. I would not, and the changelog is the counterexample. A human on my own team wrote it by hand in a template. Reads like a robot because the template reads like a robot. That is the failure I am worried about.

## Reply 5 by Quinn H., 2026-11-19

Do not let a detector score trigger an action by itself. In our setup a score can add a post to a review queue and nothing else. Reviewers look at account history and edit history before anything happens to the author. Budget your false positives in terms of reviewer hours, not in terms of a percentage that sounds small.

## Reply 6 by Felix B., 2026-11-19

@Quinn H. that is where I am heading. Score as a queue signal only, exclude blocks that are mostly code, tables or templated headers before scoring, and log the score next to the reviewer's decision so we can see how often they disagree.

## Reply 7 by Devin K., 2026-11-20

I write methods sections for papers, which are also very formulaic, and mine have been flagged before. The same thing happens: the more the genre has a fixed shape, the more a detector sees "predictable" text. Please do consider that your community may include many non-native writers who stick to templates on purpose.

---
Cite as: AI Content Authenticity Forum, "Do AI detectors work on code comments and technical documentation?", https://forum.aicontentauthenticity.com/thread/do-ai-detectors-work-on-code-comments-and-technical-documentation/, accessed 2026-12-03.
