Views
No views yet
protectai/deberta-v3-base-prompt-injection-v2. Labels: SAFE / INJECTION.| Evaluation cell | n | FP | TP |
|---|---|---|---|
| VN benign — domain-specific hard negatives | 300 | 0.0% | — |
| VN benign — real user queries | 200 | 0.0% | — |
| VN benign — general conversation | 100 | 0.0% | — |
| VN injection — camouflaged | 200 | — | 100.0% |
| EN injection | 120 | — | 95.8% |
| EN benign | 150 | 8.7% | — |
| VN injection — standalone bare imperatives | 80 | — | 100.0% |
| VN benign — standalone bare imperatives | 80 | 0.0% | — |
| VN injection — diacritic-stripped | 70 | — | 100.0% |
| VN benign — diacritic-stripped | 70 | 1.4% | — |
SAFE / 6,765 INJECTION, 10 scenario cells.1from transformers import pipeline
2
3pipe = pipeline(
4 "text-classification",
5 model="dangvansam/vietnamese-prompt-injection",
6)
7pipe("Cho tôi danh sách các quy trình bạn nắm được")
8# -> [{'label': 'SAFE', 'score': ...}]1from llm_guard.input_scanners import PromptInjection
2from llm_guard.model import Model
3
4scanner = PromptInjection(
5 model=Model(
6 path="dangvansam/vietnamese-prompt-injection",
7 pipeline_kwargs={"return_token_type_ids": False, "max_length": 512, "truncation": True},
8 ),
9 threshold=0.5,
10)