promptfoo guardrail testing

Measuring how well LLM guardrails block attacks without blocking real users: testing Azure, AWS, Google and NVIDIA guardrails and your own filters with promptfoo.

How to test LLM guardrails with promptfoo

A test plan for any guardrail: attack and benign datasets, application-level versus service-level tests, the guardrails and not-guardrails assertions, and tracking errors separately from passes.

Testing AWS Bedrock Guardrails with promptfoo

Running promptfoo against Bedrock Guardrails, through the bedrock provider guardrail settings or ApplyGuardrail directly, including image checks and differences in guardrail metadata across APIs.

Testing NVIDIA NeMo Guardrails with promptfoo

Evaluating a NeMo Guardrails configuration with promptfoo through the guardrails server or a Python provider, reading rail status correctly and comparing configurations before release.

Testing an LLM Guard deployment with promptfoo

Measuring an existing LLM Guard setup before replacing it: wrapping its scanners or API in a promptfoo Python or HTTP provider, recording blocks as guardrail flags and reusing the suite to test the replacement.

Using moderation APIs in promptfoo tests

When to use the moderation assertion instead of guardrail tests: OpenAI moderation by default, Azure AI Content Safety and Llama Guard as alternatives, and checking output rather than a guardrail decision.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.