Third-Party APIs

View as Markdown

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

1rails:
2 input:
3 flows:
4 - activefence moderation on input
5 output:
6 flows:
7 - activefence moderation on output

For more details, check out the ActiveFence Integration page.

PolicyAI

The NeMo Guardrails library supports using PolicyAI by Musubi Labs as an input and output rail out-of-the-box (you need to have the POLICYAI_API_KEY environment variable set).

PolicyAI provides policy-based content moderation, allowing you to define custom policies and organize them with tags for environment-based management.

Example usage

1rails:
2 input:
3 flows:
4 - policyai moderation on input
5 output:
6 flows:
7 - policyai moderation on output

For more details, check out the PolicyAI 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

1rails:
2 input:
3 flows:
4 - autoalign check input
5 output:
6 flows:
7 - 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

1rails:
2 config:
3 clavata:
4 policies:
5 Fraud: 00000000-0000-0000-0000-000000000000
6 Bot_Behavior: 00000000-0000-0000-0000-000000000000
7 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

1rails:
2 output:
3 flows:
4 - 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

1rails:
2 input:
3 flows:
4 - 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

1rails:
2 config:
3 guardrails_ai:
4 validators:
5 - name: toxic_language
6 parameters:
7 threshold: 0.5
8 - name: guardrails_pii
9 parameters:
10 entities: ["phone_number", "email", "ssn"]
11 input:
12 flows:
13 - guardrailsai check input $validator="guardrails_pii"
14 output:
15 flows:
16 - 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.

1rails:
2 config:
3 fiddler:
4 server_endpoint: https://testfiddler.ai # Replace this with your fiddler environment

Example usage

1rails:
2 config:
3 fiddler:
4 fiddler_endpoint: https://testfiddler.ai # Replace this with your fiddler environment
5 input:
6 flows:
7 - fiddler user safety
8 output:
9 flows:
10 - fiddler bot safety
11 - 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

1rails:
2 input:
3 flows:
4 - protect prompt
5 output:
6 flows:
7 - 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

1rails:
2 input:
3 flows:
4 - crowdstrike aidr guard input
5
6 output:
7 flows:
8 - 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

1rails:
2 input:
3 flows:
4 - pangea ai guard input
5
6 output:
7 flows:
8 - 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

1rails:
2 input:
3 flows:
4 - trend ai guard input
5 output:
6 flows:
7 - 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

1rails:
2 input:
3 flows:
4 - ai defense inspect prompt
5
6 output:
7 flows:
8 - ai defense inspect response

For more details, check out the Cisco AI Defense Integration page.