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.
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/contents
and thus, could be configured to be a detector of type:text_contents
within 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
huggingface
: podman build -f detectors/Dockerfile.hf detectorsllm_judge
: podman build -f detectors/Dockerfile.llm_judge detectorsbuiltIn
: podman build -f detectors/Dockerfile.builtIn detectors
builtIn
: podman run -p 8080:8080 $BUILT_IN_IMAGE
- 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
See IBM Detector API
This project is licensed under the Apache License Version 2.0 - see the LICENSE file for details.