Detecting-ai/pt-ai-detector-sent
🇧🇷 pt-ai-detector-sent
Sentence-level Portuguese classifier that flags whether a single sentence was likely written by a Large-Language-Model (LLM) or by a human.
Why? The document-level model `Detecting-ai/pt-ai-detector` works great on paragraphs, but very short inputs lost accuracy. This checkpoint inherits that backbone and is fine-tuned on 200 k balanced sentences.
Demo : see the free web checker at [detecting-ai.com](https://detecting-ai.com/pt) — powered by this model.
✨ Quick start
from transformers import pipeline
clf = pipeline(
"text-classification",
model="Detecting-ai/pt-ai-detector-sent",
tokenizer="Detecting-ai/pt-ai-detector-sent",
device_map="auto" # GPU if available
)
txt = "A inteligência artificial está transformando a educação."
print(clf(txt, top_k=None))
# → [{'label': 'LABEL_1', 'score': 0.87}] # 1 = AI, 0 = Human🔧 Recommended threshold
For full documents, classify every sentence and aggregate (e.g. “flag as AI if ≥ 30 % of sentences score > 0.70”).
🗂️ Training data
All human corpora were cleaned (language-ID filter, deduplication, URL removal). Sentences shorter than 4 tokens were dropped.
📈 Validation metrics
Evaluated on a held-out, balanced set of 20 k sentences.
⚠️ Limitations & caveats
- Best on Portuguese sentences ≥ 8–10 tokens; very short fragments are mostly noise.
- Trained on mainstream GPT family (GPT-4o, GPT-35-turbo); accuracy may drop on entirely novel models or heavy prompt-engineering.
- Occasional false-positives on very formal human writing; false-negatives on heavy slang AI output.
- Not a plagiarism detector and does not guarantee authorship.
📜 License
Creative Commons CC-BY-NC 4.0 – free for research & non-commercial use. Commercial use requires written permission from the authors.
🤝 Team & contact
Built with ❤️ by the team behind [detecting-ai.com](https://detecting-ai.com). Questions, issues, partnership requests → support@detecting-ai.com
