ZenGuard AI enables AI developers to integrate production-level, low-code LLM (Large Language Model) guardrails into their generative AI applications effortlessly. With ZenGuard AI, ensure your application operates within trusted boundaries, is protected from prompt injections, and maintains user privacy without compromising on performance.
- Prompt Injection Detection: Identifies and mitigates attempts to manipulate, exfiltrate proprietary data, and insert malicious content to/from models and RAG systems.
- Jailbreak Detection: Identifies and mitigates attempts to manipulate model/app outputs.
- Personally Identifiable Information (PII) Detection: Protects user data privacy by detecting and managing sensitive information.
- Allowed Topics Detection: Enables your model/app to generate content within specified, permissible topics.
- Banned Topics Detection: Prevents the model from producing content on prohibited subjects.
- Keywords Detection: Allows filtering and sanitization of your application's requests and responses or content generation based on specific keywords.
Start by installing ZenGuard package:
pip install zenguard
Jump into our Quickstart Guide to easily integrate ZenGuard AI into your application.
Test the capabilities of ZenGuard AI in our ZenGuard Playground. It's available to start for free to understand how our guardrails can enhance your GenAI applications.
A more detailed documentation is available at docs.zenguard.ai.
Run pen test against both ZenGuard AI and (optionally) ChatGPT.
We are using the modified version of the PromptInject as the basic framework for building prompt injections.
Note that we are always running the pentest against the most up-to-date models, such as:
- ZenGuard AI: latest release
- ChatGPT:
gpt-4-0125-preview
Pentest against ZenGuard AI:
import os
from zenguard import (
Credentials,
Detector,
Endpoint,
ZenGuard,
ZenGuardConfig,
)
if __name__ == "__main__":
api_key = os.environ.get("ZEN_API_KEY")
if not api_key:
raise ValueError("ZEN_API_KEY is not set")
config = ZenGuardConfig(credentials=Credentials(api_key=api_key))
zenguard = ZenGuard(config=config)
zenguard.pentest(endpoint=Endpoint.ZENGUARD, detector=Detector.PROMPT_INJECTION)
Pentest against ZenGuard AI and ChatGPT:
import os
from zenguard import (
Credentials,
Detector,
Endpoint,
SupportedLLMs,
ZenGuard,
ZenGuardConfig,
)
if __name__ == "__main__":
api_key = os.environ.get("ZEN_API_KEY")
openai_api_key = os.environ.get("OPENAI_API_KEY")
if not api_key or not openai_api_key:
raise ValueError("API keys are not set")
config = ZenGuardConfig(credentials=Credentials(api_key=api_key, llm_api_key=opena_api_key), llm=SupporedLLMs.CHATGPT)
zenguard = ZenGuard(config=config)
zenguard.pentest(endpoint=Endpoint.ZENGUARD, detector=Detector.PROMPT_INJECTION)
zenguard.pentest(endpoint=Endpoint.OPENAI, detector=Detector.PROMPT_INJECTION)
Clone this repo and install requirements.
Run pen test against ZenGuard AI:
export ZEN_API_KEY=your-api-key
python tests/pentest.py
Run pentest against both ZenGuard AI and ChatGPT:
export ZEN_API_KEY=your-api-key
export OPENAI_API_KEY=your-openai-api-key
python tests/pentest.py
Book a Demo or just shoot us an email to [email protected]
Topics we care about - LLM Security, LLM Guardrails, Prompt Injections, GenAI Security.
Developed with ❤️ by https://zenguard.ai/