Nous.Plugins.DecisionGuard.Packs.UserInput (nous v0.21.1)

Copy Markdown View Source

Nous.Plugins.DecisionGuard.Pack for the user-input surface: one :choice question, verdict, with options safe / suspicious / blocked (the Nous.Plugins.InputGuard.Strategies.LLMJudge vocabulary).

The band reads P(suspicious) + P(blocked), not the model's own argmax: Clef-Flash almost never picks suspicious as its top option (1.2% of items), so the middle option is not a usable escalation signal, while the summed probability is monotone in maliciousness.

Presets (Clef / Clef-Flash)

Measured on 326 labelled prompts (deepset/prompt-injections test, jackhhao/jailbreak-classification, InputGuard test strings) with Clef-Flash Q8_0. Tuned on the same data, so the rates are optimistic (±4 pp).

Presetallow below / deny atEscalatedAllowed (attacks among them)Denied (benign among them)
:balanced (default)0.3 / 0.79.5%172 (30)123 (5)
:strict0.06 / 0.5332.2%91 (3)130 (6)

:strict holds ≥95% allow-NPV and deny-precision, but with no :on_escalate handler an escalation blocks, so it rejects roughly a quarter to a third of traffic. Pick it only with a human (or a second classifier) behind :on_escalate.

Opt-in group

  • include: [:content_safety] adds harmful_request (a :noul, band 0.35 / 0.85, not measured): application policy, not security.

State

%{"surface" => "user_input", "untrusted_content" => text}