LLM-based input classification strategy.
Uses a secondary LLM call via Nous.generate_text/3 to classify whether
user input is safe, suspicious, or should be blocked. The LLM is prompted
to return a structured VERDICT: safe|suspicious|blocked response.
Configuration
:model— Required. Model string for the judge LLM (e.g.,"openai:gpt-4o-mini").:system_prompt— Override the default classification system prompt.:temperature— LLM temperature. Default:0.0:on_error— What happens when the judge cannot produce a verdict (the LLM call fails, raises, or returns something without aVERDICT:line)::drop(default) — the strategy returns{:error, reason}andNous.Plugins.InputGuardcounts it as dropped: no verdict was produced, which under the default:anyaggregation fails closed by upgrading a:safeaggregate to:suspicious(see:fail_closedthere). This is the safe default — a judge that is down must not read as a judge that said "safe".:safe— fail open: return a:safeverdict. Explicit opt-in.:suspicious/:blocked— return a verdict of that severity.
Example
{Nous.Plugins.InputGuard.Strategies.LLMJudge,
model: "openai:gpt-4o-mini",
on_error: :blocked}