End-User Perspective

You can check a paragraph for AI origin within seconds.

The tool runs on your laptop without cloud fees or any hidden costs.

It shows a clear score and highlights suspicious tokens in your text.

You can trust the result because each feature has a human‑readable weight.

The system works on samples as short as a single sentence.

No GPU is required, so battery life stays high during use.

Your privacy remains intact because processing never leaves your device.

You can export the decision log for compliance audits or internal reviews.

Engineer Implementation

We collect equal amounts of human and LLM generated paragraphs from public sources.

We clean the text, remove HTML, and split into tokenized sentences.

TF‑IDF extracts n‑gram frequencies, providing a sparse representation of each sample.

We add stylometric features such as average word length and punctuation density.

Logistic regression learns a linear decision boundary over the combined feature vector.

Cross‑validation reports 92 % accuracy on held‑out data, matching neural baselines.

Model coefficients reveal which n‑grams and stylometric cues drive predictions.

We package the classifier as a lightweight Python library with a simple CLI.

Deployment uses a single CPU thread, keeping inference latency below 100 ms.

The code runs on any Linux host without additional dependencies.

Contrarian Note

Classical models may misclassify sophisticated LLM output that mimics human writing patterns.

Feature distribution shifts when LLMs adopt new tokenization or prompt engineering tricks.

Short samples sometimes lack enough stylometric signals for reliable detection.

Adversaries can manipulate word choice to evade TF‑IDF based filters.

Regular retraining on fresh data mitigates degradation but adds maintenance overhead.

Neural detectors still excel on large contexts where deep semantics dominate.

Choosing a hybrid pipeline combines interpretability with robustness for critical applications.

Read the full technical blog at https://blog.lyc8503.net/en/post/llm-classifier/ for more details.