Pangea AI Guard helps analyze and redact text to prevent model manipulation and malicious content.
Pangea provides AI Guard service for scanning LLM inputs and outputs to avoid manipulation of the model, addition of malicious content, and other undesirable data transfers.
To get started with Pangea, visit their documentation:
3. Add Guardrail ID to a Config and Make Your Request
When you save a Guardrail, you’ll get an associated Guardrail ID - add this ID to the input_guardrails or output_guardrails params in your Portkey Config
Create these Configs in Portkey UI, save them, and get an associated Config ID to attach to your requests. More here.
Your requests are now guarded by Pangea AI Guard and you can see the Verdict and any action you take directly on Portkey logs! More detailed logs for your requests will also be available on your Pangea dashboard.
You can define Pangea guardrails directly in your code for more programmatic control without using the Portkey UI. This “raw guardrails” approach lets you dynamically configure guardrails based on your application’s needs.
We recommend that you create guardrails using the Portkey UI whenever possible. Raw guardrails are more complex and require you to manage credentials and configurations directly in your code.
When using raw guardrails, you must provide valid credentials for the Pangea service directly in your config. Make sure to handle these credentials securely and consider using environment variables or secrets management.