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
Akto LLM Guard
LLM-Guard is a comprehensive tool designed to fortify the security of Large Language Models (LLMs).
Features
- Prompt Injection Detection: Detect and prevent prompt injection attacks
- PII Detection: Identify and handle personally identifiable information
- Toxicity Detection: Filter harmful and toxic content
- Code Detection: Identify and manage code in prompts
- Data Leakage Prevention: Prevent sensitive information leakage
- URL Scanning: Detect malicious URLs in outputs
- Bias Detection: Identify biased content in model outputs
Installation
pip install akto-llm-guard
For ONNX runtime support:
pip install akto-llm-guard[onnxruntime]
For GPU support:
pip install akto-llm-guard[onnxruntime-gpu]
Quick Start
from llm_guard.input_scanners import PromptInjection
scanner = PromptInjection()
sanitized_prompt, is_valid, risk_score = scanner.scan("Your prompt here")
if is_valid:
print("Prompt is safe")
else:
print(f"Prompt failed security check. Risk score: {risk_score}")
Repository
GitHub: https://github.com/akto-api-security/llm-guard
License
MIT License
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file akto_llm_guard-0.3.17.tar.gz.
File metadata
- Download URL: akto_llm_guard-0.3.17.tar.gz
- Upload date:
- Size: 67.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ce8f0f4ea3500ab07c915b878b48261bca81103dfc383efbc9239d62af368f3
|
|
| MD5 |
63357f716ee6474f772be3cfd82b75e8
|
|
| BLAKE2b-256 |
f79a6191daf99f197f331183943fbff30422c1ea24e951097b5f4b293ee4b44b
|
File details
Details for the file akto_llm_guard-0.3.17-py3-none-any.whl.
File metadata
- Download URL: akto_llm_guard-0.3.17-py3-none-any.whl
- Upload date:
- Size: 139.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76997bc20b5fb75a0f5c63b05fe8c0b165241e17adcb4bc5473e0aec8376c09d
|
|
| MD5 |
7a1f062348503af19cf4168539e9ff8e
|
|
| BLAKE2b-256 |
246a888b627a8f34766c83fb2945ff7ad0fa6cddd5c357708b2450081aefc0cc
|