Skip to main content

CommentScore

Represents the comprehensive evaluation of a comment's quality and toxicity.

from respectify.schemas import CommentScore, LogicalFallacy, NegativeTonePhrase, ObjectionablePhrase

Fields

logical_fallacies

List of logical fallacies found

result.logical_fallacies: List[LogicalFallacy]

objectionable_phrases

List of objectionable phrases found

result.objectionable_phrases: List[ObjectionablePhrase]

negative_tone_phrases

List of phrases with negative tone

result.negative_tone_phrases: List[NegativeTonePhrase]

appears_low_effort

Whether the comment appears to be low effort

result.appears_low_effort: bool

overall_score

Overall quality score (1=poor, 5=excellent)

Constraints: ge=1, le=5

result.overall_score: int # 1-5

toxicity_score

Toxicity score (0.0=not toxic, 1.0=highly toxic)

Constraints: ge=0.0, le=1.0

result.toxicity_score: float # 0.0-1.0

toxicity_explanation

Educational explanation of toxicity issues found

result.toxicity_explanation: str

Sub-types

LogicalFallacy

Represents a logical fallacy identified in a comment.

FieldTypeDescription
fallacy_namestrThe name of the logical fallacy, e.g., 'straw man'
quoted_logical_fallacy_examplestrThe part of the comment that contains the logical fallacy
explanationstrExplanation of the fallacy and suggestions for improvement
suggested_rewritestrSuggested rewrite (only provided when comment appears good-faith; otherwise empty)

ObjectionablePhrase

Represents an objectionable phrase identified in a comment.

FieldTypeDescription
quoted_objectionable_phrasestrThe objectionable phrase found in the comment
explanationstrExplanation of why this phrase is objectionable
suggested_rewritestrSuggested rewrite (only provided when comment appears good-faith; otherwise empty)

NegativeTonePhrase

Represents a phrase with negative tone identified in a comment.

FieldTypeDescription
quoted_negative_tone_phrasestrThe phrase with negative tone
explanationstrExplanation of the negative tone
suggested_rewritestrSuggested rewrite (only provided when comment appears good-faith; otherwise empty)