Third-Party APIs#
Third-party APIs connect with managed services for a wide variety of guardrail use cases. Combine techniques across the guardrail ecosystem for a best-of-breed approach.
ActiveFence#
The NeMo Guardrails library supports using the ActiveFence ActiveScore API as an input and output rail out-of-the-box (you need to have the ACTIVEFENCE_API_KEY environment variable set).
Example usage#
rails:
input:
flows:
- activefence moderation on input
output:
flows:
- activefence moderation on output
For more details, check out the ActiveFence Integration page.
AutoAlign#
The NeMo Guardrails library supports using the AutoAlign’s guardrails API (you need to have the AUTOALIGN_API_KEY environment variable set).
Example usage#
rails:
input:
flows:
- autoalign check input
output:
flows:
- autoalign check output
For more details, check out the AutoAlign Integration page.
Clavata#
The NeMo Guardrails library supports using Clavata AI as an input and output rail out-of-the-box (you need to have the CLAVATA_API_KEY environment variable set).
Example usage#
rails:
config:
clavata:
policies:
Fraud: 00000000-0000-0000-0000-000000000000
Bot_Behavior: 00000000-0000-0000-0000-000000000000
label_match_logic: ANY
For more details, check out the Clavata Integration page.
Cleanlab#
The NeMo Guardrails library supports using the Cleanlab Trustworthiness Score API as an output rail (you need to have the CLEANLAB_API_KEY environment variable set).
Example usage#
rails:
output:
flows:
- cleanlab trustworthiness
For more details, check out the Cleanlab Integration page.
GCP Text Moderation#
The NeMo Guardrails library supports using the GCP Text Moderation. You need to be authenticated with GCP, refer here for auth details.
Example usage#
rails:
input:
flows:
- gcpnlp moderation
For more details, check out the GCP Text Moderation page.
GuardrailsAI Integration#
The NeMo Guardrails library supports using GuardrailsAI validators for comprehensive input and output validation. GuardrailsAI provides a wide range of validators for content safety, PII detection, toxic language filtering, jailbreak detection, and more.
Example usage#
rails:
config:
guardrails_ai:
validators:
- name: toxic_language
parameters:
threshold: 0.5
- name: guardrails_pii
parameters:
entities: ["phone_number", "email", "ssn"]
input:
flows:
- guardrailsai check input $validator="guardrails_pii"
output:
flows:
- guardrailsai check output $validator="toxic_language"
For more details, check out the GuardrailsAI Integration page.
Fiddler Guardrails for Safety and Hallucination Detection#
The NeMo Guardrails library supports using Fiddler Guardrails for safety and hallucination detection in input and output flows.
In order to access Fiddler guardrails, you need access to a valid Fiddler environment, and a Fiddler environment key. You’ll need to set the FIDDLER_API_KEY environment variable to authenticate into the Fiddler service.
rails:
config:
fiddler:
server_endpoint: https://testfiddler.ai # Replace this with your fiddler environment
Example usage#
rails:
config:
fiddler:
fiddler_endpoint: https://testfiddler.ai # Replace this with your fiddler environment
input:
flows:
- fiddler user safety
output:
flows:
- fiddler bot safety
- fiddler bot faithfulness
For more details, check out the Fiddler Integration page.
Prompt Security Protection#
The NeMo Guardrails library supports using Prompt Security API for protecting input and output retrieval flows.
To activate the protection, you need to set the PS_PROTECT_URL and PS_APP_ID environment variables.
Example usage#
rails:
input:
flows:
- protect prompt
output:
flows:
- protect response
For more details, check out the Prompt Security Integration page.
CrowdStrike AIDR#
The NeMo Guardrails library supports using CrowdStrike AIDR for protecting data and interactions with LLMs within AI-powered applications.
Example usage#
rails:
input:
flows:
- crowdstrike aidr guard input
output:
flows:
- crowdstrike aidr guard output
For more details, check out the CrowdStrike AIDR Integration page.
Pangea AI Guard#
Warning: The Pangea AI Guard integration is deprecated and will be removed in a future release. Users should migrate to the CrowdStrike AIDR integration.
The NeMo Guardrails library supports using Pangea AI Guard for protecting data and interactions with LLMs within AI-powered applications.
Example usage#
rails:
input:
flows:
- pangea ai guard input
output:
flows:
- pangea ai guard output
For more details, check out the Pangea AI Guard Integration page.
Trend Micro Vision One AI Application Security#
The NeMo Guardrails library supports using Trend Micro Vision One AI Guard for protecting input and output flows within AI-powered applications.
Example usage#
rails:
input:
flows:
- trend ai guard input
output:
flows:
- trend ai guard output
For more details, check out the Trend Micro Vision One AI Application Security page.
Cisco AI Defense#
The NeMo Guardrails library supports using Cisco AI Defense Inspection for protecting input and output flows.
To activate the protection, you need to set the AI_DEFENSE_API_KEY and AI_DEFENSE_API_ENDPOINT environment variables.
Example usage#
rails:
input:
flows:
- ai defense inspect prompt
output:
flows:
- ai defense inspect response
For more details, check out the Cisco AI Defense Integration page.