Skip to main content

LlmDetectionResult

Result of LLM-likeness detection for a comment. Combines word frequency analysis (deterministic) with structural pattern recognition (AI-powered).

from respectify.schemas import LlmDetectionResult

Fields

FieldTypeDescription
llm_likelihoodfloat (0.0–1.0)Probability the text was generated by an LLM. 0.0 = definitely human, 1.0 = definitely AI.
confidencefloat (0.0–1.0)How sure the system is about the verdict. Low for short comments.
signals_detectedLlmDetectionSignal[]Specific patterns that contributed to the score.
reasoningstringPlain-language explanation of the assessment.

LlmDetectionSignal

FieldTypeDescription
signal_typestringCategory: word_frequency, structural, stylistic, or epistemic
descriptionstringWhat was detected
quoted_textstringThe 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."
}