/guardrail

Build LLM apps safely and securely🛡️

Primary LanguagePythonApache License 2.0Apache-2.0

🛡️Guardrail ML

License Python 3.7+ Code style: black PyPI - Python Version Downloads

plot

Guardrail ML is an alignment toolkit to use LLMs safely and securely. Our firewall scans prompts and LLM behaviors for risks to bring your AI app from prototype to production with confidence.

Benefits

  • 🚀mitigate LLM security and safety risks
  • 📝customize and ensure LLM behaviors are safe and secure
  • 💸monitor incidents, costs, and responsible AI metrics

Features

  • 🛠️ firewall that safeguards against CVEs and improves with each attack
  • 🤖 reduce and measure ungrounded additions (hallucinations) with tools
  • 🛡️ multi-layered defense with heuristic detectors, LLM-based, vector DB

Quickstart

Open In Colab

Installation 💻

  1. Guardrail API Key and set env variable as GUARDRAIL_API_KEY

  2. To install guardrail, use the Python Package Index (PyPI) as follows:

pip install guardrail-ml

plot

Roadmap

Firewall

  • Prompt Injections
  • Factual Consistency
  • Factuality Tool
  • Toxicity Detector
  • Regex Detector
  • Stop Patterns Detector
  • Malware URL Detector
  • PII Anonymize
  • Secrets
  • DoS Tokens
  • Harmful Detector
  • Relevance
  • Contradictions
  • Text Quality
  • Language
  • Bias
  • Adversarial Prompt Generation
  • Attack Signature

Integrations

  • OpenAI Completion
  • LangChain
  • LlamaIndex
  • Cohere
  • HuggingFace

More Colab Notebooks

Old Quickstart v0.0.1 (08/03/23) Open In Colab

4-bit QLoRA of llama-v2-7b with dolly-15k (07/21/23): Open In Colab

Fine-Tuning Dolly 2.0 with LoRA: Open In Colab

Inferencing Dolly 2.0: Open In Colab