# Guardrails AI — LLM Output Validation Framework

> Validate, structure, and secure LLM outputs with declarative guardrails.

- Org: Guardrails AI
- Date: 2024-10-20
- Category: security, tool, repo
- Source: https://github.com/guardrails-ai/guardrails
- Canonical page: https://ai-tldr.dev/releases/guardrails-ai/

## In short

Open-source framework for adding structural and semantic validation to LLM outputs. Enforces JSON schemas, detects PII/toxicity, and auto-retries on failure.

## What it is

Guardrails AI wraps your LLM calls with validation logic. Define what valid output looks like (JSON schema, no PII, no toxic content) and Guardrails enforces it — auto-retrying if the model fails.

## How it works

You define a Guard with validators from their hub (100+ available). When you call the LLM through Guardrails, it validates the response, masks PII, checks for toxicity, and retries if needed.

## Why it matters

Raw LLM output is unpredictable. Guardrails makes it production-safe — you get structured, validated, safe responses or explicit failures.

## Who it's for

Teams building LLM-powered apps that need reliable, safe outputs.

## Try it

pip install guardrails-ai

## Links

- [GitHub](https://github.com/guardrails-ai/guardrails)
- [Docs](https://docs.guardrailsai.com)
- [Hub](https://hub.guardrailsai.com)
