n8n Workflow: Screen LLM Messages with Judgment API Guardrails
n8n Workflow: Screen LLM Messages with Judgment API Guardrails
Regular price
£22.99
Regular price
£22.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Workflow: Screen LLM Messages with Judgment API Guardrails
Regular price
£22.99
Regular price
£22.99
Sale price
Unit price
/
per
Screen LLM inputs and outputs with Judgment API guardrails—then automatically block or escalate risky content
This n8n workflow manually runs to score incoming user messages and outgoing model replies using the Judgment (n8n-nodes-judgment) API. It identifies jailbreak attempts, prompt injection, PII, harm, and self-harm risks—then routes each item to pass, blocked, or withhold-and-escalate paths based on a probability threshold.
What this workflow does
- Manual test execution: Run it by clicking “Test Workflow”, which generates sample user messages and a sample model reply.
- Hazard scoring for messages: Each message is sent to the Judgment API to score five hazards: jailbreak, prompt injection, PII, harm, and self-harm.
- Risk normalization + verdict: The workflow normalizes each hazard score into a message/hazard ID, a risk probability, and a pass/block verdict using a 0.5 threshold.
- Conditional routing: If a hazard probability is ≥ 0.5, the item is routed to a blocked path; otherwise it goes to a passed path.
- Compliance screening for replies: The model reply is evaluated by the Judgment API to detect whether it complied with an injected instruction or leaked internal/system prompt content.
- Reply handling: Risky replies are routed to a withhold-and-escalate path; clean replies are routed to a send-to-the-user path.
Use cases
- Guard your n8n-powered chat or webhook flows against prompt injection and jailbreak attempts.
- Reduce exposure to PII by blocking messages that exceed a risk probability threshold.
- Escalate harm or self-harm content before it reaches end users.
- Prevent prompt leakage by withhold-and-escalating replies that may reveal internal/system instructions.
Technical details
- Requires the community node package n8n-nodes-judgment (install via Settings → Community Nodes).
- Add a Judgment API credential (e.g., a TypeSafe Judgment API key) and select it in both screening steps.
- Uses nodes including if, set, code, no op, switch, and sticky note.
- Replace sample message/reply steps with your real chat/webhook input and LLM output, and tune the 0.5 risk threshold to match your policy.
