Reading the result
Show predicted_class to your users. It comes from the score of the whole document; sentence scores only locate the passages to highlight.
Classes
| Class | When |
|---|---|
ai | Score 75 or above, with medium or high confidence. |
human | Score below 30, with medium or high confidence. No sentence is highlighted. |
inconclusive | Score between 30 and 75, or low confidence. If part of the text reads as AI, that passage is highlighted. We recommend a human review rather than an automatic decision. |
Highlighted passages
Highlight the sentences with highlight: true, using their start and end character offsets in the text you sent. A passage is highlighted only when it is at least two consecutive sentences or 40 words long: single sentences are too noisy to point at.
const marked = result.sentences .filter((s) => s.highlight) .map((s) => [s.start, s.end]);
Confidence
confidence is low for texts under 80 words, scores near the middle, languages without full calibration, and documents whose paragraphs disagree strongly with the overall score. A low-confidence result is always inconclusive.
Using results responsibly
No detector is infallible. Treat a result as evidence for a person to weigh, never as the only reason to accuse someone, especially for texts under 150 words or with low confidence.