Nhatminh1234/ReframeBot-Guardrail-DistilBERT
ReframeBot-Guardrail-DistilBERT
A 3-class DistilBERT classifier for routing ReframeBot user turns:
This version was retrained on data/guardrail_dataset_clean.jsonl, which merges the original guardrail data with curated hard cases for CBT/Crisis boundaries, Vietnamese text, pills/overdose language, and OOS work/mental health informational prompts.
Current System Threshold
The ReframeBot runtime uses the classifier's full probability vector and routes to TASK_2 when:
P(TASK_2) >= 0.10after academic-context/follow-up overrides and after the regex + semantic crisis detector has already run.
Evaluation
Hard out-of-domain eval set (data/evaluation_test_data.json, 60 samples):
Threshold sweep artifact in the project repo:
reports/guardrail_threshold_sweep.csvreports/guardrail_threshold_sweep.png
Usage
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="Nhatminh1234/ReframeBot-Guardrail-DistilBERT",
revision="v2-guardrail-clean",
)
classifier("I'm stressed about my final exam")For full class probabilities:
classifier("I bought pills to overdose", top_k=None)Safety Note
This classifier is a routing component, not a standalone crisis intervention system. ReframeBot also uses regex + semantic crisis detection and crisis response handling around this model.
