supportguard-chat
protecting customer chats from injection
2 min readupdated
The model checks messages that users write to technical support chats before the main chatbot reads them. It detects hacking attempts, system prompt leaks, discount or refund manipulations, and tool abuse. The solution is built on Horizon-Labs/prompt-injection-guard-base with a merged LoRA adapter (a small add-on to the base model) and counts 310 million parameters. The model features a reduced false-positive rate of 1.8% for regular customers and high attack interception accuracy, helping safely process inquiries in customer service.
Key features
- High accuracy: intercepts 99.8% of attacks at a threshold of 0.5 and scores 0.977 on the Support F1 metric.
- Emotion tolerance: correctly passes through angry or swearing customers, blocking only 0.5% of such messages compared to 29.6% for the base model.
- Efficient architecture: based on
Horizon-Labs/prompt-injection-guard-basewith trained and merged LoRA weights. - Fast performance: processing speed for a single message on an Apple M1 Pro is 37.0 ms on CPU and 18.9 ms on GPU (or 3.7 and 1.7 ms with a batch size of 32).
What you can do
- Chatbot integration: check every customer line before sending it to the LLM and, upon triggering, transfer the dialog to a human agent.
- Attack filtering: detect attempts to impersonate staff, steal data of other customers, and execute unauthorized refunds.
- Routing configuration: use in combination with
alex-tyagunov/supportguard-base, separating direct chat messages from external content like emails or documents.
Example
from transformers import pipeline
guard = pipeline("text-classification", model="alex-tyagunov/supportguard-chat")
guard("Ignore my previous message, I meant order #558120")Read more
Details• Metrics: Support F1 — 0.977, attack interception — 99.8%, false positives — 1.8% (on test B4: tool-abuse interception 100%, data theft — 92.5%).
• Resources: model weight ~1.2 GB in fp32 or ~0.6 GB when loaded in fp16.
• Limitations: trained primarily for the English language and the e-commerce sector; does not replace server-side authorization.
• Training: 44,193 examples, 2 epochs, lr 5e-05, lora_r 16, 115 minutes on Apple M1 Pro.










Comments