guardrails-ai-setup

Solid

Guardrails AI validation framework setup for LLM applications. Implement input/output validation, safety checks, and structured output enforcement.

AI & Automation 1,160 stars 71 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# guardrails-ai-setup Configure Guardrails AI validation framework to ensure LLM outputs meet quality, safety, and structural requirements. Implement validators for input sanitization, output format enforcement, and safety constraints. ## Overview Guardrails AI provides: - Input validation before LLM calls - Output validation after LLM responses - Structured output enforcement (JSON, XML, etc.) - Pre-built validators from Guardrails Hub - Custom validator creation - Automatic retry and correction mechanisms ## Capabilities ### Input Validation - Sanitize user inputs - Detect prompt injection attempts - Validate input formats and lengths - Check for PII before processing ### Output Validation - Enforce structured output schemas - Validate content accuracy - Check for harmful content - Verify factual consistency ### Safety Constraints - Content moderation - Toxicity detection - Bias checking - Hallucination detection ### Integration Features - LangChain integration - Streaming support - Automatic retries - Correction strategies ## Usage ### Basic Setup ```python from guardrails import Guard from guardrails.hub import ValidJson, ToxicLanguage, DetectPII # Create guard with validators guard = Guard().use_many( ValidJson(), ToxicLanguage(on_fail="fix"), DetectPII(on_fail="fix") ) # Use with LLM from langchain_openai import ChatOpenAI llm = ChatOpenAI(model="gpt-4") result = guard( llm, prompt="Generate a product description for a laptop", max...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

implementing-llm-guardrails-for-security

Implements input and output validation guardrails for LLM-powered applications to prevent prompt injection, data leakage, toxic content generation, and hallucinated outputs. Builds a security validation pipeline using NVIDIA NeMo Guardrails Colang definitions, custom Python validators for PII detection and content policy enforcement, and the Guardrails AI framework for structured output validation. The guardrails system intercepts both user inputs (blocking injection attempts, stripping PII, enforcing topic boundaries) and model outputs (detecting hallucinations, filtering toxic content, validating JSON schema compliance). Activates for requests involving LLM output validation, AI content filtering, guardrail implementation, or LLM safety enforcement.

13,115 Updated today
mukul975
AI & Automation Featured

nemo-guardrails

NVIDIA's runtime safety framework for LLM applications. Features jailbreak detection, input/output validation, fact-checking, hallucination detection, PII filtering, toxicity detection. Uses Colang 2.0 DSL for programmable rails. Production-ready, runs on T4 GPU.

27,705 Updated today
davila7
AI & Automation Solid

nemo-guardrails

NVIDIA's runtime safety framework for LLM applications. Features jailbreak detection, input/output validation, fact-checking, hallucination detection, PII filtering, toxicity detection. Uses Colang 2.0 DSL for programmable rails. Production-ready, runs on T4 GPU.

9,182 Updated 1 months ago
Orchestra-Research
AI & Automation Solid

nemo-guardrails

NVIDIA NeMo Guardrails configuration for conversational safety and control

1,160 Updated today
a5c-ai
AI & Automation Featured

llamaguard

Meta's 7-8B specialized moderation model for LLM input/output filtering. 6 safety categories - violence/hate, sexual content, weapons, substances, self-harm, criminal planning. 94-95% accuracy. Deploy with vLLM, HuggingFace, Sagemaker. Integrates with NeMo Guardrails.

27,705 Updated today
davila7