A collection of detector algorithms and microservices that are supported by the TrustyAI team.
Project description
Detector Algorithms for the FMS Guardrails Orchestrator
FMS Guardrails Orchestrator is an open source project led by IBM which provides a server for invocation of detectors on text generation input and output, and standalone detections.
This repository is intended to provide a collection of detector algorithms and microservices that are supported by the TrustyAI team.
Detectors
At the moment, the following detectors are supported:
huggingface-- a generic detector class that is intended to be compatible with any AutoModelForSequenceClassification or a specific kind of AutoModelForCausalLM, namely GraniteForCausalLM; this detector exposes/api/v1/text/contentsand thus, could be configured to be a detector of type:text_contentswithin the FMS Guardrails Orchestrator framework. This detector is also intended to be deployed as a KServe inference service.llm_judge-- Integrates the vLLM Judge library to use LLM-as-a-judge based guardrailing architecturebuiltIn-- Small, lightweight detection functions that are deployed out-of-the-box alongside the Guardrails Orchestrator. The built-in detectors provide a number of heuristic or algorithmic detection functions, such as:- Regex-based detections, with pre-written regexes for flagging various Personally Identifiable Information items like emails or phone numbers, as well as the ability to provide custom regexes
- File-type validations, for verifying if model input/output is valid JSON, XML, or YAML
Building
huggingface: podman build -f detectors/Dockerfile.hf detectorsllm_judge: podman build -f detectors/Dockerfile.llm_judge detectorsbuiltIn: podman build -f detectors/Dockerfile.builtIn detectors
Running locally
builtIn: podman run -p 8080:8080 $BUILT_IN_IMAGE
Examples
- Check out built-in detector examples to see how to use the built-in detectors for file type validation and personally identifiable information (PII) detection
- Check out Hugging Face detector examples to see how to use the Hugging Face detectors for detecting toxic content and prompt injection
API
See IBM Detector API
License
This project is licensed under the Apache License Version 2.0 - see the LICENSE file for details.
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 guardrails_detectors-0.1.0.tar.gz.
File metadata
- Download URL: guardrails_detectors-0.1.0.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/8.7.0 pkginfo/1.12.1.2 requests/2.32.4 requests-toolbelt/1.0.0 tqdm/4.67.1 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9882abab61bc1c3d774f2a3879059685eadec80600bcb9c8999e666883debb5a
|
|
| MD5 |
ce2fde74981f0d411e7c17fa94dc64e7
|
|
| BLAKE2b-256 |
a60be5f0f4911d38b40c6a187c41e3fd17ef3986dbcf0dce4b318e1d17cf5feb
|
File details
Details for the file guardrails_detectors-0.1.0-py3-none-any.whl.
File metadata
- Download URL: guardrails_detectors-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/8.7.0 pkginfo/1.12.1.2 requests/2.32.4 requests-toolbelt/1.0.0 tqdm/4.67.1 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47731ef4b5c7c610dc39b2f8e1ccc4f8a71696b6012c1a46ecd9153aa08ae70c
|
|
| MD5 |
72961a3b7a1112810c1c5ea58e192726
|
|
| BLAKE2b-256 |
3fcb9d30a2329df7d6bf07cfea9f8ca5bd28c77ec80ce0d7aa220129fb9c124f
|