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.
Metadata
Release files for llm-guard 0.3.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_guard-0.3.16.tar.gz | 70.2 kB | Without provenance | Details for llm_guard-0.3.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_guard-0.3.16-py3-none-any.whl | Python 3 | none | any | Details for llm_guard-0.3.16-py3-none-any.whl |
Total release size: 206.9 kB
Release files / llm_guard-0.3.16.tar.gz
| Download URL | llm_guard-0.3.16.tar.gz |
|---|---|
| Size | 70.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d9a0c4055a1ce3247f224884844f95b01a57992d5ac352924f3c018a23035ed
|
|
BLAKE2b-256 checksum How to use checksums |
52356c5a7a2ed39d1a4473ea250265df9f0a0b46d646e70550eb05f4e9f86385
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / llm_guard-0.3.16-py3-none-any.whl
| Download URL | llm_guard-0.3.16-py3-none-any.whl |
|---|---|
| Size | 136.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6220b665e26eb57bd207813bfadda8af4b4d38c95fd6406656aa6492101714c
|
|
BLAKE2b-256 checksum How to use checksums |
8b735ad5f847b36410421eae4e0ff0397977eb1fb3513ed1446c14ce771fccf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Security for llm-guard 0.3.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.