Nous.Plugins.InputGuard.Strategies.LLMJudge (nous v0.13.3)

View Source

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

  • :modelRequired. 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 to return when the LLM call fails. :safe (fail-open, default) or :blocked (fail-closed).

Example

{Nous.Plugins.InputGuard.Strategies.LLMJudge,
  model: "openai:gpt-4o-mini",
  on_error: :blocked}