protectai/llm-guard
A Python security library that scans and sanitizes LLM inputs and outputs for adversarial content, prompt injection, and data leakage risks.

Velocity · 7d
+2.9
★ / day
Trend
→steady
star history
LLM Guard provides a collection of scanners that evaluate LLM prompts and responses before they reach the model or user. It detects harmful language, prevents sensitive data exfiltration, and blocks prompt injection attempts commonly used in adversarial attacks. The toolkit integrates into production LLM workflows as a guardrail layer and includes a Hugging Face playground for experimentation.