Detect human vs AI text using stylometric metrics and multi‑agent LLM debate
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (11)
- Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Chat
@n8n/n8n-nodes-langchain.chat - Data table
n8n-nodes-base.dataTable - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
What it does
Stop guessing if text came from ChatGPT. Let three AI agents argue about it using forensic data. Paste any text and get a verdict on whether it was written by a human, AI, or a hybrid mix. Instead of trusting one black-box score, this workflow runs your text through statistical analysis and a three-agent debate where each agent challenges the others using hard numbers. This is not another "detect AI with AI" template. The workflow measures six forensic markers first, then makes three separate agents argue about what those numbers mean. You see the raw data, the debate, and the final verdict with confidence scores. How it works The workflow runs in five stages: 1. Extract forensic metrics: A code node measures burstiness (sentence length variation), type-token ratio (vocabulary diversity), hapax rate (words appearing once), repetition score (repeated phrases), transition density (filler words like "furthermore"), and AI fingerprints (100+ known LLM phrases stored in a data table). Short texts under 150 words get recalibrated because metrics are less reliable. 2. Agent 1 - The Scanner: Reads the text cold with zero metrics. Gives a gut impression (human/AI/hybrid) based purely on instinct. Acts like an editor who has read thousands of manuscripts. 3. Agent 2 - Forensic Analyst: Gets the text, all metrics, and Agent 1's verdict. Writes a data-driven report that must cite specific numbers. Either agrees or disagrees with Agent 1 and explains why using the forensic evidence. 4. Agent 3 - Devil's Advocate: Gets everything above and argues the opposite of whatever Agent 2 concluded. If Agent 2 said AI, Agent 3 must argue human. Finds holes in the logic and metrics that got ignored. 5. Weighted verdict: A code node scores all three agents (35% Analyst, 15% Scanner, 15% Devil's Advocate, 35% raw metrics) and classifies as human (score under 0.35), AI (score over 0.60), or AI-augmented (in between). Confidence is calculated separately so you get verdicts like "AI with 67% confidence." Chat output format The chat response shows: Verdict badge: 🙎🏻 Human-Written, 🤖 AI-Generated, or 🦾 AI-Augmented Confidence bar: Visual bar (██████████ 85%) showing how certain the verdict is Metrics table: All six forensic markers with 🟥 AI or 🟩 Human flags Agent debate: Three verdicts with reasoning. Agent 1's gut check, Agent 2's forensic report, Agent 3's counter-argument. Each shows classification and confidence percentage. Example output for AI text: 🤖 Verdict: AI-Generated Confidence: ████████░░ 87% 📊 Stylometric Metrics: Burstiness: 0.18 🟥 AI Vocabulary Diversity: 0.36 🟥 AI Hapax Rate: 0.32 🟥 AI Repetition: 0.21 🟥 AI Transition Density: 0.024 🟥 AI 🔎 Agent 1 (Gut Check): AI (90%) "Monotonous rhythm, corporate vocabulary, zero personality" 🔬 Agent 2 (Data): AI (95%) "Five of six metrics flag AI. Burstiness of 0.18 well below human threshold..." 😈 Agent 3 (Critic): AI-AUGMENTED (65%) "Could be human technical writing. Transition density alone not conclusive..." Self-updating fingerprint database A separate workflow branch runs weekly to keep the AI phrase list current: 1. Check existing words: Reads all fingerprint phrases from the data table 2. Find new AI tells: Asks an LLM what phrases modern models currently overuse 3. Filter duplicates: Removes words already in the database 4. Add to table: Stores new phrases for future detection Requires: A data table (Google Sheets, Airtable, or n8n Data Table) to store fingerprint words. The workflow includes a starter list of 100+ phrases like "delve into," "it's worth noting," "as of my last update." LLM writing patterns shift fast. What worked for GPT-3 detection does not work for GPT-4. This keeps the detector current without manual updates. Key benefits Three classifications instead of binary. Human, AI, or AI-augmented. Most real content is hybrid. You see the reasoning. Full agent debate included. When verdicts are borderline, you can read which argument won. Transparent metrics. Raw numbe