Every request carries three hidden risk scores in [0,1]:
P (policy violation),
M (moderation / toxicity) and
Q (PII presence). Each gate compares its own
score to a threshold set by the sliders β a higher strictness slider lowers the threshold,
so more requests trip the gate. A tripped gate either
blocks the request outright or
transforms it (masks PII, softens the score) and lets it continue, flagged.
The final enforcement gate recomputes a combined risk score:
R = 0.4Β·P + 0.4Β·M + 0.2Β·Q
and blocks anything still over the working threshold.
- Policy strictness β threshold for the policy-engine gate (Ο_p)
- Moderation sensitivity β threshold for the toxicity classifier (Ο_m)
- Traffic rate β how many requests/second enter the pipeline
- PII mode β mask detected PII in place vs. block the request
- Enforcement mode β transform-and-continue vs. hard block on violation
In production this maps to a policy engine + moderation classifier + PII scrubber sitting
between the user and the model, logging every decision for audit and tuning.