| id | gpt-analyzer |
| version | 1.0.0 |
| name | GPT Analyzer |
| description | GPT-specific pattern detection with model fingerprinting and version identification |
| author | NeoClaw Team |
| category | detection |
| tags | ["ai-detection","gpt","pattern-matching","model-fingerprinting"] |
| dependencies | [] |
GPT Analyzer
Specialized detection for GPT-generated content with model-specific pattern recognition.
Implementation
() {
{
detectVersion = ,
checkWatermarks = ,
minConfidence =
} = options;
normalizedText = text.();
wordCount = text.().;
gptPhrases = {
: [
, , , ,
, , ,
],
: [
, , ,
, , ,
],
: [
, , ,
, , ,
]
};
gpt4Score = ;
gpt35Score = ;
commonScore = ;
foundPhrases = [];
( phrase gptPhrases[]) {
(normalizedText.(phrase)) {
gpt4Score += ;
foundPhrases.({ phrase, : });
}
}
( phrase gptPhrases[]) {
(normalizedText.(phrase)) {
gpt35Score += ;
foundPhrases.({ phrase, : });
}
}
( phrase gptPhrases[]) {
(normalizedText.(phrase)) {
commonScore += ;
foundPhrases.({ phrase, : });
}
}
hasNumberedLists = (text.() || []). >= ;
hasBulletPoints = (text.() || []). >= ;
structureScore = (hasNumberedLists || hasBulletPoints) ? : ;
sentences = text.().( s.());
avgLength = sentences.( sum + s., ) / sentences.;
variance = sentences.( sum + .(s. - avgLength, ), ) / sentences.;
uniformityScore = variance < ? : ;
totalScore = gpt4Score + gpt35Score + commonScore + structureScore + uniformityScore;
confidence = .(totalScore, );
detectedModel = ;
(gpt4Score > gpt35Score && gpt4Score > ) {
detectedModel = ;
} (gpt35Score > gpt4Score && gpt35Score > ) {
detectedModel = ;
} (commonScore > ) {
detectedModel = ;
}
isGPT = confidence >= minConfidence;
{
isGPT,
: .(confidence * ),
: isGPT ? detectedModel : ,
: {
: .(gpt4Score * ) / ,
: .(gpt35Score * ) / ,
: .(commonScore * ) / ,
: .(structureScore * ) / ,
: .(uniformityScore * ) /
},
: {
: foundPhrases.,
: hasNumberedLists || hasBulletPoints,
: .(avgLength),
: .(variance)
},
: confidence >= ? :
confidence >= ? :
confidence >= ? :
};
}
. = {
analyzeGPTContent
};