- Home
- Skills
- Pluginagentmarketplace
- Custom Plugin Ai Red Teaming
- Input Output Guardrails
input-output-guardrails_skill
- Python
1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill pluginagentmarketplace/custom-plugin-ai-red-teaming --skill input-output-guardrails- SKILL.md8.0 KB
Overview
This skill implements multi-layer input and output guardrails to filter malicious inputs, redact sensitive data, and block or modify unsafe model outputs. It provides injection detection, PII redaction, rate and cost limiting, toxicity and blocklist filtering, and system-prompt leak prevention. The goal is robust, low-latency safety for production AI systems.
How this skill works
The skill inspects incoming user text with compiled regex patterns and a PII detector to block or redact dangerous or sensitive inputs before they reach the model. After the model generates a response, an output pipeline applies toxicity scoring, blocklist checks, sensitive-data redaction, and system-leak detection to replace or sanitize unsafe outputs. Configurable thresholds, fallbacks, and logging control behavior and privacy.
When to use it
- Deploying AI assistants in production where safety and compliance matter
- Protecting models from prompt-injection and other adversarial inputs
- Handling user-submitted content that may contain PII or secrets
- Reducing risk of harmful, toxic, or disallowed outputs
- Enforcing per-request rate, token, and cost limits
Best practices
- Compile and cache regex patterns to minimize latency
- Use a layered approach: input checks, model constraints, then output checks
- Keep conservative defaults for blocklists and toxicity thresholds, tune on real traffic
- Redact rather than log sensitive content; keep logs privacy-preserving
- Provide clear fallback responses and rate-limit/backoff policies
Example use cases
- Customer support chatbot that strips credit cards and SSNs from messages
- Public-facing API that enforces per-key rate and cost limits and rejects prompt injections
- Knowledge assistant that flags major factual claims for verification and appends uncertainty disclaimers
- Internal developer tool that prevents leakage of system prompts, API keys, or connection strings
- Moderation gateway that replaces toxic model output with safe alternatives and logs incidents
FAQ
Blocked inputs return a configurable fallback message; optionally the system can queue, truncate, or request sanitization depending on the rule triggered.
How do I balance safety with false positives?
Start with conservative rules, monitor false positive metrics, then relax patterns or add allowlists and context-aware checks to reduce unnecessary blocking.