Bench 01 · LLM output guardrail · n8n Loading suite

An LLM step returnsa string, not a contract.

Everything downstream assumes the fields exist. This node proves they do before anything acts on them, and routes whatever it cannot vouch for to a person. Nine adversarial outputs are being fired at it right now, in your browser, against the real node code.

The suite

Every payload below is a documented failure mode of LLM steps in production workflows.

Try to break it

Runs client-side. Nothing you type leaves this page.

Verdict

Nothing fired yet. Paste a payload and run it.

What this does not catch

Shape validation is one control, not the whole safety story. Stated up front so nobody buys it as more than it is.

  • Prompt injection inside a valid field. A summary that reads "ignore previous instructions" is still a well-shaped string. It passes here and needs a separate control before it reaches anything that acts on text.
  • A confidently wrong category. If the model calls a billing complaint "sales", the allowlist has no opinion. That is a scoring and evaluation problem, handled with a held-out set, not a validator.
  • The LLM being unreachable. Handled, but by a different branch: three retries, then the same human queue rather than a silent failure.

The node, verbatim

One change for the browser: $input.first().json becomes a function argument.