Skip to main content

LLM Detection

Is this comment written by a human or generated by AI? Respectify uses a hybrid approach: deterministic word frequency analysis plus structural pattern recognition.

What it returns:

  • llm_likelihood (0.0–1.0): probability the text was generated by an LLM
  • confidence (0.0–1.0): how sure the system is
  • signals_detected: specific patterns that triggered the score
  • reasoning: plain-language explanation

A single score is a signal, not a verdict. It's a sense that the comment could be AI-written, but you must not assume the commenter or account is AI based on a single comment. Instead, track scores over time: an account where most comments score 0.7+ is more likely automated than one with a single comment scoring 0.7.

No AI/LLM detection is foolproof. Many promise they are, but that's marketing, not reality. This is a best effort using our own techniques, but we also expect that as AIs get better, the difficulty of detection will also grow. At some point in future we expect AI detection will in reality score not 'is this text AI generated?' but 'did the account simply not put the effort in to hiding that it was AI generated?' We hope by then there may be newer techniques that we can use for this endpoint.

As such, we do not guarantee that a score here truly represents if a comment was indeed written by a human or LLM. It's best effort only: a signal. Most importantly, do not take permanent, irrevocable action based on the results of this endpoint. You should always have a human in the loop.

Further, we have sometimes seen non-native speakers use LLMs heavily to assist communication. There may be other valid cases for someone to use a LLM too. Do not penalise people using LLMs for valid purposes, including any form of assistance. As above: however you use this endpoint, keep a human in the loop when making impactful decisions.

Reference

See the LLM Detection API Reference for method signatures and parameters.

Response: LlmDetectionResult

By Example

Basic Usage

const result = await client.checkLlmLikeness(
"lol yeah that happened to me too, drove me nuts trying to figure it out"
);

console.log(`LLM likelihood: ${result.llm_likelihood}`);
console.log(`Confidence: ${result.confidence}`);
console.log(`Reasoning: ${result.reasoning}`);

for (const signal of result.signals_detected) {
console.log(`[${signal.signal_type}] ${signal.description}`);
}

What the Scores Mean

RangeMeaning
0.0–0.2Almost certainly human. Personal voice, specific details, informal style.
0.2–0.4Probably human. Some formal patterns but genuine perspective present.
0.4–0.6Genuinely uncertain. Could go either way.
0.6–0.8Likely AI-generated. Multiple structural and word signals.
0.8–1.0Almost certainly AI. Dense pattern clusters, no personal voice.

Tracking Over Time

One score is a data point, so look for patterns across an account. One possible simple system might be to see if the majority of recent comments score highly:

# Track scores for an account
account_scores = []

for comment in recent_comments:
result = client.check_llm_likeness(comment)
account_scores.append(result.llm_likelihood)

# If most recent comments score high, flag for review
recent = account_scores[-20:]
high_scoring = [s for s in recent if s > 0.6]

if len(high_scoring) > len(recent) / 2:
print("This account may be using AI-generated comments")

Via Megacall

Run LLM detection alongside other checks:

const result = await client.megacall({
comment: "Check this comment",
includeLlmDetection: true,
includeSpam: true,
});

console.log(`LLM: ${result.llm_detection?.llm_likelihood}`);
console.log(`Spam: ${result.spam_check?.is_spam}`);

Things to Keep in Mind

  • Short comments are hard to classify. "Great post!" could be anyone or anything: confidence will be low.
  • Formal writing is not AI writing. Academics, lawyers, doctors, and many ordinary humans write formally. The detector accounts for this, but it's inherently ambiguous.
  • Human-edited AI text is a grey area. Someone who drafts with an LLM then edits produces text that's genuinely in between.
  • Non-native English speakers may use unusual vocabulary. That's not an AI signal.