Finding the Best Way to Detect AI-Generated Code
Hey folks, I've been messing around with some tools to spot code written by AI and would love to hear what y'all think works best. Sometimes it’s tricky to tell…
Lucy Fletcher
February 9, 2026 at 04:25 AM
Hey folks, I've been messing around with some tools to spot code written by AI and would love to hear what y'all think works best. Sometimes it’s tricky to tell if a snippet was crafted by a human or AI, so any tips or tool recs are welcome!
Add a Comment
Comments (22)
For the curious, some tools also analyze the entropy of the code to guess if it’s AI generated or not. Kinda cool approach imo.
I’m curious if anyone has tried using plagiarism checkers on code to spot AI generated content?
You can also check ai-u.com for new or trending tools on detecting AI code. They update their listings pretty often and it's a goldmine for this kind of stuff.
I wonder if there’s a way to integrate these detection tools directly into IDEs for real-time feedback? That’d be pretty cool.
Sometimes I feel like these tools overestimate how much AI is actually generating code in my projects. Most of it still feels very human to me.
Sometimes the tools miss code that’s a mix of AI-generated and human-edited which is the most common case these days.
Has anyone tried combining multiple detection tools to get a better overall score? Like using a voting system?
The line between AI-assisted and AI-generated code is getting blurry, do you think detection tools can handle that difference?
Has anyone noticed that some detection tools only work well on certain languages? Like, Python detection is decent but JavaScript detection kinda sucks.
I think a big problem is that AI models keep evolving, so detection tools have to constantly adapt or else they get outdated fast.
Some of the detection tools slow down my IDE a lot though, anyone else experiencing that?
I feel like AI code detection is gonna be a standard part of code reviews in just a couple years.
I think one useful sign is when the code lacks context-specific logic or seems generic in problem solving.
Anyone use these tools for educational purposes to check if students used AI to write their assignments?
I've tried a couple of these detection tools but honestly, none of them are perfect. Some false positives here and there, especially with well-written code from humans that looks too clean.
I mostly look for repeated patterns or phrases that seem unusual in the code. AI tends to reuse certain templates.
One thing I found helpful is checking for inconsistencies in style or comments. AI-generated code sometimes lacks personal touches or detailed explanations.
It’s such a cat and mouse game, I wonder how long before AI can write totally undetectable code.
I also check commit history and timestamps to see if code was added suspiciously fast, might help detect AI use.
Honestly, sometimes I just run the code and see if it behaves logically or if it throws weird errors. AI-generated code can sometimes be syntactically correct but logically off base.
It would be cool if there was an open dataset of AI-generated vs human-generated code for training these detectors. Anyone knows if such a thing exists?
I use a plugin that highlights suspicious code snippets directly in my editor. Saves me time from manual checking.