
TL;DR
A developer built an 85% accurate LLM text detector using TF-IDF and linear SVM - no neural networks required. Here is how it works and what HN thinks about AI detection.
A developer has published a detailed writeup on building an LLM text detector using classical machine learning techniques - specifically TF-IDF vectorization with linear Support Vector Classifiers. The approach achieved approximately 85% accuracy at the sentence level, demonstrating that you do not need deep learning to detect AI-generated content. But as the HN discussion reveals, whether this matters depends entirely on your use case.
The system uses a straightforward pipeline: TF-IDF feature extraction feeding into seven binary SVM classifiers, one per LLM model family (Doubao, Qwen, GLM-5, Kimi, Deepseek, and others). Even a "buggy first version" hit 88% accuracy according to the author.
Key metrics:
The training dataset combined approximately 10,000 human-written texts from 2010-2022 web fiction platforms with matching LLM-generated counterparts, totaling over 8.5 million sentences.
A majority-voting ensemble flags sentences as AI-generated when two or more of the seven classifiers trigger. Testing against pre-2022 literature showed false positive rates below 0.5% at a 50% detection threshold.
Bypass attempts largely failed:
The detector still caught most attempts even after deliberate evasion.
The discussion surfaced the fundamental tension in AI detection: accuracy versus consequences.
The Arms Race Argument: Multiple commenters argued that detection is inherently temporary. "In training all you have to do is take their model as the adversary and then it's useless," one noted, referencing GAN-style adversarial training. The spam filtering analogy came up repeatedly - Bayesian filters worked great until spammers adapted.
The False Positive Problem: "Imagine how soul-crushing writing an entire dissertation by hand and having it rejected because some 'good enough' LLM detector decides you write too much like an AI." This concern resonates particularly in educational contexts where false positives can end academic careers.
A commenter recalled a 2023 incident where a Texas professor used an anti-plagiarism tool that flagged over one-third of a class as AI users - and the professor's own decade-old published work also got flagged when students tested it.
The Language Drift Question: Several commenters pointed out that LLMs are changing how humans write. "Generation alpha is going to have a lot of trouble if we keep perpetuating the myth that you can really interpret text in an ongoing fashion." As humans absorb LLM-influenced text, the baseline for "human writing" shifts.
The Practical Defense: Others argued that most AI slop is low-effort. "The thing about most text slop is how little effort goes into disguising it. If you can catch some of it, that's something at least." Commercial chat models are specifically tuned for engagement in ways that create detectable patterns - users who want to evade detection can, but most do not bother.
The Pangram Comparison: Users familiar with existing detection tools noted that Pangram claims a 1-in-10,000 false positive rate, tested against pre-2020 texts. The post's approach independently discovered a core technique Pangram uses - creating "twins" to compare human and AI text distributions.
Newsletter
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools, delivered free every week.
From the archive
Jul 16, 2026 • 6 min read
Jul 16, 2026 • 6 min read
Jul 16, 2026 • 7 min read
Jul 16, 2026 • 7 min read
Why classical ML works here:
Commercial LLMs are optimized for engagement through RLHF, not for evading classifiers. This creates consistent stylistic patterns - em-dash overuse, specific sentence structures, particular phrasing habits. These patterns are exactly what TF-IDF captures well.
One commenter observed: "You don't need a style model - current models are very good at doing 'style transfer' of a model text onto whatever it has written if you just have it do it chunk by chunk." The counter-argument: most users generating AI slop are not doing this extra step.
The scalability question:
Could a detector run as a browser extension against every paragraph displayed? The classifier is small enough that this seems feasible. One commenter proposed "an anti-slop blocker" analogous to ad blockers - not catching everything, but filtering the low-effort cases.
The provenance question:
"Whether a text was written by a human or not is just a single bit of information. So you can't rule out its detectability a priori, since even the shortest text contains more information than that."
This got pushback: for any given text, both humans and machines could have written it. The data is fundamentally inseparable for many cases - there is no unique provenance label for each possible string.
If you need to detect AI text in bulk - screening content submissions, filtering training data, moderating forums - classical ML approaches offer a reasonable starting point without the complexity of neural networks.
The 85% sentence-level accuracy drops with shorter text. The false positive rate below 0.5% on pre-2022 text is encouraging, but language drift means this will degrade over time without retraining.
For high-stakes decisions (academic integrity, hiring, legal), no automated detector should be trusted without human review. The false positive risk is too high and the consequences too severe.
The arms race framing is probably correct at the limit - a sufficiently motivated adversary can evade any classifier. But most AI text comes from people using commercial models without any evasion effort. For that common case, classical ML detection works well enough to be useful.
The HN discussion kept circling back to a meta-question: why do we care?
If the text is useful and accurate, does the provenance matter? If a forum post answers a technical question correctly, does it matter that GPT-5 wrote it?
The answer depends on context. Academic work requires demonstrating your own understanding. Creative writing presumably values human expression. Technical documentation mostly cares about accuracy.
For many use cases, the real question is not "was this written by AI" but "is this content good." Detection tools answer the wrong question - but for contexts where provenance genuinely matters, the classical ML approach here provides a surprisingly effective baseline.
For low-effort AI content using commercial models, classical ML approaches achieve 85%+ accuracy. High-stakes decisions still require human review due to false positive risk.
Commercial LLMs are optimized for engagement through RLHF, creating consistent stylistic patterns in word choice and sentence structure that TF-IDF captures effectively.
Yes - translation roundtrips and prompt rewriting reduce detection accuracy by roughly 10 percentage points. Sufficiently motivated users can evade detection, but most do not bother.
Caution is warranted. False positives can have severe consequences, and some students' natural writing style may resemble LLM output. Human review should always accompany automated detection.
Read next
Modern LLMs now use MoE routing, mixed attention variants, and fused vision encoders. The simple transformer stack is gone - here's what replaced it and why it matters for developers.
6 min readA solo developer built a 1,300-line C inference engine that runs the 744B GLM 5.2 model on consumer hardware by streaming routed experts from disk. Here's how it works.
6 min readA new American open-weights frontier model with multimodal capabilities, 1M token context, and competitive benchmarks. Here's what the HN community thinks.
7 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Constrained generation library for LLMs. Uses finite state machines to mask invalid tokens during generation. Guarantees...
View ToolGoogle's open-source coding CLI. Free tier with Gemini 2.5 Pro. Supports tool use, file editing, shell commands. 1M toke...
View ToolOpen-source AI pair programming in your terminal. Works with any LLM - Claude, GPT, Gemini, local models. Git-aware ed...
View ToolAI coding assistant with deep codebase context. Indexes your entire repo graph for accurate answers. VS Code and JetBrai...
View ToolSpawn isolated workers with independent context windows.
Claude CodePrevent bloating the main conversation with research or exploration.
Claude CodeInstall the dd CLI and scaffold your first AI-powered app in under a minute.
Getting Started
Nimbalyst Demo: A Visual Workspace for Codex + Claude Code with Kanban, Plans, and AI Commits Try it: https://nimbalyst.com/ Star Repo Here: https://github.com/Nimbalyst/nimbalyst This video demos N

Build MCP Servers with Databutton It's been a huge few months for MCP! In this video, I'll show you how to build and deploy MCP servers using Databutton— all with just natural language....

Check out Neon: https://fyi.neon.tech/2dd In this video, I introduce you to the new v0 integration that was recently released. I'll demonstrate how to use it to build a Hacker News clone...

Modern LLMs now use MoE routing, mixed attention variants, and fused vision encoders. The simple transformer stack is go...

A new American open-weights frontier model with multimodal capabilities, 1M token context, and competitive benchmarks. H...

A Hacker News discussion blows up over LLM vocabulary quirks, with developers sharing hooks, filters, and coping mechani...

George Hotz publishes a post distinguishing genuine AI progress from manipulative hype narratives. HN's 126-comment thre...

A solo developer built a 1,300-line C inference engine that runs the 744B GLM 5.2 model on consumer hardware by streamin...

A CS student built 30papers.com to make Ilya's legendary ML reading list more accessible. HN has thoughts on the source,...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.