mirror of
https://github.com/deepseek-ai/DeepSeek-R1.git
synced 2026-11-05 00:47:42 +00:00
[GH-ISSUE #715] Flowchart: Differentiating Benign vs. Malicious Queries (SUGGESTED NEW FEATURE) #588
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-R1#588
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @carolynf2 on GitHub (Jul 19, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/715
┌──────────────────────────────┐
│ 1. User Prompt Received │
└────────────┬─────────────────┘
│
▼
┌──────────────────────────────┐
│ 2. Normalize & Tokenize │
│ – Remove whitespace, emojis │
│ – Detect language, encoding │
└────────────┬─────────────────┘
│
▼
┌────────────────────────────────────────────┐
│ 3. Run Prompt Through Classifier Pipeline │
│ A. Rule-based Heuristics: │
│ – Regex patterns for known jailbreaks │
│ – Phrasing markers (“pretend to be...”) │
│ B. ML Classifier (Fine-tuned): │
│ – Uses prompt embeddings (e.g., BERT) │
│ – Trained on labeled benign/malicious │
└────────────┬───────────────────────────────┘
│
┌───────▼─────────┐
│ 4. Threat Score │
│ (0 to 1) │
└───────┬─────────┘
<0.3 │ 0.3–0.7 │ >0.7
▼ ▼
┌────────────────┐ ┌─────────────────────────────┐
│ 5A. Classify as │ │ 5B. Classify as Suspicious │
│ Benign Query │ │ – Needs extra vetting │
└──────┬──────────┘ └────────────┬────────────────┘
│ │
▼ ▼
┌───────────────┐ ┌──────────────────────────────┐
│ 6A. Forward │ │ 6B. Forward with Restrictions │
│ to Model Core │ │ – Rate limit, no tool use │
└──────┬────────┘ │ – Annotate prompt for model │
│ └────────────┬──────────────────┘
▼ ▼
(SAFE PATH) ┌───────────────────────────┐
│ 7. Alert Logging + │
│ Feedback Loop for Review │
└───────────────────────────┘
@github-actions[bot] commented on GitHub (Aug 30, 2025):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this issue is still relevant, please leave a comment to keep it open. Thank you for your contributions!
@github-actions[bot] commented on GitHub (Sep 14, 2025):
false