LLM-Guard is a comprehensive tool designed to fortify the security of Large Language Models (LLMs). By offering sanitization, detection of harmful language, prevention of data leakage, and resistance against prompt injection attacks, LLM-Guard ensures that your interactions with LLMs remain safe and secure.
Project description
LLM Guard - The Security Toolkit for LLM Interactions
LLM Guard by Protect AI is a comprehensive tool designed to fortify the security of Large Language Models (LLMs).
Documentation | Playground | Changelog
What is LLM Guard?
By offering sanitization, detection of harmful language, prevention of data leakage, and resistance against prompt injection attacks, LLM-Guard ensures that your interactions with LLMs remain safe and secure.
Installation
Begin your journey with LLM Guard by downloading the package:
pip install llm-guard
Getting Started
Important Notes:
- LLM Guard is designed for easy integration and deployment in production environments. While it's ready to use out-of-the-box, please be informed that we're constantly improving and updating the repository.
- Base functionality requires a limited number of libraries. As you explore more advanced features, necessary libraries will be automatically installed.
- Ensure you're using Python version 3.9 or higher. Confirm with:
python --version
. - Library installation issues? Consider upgrading pip:
python -m pip install --upgrade pip
.
Examples:
- Get started with ChatGPT and LLM Guard.
- Deploy LLM Guard as API
Supported scanners
Prompt scanners
- Anonymize
- BanCode
- BanCompetitors
- BanSubstrings
- BanTopics
- Code
- Gibberish
- InvisibleText
- Language
- PromptInjection
- Regex
- Secrets
- Sentiment
- TokenLimit
- Toxicity
Output scanners
- BanCode
- BanCompetitors
- BanSubstrings
- BanTopics
- Bias
- Code
- Deanonymize
- JSON
- Language
- LanguageSame
- MaliciousURLs
- NoRefusal
- ReadingTime
- FactualConsistency
- Gibberish
- Regex
- Relevance
- Sensitive
- Sentiment
- Toxicity
- URLReachability
Community, Contributing, Docs & Support
LLM Guard is an open source solution. We are committed to a transparent development process and highly appreciate any contributions. Whether you are helping us fix bugs, propose new features, improve our documentation or spread the word, we would love to have you as part of our community.
- Give us a ⭐️ github star ⭐️ on the top of this page to support what we're doing, it means a lot for open source projects!
- Read our docs for more info about how to use and customize LLM Guard, and for step-by-step tutorials.
- Post a Github Issue to submit a bug report, feature request, or suggest an improvement.
- To contribute to the package, check out our contribution guidelines, and open a PR.
Join our Slack to give us feedback, connect with the maintainers and fellow users, ask questions, get help for package usage or contributions, or engage in discussions about LLM security!
Production Support
We're eager to provide personalized assistance when deploying your LLM Guard to a production environment.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llm_guard-0.3.15.tar.gz
.
File metadata
- Download URL: llm_guard-0.3.15.tar.gz
- Upload date:
- Size: 70.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e3975aa24a9b5ae22dd3fa7cbd3b893d6ad67c1f6af5994e956deb8e0169529 |
|
MD5 | d6708d68670a969b3183002ff1b7a00c |
|
BLAKE2b-256 | 7289fb5d091292b7edd74555c5e94bf7c2e584a3bf9ee39c7a48db2e87595a2a |
File details
Details for the file llm_guard-0.3.15-py3-none-any.whl
.
File metadata
- Download URL: llm_guard-0.3.15-py3-none-any.whl
- Upload date:
- Size: 138.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0eaea719c62160b0bbf96ea6f8f174ff66ade78ffda1f749d791d2608bf2d78c |
|
MD5 | 5d1f77ac0bfddbfb29513092fff0c1c5 |
|
BLAKE2b-256 | a162f93c7b0bf2ff9fe376543fd2f2c14c016f6cc574ae43cc200f00d86d58d4 |