LlmDetectionResult
Result of LLM-likeness detection for a comment. Combines word frequency analysis (deterministic) with structural pattern recognition (AI-powered).
- Python
- PHP
- JSON
from respectify.schemas import LlmDetectionResult
use Respectify\Schemas\LlmDetectionResult;
Types are returned as JSON objects in API responses.
Fields
| Field | Type | Description |
|---|---|---|
llm_likelihood | float (0.0–1.0) | Probability the text was generated by an LLM. 0.0 = definitely human, 1.0 = definitely AI. |
confidence | float (0.0–1.0) | How sure the system is about the verdict. Low for short comments. |
signals_detected | LlmDetectionSignal[] | Specific patterns that contributed to the score. |
reasoning | string | Plain-language explanation of the assessment. |
LlmDetectionSignal
| Field | Type | Description |
|---|---|---|
signal_type | string | Category: word_frequency, structural, stylistic, or epistemic |
description | string | What was detected |
quoted_text | string | The text that triggered this signal (if applicable) |
Example Response
{
"llm_likelihood": 0.02,
"confidence": 0.95,
"signals_detected": [],
"reasoning": "Casual tone, specific personal experience, slang — classic human comment."
}
A high-scoring example:
{
"llm_likelihood": 0.96,
"confidence": 0.90,
"signals_detected": [
{"signal_type": "word_frequency", "description": "AI-overused word: \"delves\"", "quoted_text": "delves"},
{"signal_type": "word_frequency", "description": "AI-overused word: \"tapestry\"", "quoted_text": "tapestry"},
{"signal_type": "structural", "description": "View from nowhere — no personal voice", "quoted_text": ""}
],
"reasoning": "Dense LLM-typical vocabulary, zero personal voice, reads like generated content."
}