Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akto_llm_guard-0.3.16.tar.gz (67.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

akto_llm_guard-0.3.16-py3-none-any.whl (139.4 kB view details)

Uploaded Python 3

File details

Details for the file akto_llm_guard-0.3.16.tar.gz.

File metadata

  • Download URL: akto_llm_guard-0.3.16.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

Hashes for akto_llm_guard-0.3.16.tar.gz
Algorithm Hash digest
SHA256 286384429b5cd384f16c4a98a14b277bb735c57eb46dcb8298bfaef02fdf1407
MD5 51e36e7fc1b22b5c8e937083590a80ee
BLAKE2b-256 58564b10abc3bf6463624196b6271135b2ef310d5707be480fae8ce6f3f69bab

See more details on using hashes here.

File details

Details for the file akto_llm_guard-0.3.16-py3-none-any.whl.

File metadata

File hashes

Hashes for akto_llm_guard-0.3.16-py3-none-any.whl
Algorithm Hash digest
SHA256 ab5959123f3c501584281c4f61b60a21449b3b8ead8a2e696bf22ffbea906704
MD5 a4037ff35036987dda6ce0c6d6543c08
BLAKE2b-256 76092fb2721da7564eb2489a0f2a4204890ae919698667ae23066ebabfd15bb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page