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.

Measuring how well LLM guardrails block attacks without blocking real users: testing Azure, AWS, Google and NVIDIA guardrails and your own filters 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.
Putting numbers on a guardrail both ways: missed attacks on adversarial sets, wrongly blocked legitimate requests on benign sets, and choosing thresholds from the trade-off.
Testing Azure OpenAI content filtering, Azure AI Content Safety severity thresholds and Azure Prompt Shields for prompt and document attacks, and why the three return different signals.
Running promptfoo against Bedrock Guardrails, through the bedrock provider guardrail settings or ApplyGuardrail directly, including image checks and differences in guardrail metadata across APIs.
Evaluating a NeMo Guardrails configuration with promptfoo through the guardrails server or a Python provider, reading rail status correctly and comparing configurations before release.
Evaluating and tuning Model Armor templates and floor settings with promptfoo red team and guardrail tests, using Vertex AI prompt blocks or the sanitization API.
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.
Running the same attack and benign sets against several guardrails to compare detection, false positives and latency before buying or replacing one.
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.

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.