Skip to main content

Detects toxic language in LLM-generated text using an LLM as the detection backbone. Evaluates text across seven toxicity categories: toxicity, severe toxicity, obscene, threat, insult, identity attack, and sexual explicit content.

Project description

guardrails-ai-toxic-language-llm

Detects toxic language in LLM-generated text using an LLM as the detection backbone. Evaluates text across seven toxicity categories: toxicity, severe toxicity, obscene, threat, insult, identity attack, and sexual explicit content.

Installation

pip install guardrails-ai-toxic-language-llm

This validator ships local models. After installing, run the post-install step to download them:

python -m guardrails_ai.toxic_language_llm.post_install

Usage

from guardrails import Guard
from guardrails_ai.toxic_language_llm import ToxicLanguageLLM

guard = Guard().use(ToxicLanguageLLM)

License

MIT — © Guardrails AI.

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

guardrails_ai_toxic_language_llm-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file guardrails_ai_toxic_language_llm-0.1.0.tar.gz.

File metadata

File hashes

Hashes for guardrails_ai_toxic_language_llm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 88f20ff1f1196da9db114bd2f5888ead742fb8b5b942b1545d82f8712c9ed6ba
MD5 9b7ffa4953bac65862c5f71df8154aa2
BLAKE2b-256 c46bc88e2fcd3d5dd4815c0834c788449211b85d32f1d8748ef20764dd6fb6d5

See more details on using hashes here.

File details

Details for the file guardrails_ai_toxic_language_llm-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for guardrails_ai_toxic_language_llm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 491bb128d53cb118980f235379e80a41e6b8b8eaaf15157249fea44422955006
MD5 2947b7b7719702cb60381cca5be5173a
BLAKE2b-256 138267fe2716abc74523e308d5042f3712014f5da1e1cb230fa61ed859c28628

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