A collection of Osprey rules for ATProto

adjust thresholds for sentiment labels

Changed files
+19 -7
rules
+10 -4
rules/record/post/negative_posting.sml
··· 6 6 ], 7 7 ) 8 8 9 - _Gate = SentimentScoreUnwrapped <= -0.8 9 + _Gate = SentimentScoreUnwrapped <= -0.85 10 10 11 11 NegativeSentimentCount = IncrementWindow( 12 - key=f'neg-post-{UserId}', 13 - window_seconds=4*Hour, 12 + key=f'neg-post-3hr-{UserId}', 13 + window_seconds=3*Hour, 14 + when_all=[_Gate], 15 + ) 16 + 17 + _NegativeSentimentCountHour = IncrementWindow( 18 + key=f'neg-post-1hr-{UserId}', 19 + window_seconds=Hour, 14 20 when_all=[_Gate], 15 21 ) 16 22 ··· 24 30 ) 25 31 26 32 NegativePostingRule = Rule( 27 - when_all=[NegativeSentimentCount >= 3], 33 + when_all=[NegativeSentimentCount >= 10, _NegativeSentimentCountHour >= 4], 28 34 description='User has made five or more negative posts in a four hour window', 29 35 ) 30 36
+9 -3
rules/record/post/toxic_posting.sml
··· 9 9 _Gate = ToxicityScoreUnwrapped <= -0.997 10 10 11 11 ToxicPostCount = IncrementWindow( 12 - key=f'tox-post-{UserId}', 13 - window_seconds=4*Hour, 12 + key=f'tox-post-3hr-{UserId}', 13 + window_seconds=3*Hour, 14 + when_all=[_Gate], 15 + ) 16 + 17 + _ToxicPostCountHour = IncrementWindow( 18 + key=f'tox-post-1hr-{UserId}', 19 + window_seconds=Hour, 14 20 when_all=[_Gate], 15 21 ) 16 22 ··· 23 29 ) 24 30 25 31 ToxicPostingRule = Rule( 26 - when_all=[ToxicPostCount >= 3], 32 + when_all=[ToxicPostCount >= 10 or _ToxicPostCountHour >= 4], 27 33 description='User has made three or more toxic posts in a four hour window', 28 34 ) 29 35