lynote-ai/ai-text-detector
A cautious, explainable AI text detector for local workflows and coding agents. Need production detection in your app? Try the Lynote AI Detector API → lynote.ai/ai-detector-api
What it solves
Most AI text detectors are overconfident, opaque, or hard to embed into coding agents. This project offers a lightweight, no-network CLI/Python analyzer that estimates how likely a piece of text is AI-generated, while clearly warning when evidence is weak. It also ships a production-grade two-level model pipeline (not weights) that labels whole documents and individual sentences as human, AI, or mixed.
How it works
The local analyzer uses weighted, explainable signals rather than a hidden model. It returns a score from 0 to 100, a verdict (e.g., insufficient_text, low_ai_likelihood, mixed_or_uncertain, high_ai_likelihood), a confidence level, the strongest evidence signals, and caveats. A short-text guardrail refuses to overstate conclusions for samples under roughly 80 words.
The production model inside detection-model-pipeline/ is a trained two-level neural network: document and sentence heads share a multilingual backbone (XLM-R-large or ModernBERT-base). One forward pass labels the document and each sentence. Temperature scaling calibrates probabilities so the model is not overconfident. The pipeline covers data preparation, training, calibration, evaluation, and serving via FastAPI.
Who it's for
The tool targets coding agents (e.g., Codex, Claude Code) and local workflows that need fast triage, not final judgment. Use cases include teacher review of student writing, editorial spotting of formulaic posts, trust-and-safety queueing of long-form content, and internal content QA. It is not meant for disciplinary decisions, proof of authorship, or high-stakes disputes without comparing against known writing samples.
Highlights
- Explainable weighted signals instead of black-box confidence
- Local CLI and Python API, no network required
- Short-text guardrail that avoids overclaiming weak evidence
- Skill-ready packaging for repo-aware agents (SKILL.md, AGENTS.md)
- Reproducible evaluation on the public HC3 dataset with maketargets
- Production two-level model pipeline (train, calibrate, serve) with multilingual backbones
- Conservative by design: results are risk estimates for human review, not proof
Related
- Dispatch
- Project
- Project
- Dispatch
- Project