HOW IT WORKS

Six small steps between the user and the model

The guard is middleware. Every piece of untrusted text passes through it before the LLM sees it.

The pipeline

THE DECISION

Three outcomes, not two

Most detectors only allow or block. Ours has a middle path, so a real request with an attack hidden inside it is not thrown away.

PassClean input goes straight through. The user notices nothing.
score below 0.55
SanitiseThe injected sentence is cut out and the real request continues.
score 0.55 to 0.85
BlockClear attack. Nothing reaches the model.
score 0.85 and above
UNDER THE HOOD

What it is made of

BanglishBERTthe backbone model, fine-tuned for two tasks: attack or not, and which of six categories
ONNX int8quantised export. 440 MB down to 111 MB with 0.0000 accuracy lost
FastAPIone /detect endpoint that any web application can call
150 testsautomated tests passing, including a train/test leakage check

Scope: the guard checks input on its way to the model. Filtering the model's output is outside this project.

Next: see it stop an attack▶ Live demo