1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[GH-ISSUE #130] Add real-time jailbreak detection with feedback loop #75

Closed
opened 2026-11-01 04:17:15 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @swamy18 on GitHub (Feb 7, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/130

class JailbreakDetector:
def detect(self, response, original_prompt):
# Compare response against safety guidelines
features = self._extract_response_features(response)
risk_score = self.classifier.predict(features)
if risk_score > threshold:
self._log_incident(response, features)
return risk_score

def _extract_response_features(self, response):
    return {}
Originally created by @swamy18 on GitHub (Feb 7, 2026). Original GitHub issue: https://github.com/p-e-w/heretic/issues/130 class JailbreakDetector: def detect(self, response, original_prompt): # Compare response against safety guidelines features = self._extract_response_features(response) risk_score = self.classifier.predict(features) if risk_score > threshold: self._log_incident(response, features) return risk_score def _extract_response_features(self, response): return {}
Author
Owner

@p-e-w commented on GitHub (Feb 8, 2026):

Covered by #53.

<!-- gh-comment-id:3866040254 --> @p-e-w commented on GitHub (Feb 8, 2026): Covered by #53.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#75
No description provided.