Skip to main content
Qualifire offers a comprehensive suite of AI safety and quality guardrails that help ensure your AI applications are safe, compliant, and high-quality. The platform provides 20+ different guardrail checks covering content safety, AI quality, and compliance requirements.
1

Add Qualifire Credentials to Portkey

Add your Qualifire API key to Portkey:
  1. Click on the Admin Settings button on Sidebar
  2. Navigate to Plugins tab under Organisation Settings
  3. Click on the edit button for the Qualifire integration
  4. Add your Qualifire API Key - obtain this from your Qualifire account at https://app.qualifire.ai/settings/api-keys/
2

Add Qualifire's Guardrail Checks

Create and configure guardrails:
  1. Navigate to the Guardrails page and click the Create button
  2. Search for any of the Qualifire guardrail checks and click Add
  3. Configure the specific parameters for your chosen guardrail
  4. Set any actions you want on your check, and create the Guardrail!
Guardrail Actions allow you to orchestrate your guardrails logic. You can learn more about them in the Portkey Guardrails documentation.
3

Add Guardrail ID to Config

Add the Guardrail ID to your Portkey Config:
  1. When you save a Guardrail, you’ll get an associated Guardrail ID
  2. Add this ID to the input_guardrails or output_guardrails params in your Portkey Config
  3. Create these Configs in Portkey UI, save them, and get an associated Config ID to attach to your requests
4

Make Your Request

Use your Config ID in your requests. Your requests are now protected by Qualifire’s comprehensive guardrail system!
For more details on Configs, refer to the Portkey Config documentation.

Available Guardrail Checks

Qualifire provides a comprehensive set of guardrail checks organized into five main categories:

Configuration Examples

Mode Parameter

Several guardrail checks support a mode parameter that controls the trade-off between accuracy and speed:
  • quality: Highest accuracy, slower processing
  • balanced: Good balance between accuracy and speed (default)
  • speed: Fastest processing, lower accuracy

Policy Violations Check

For the Policy Violations Check, you can specify custom policies to enforce, the mode, and the target:

Parameters

  • policies (required): Array of strings defining custom policies to enforce
  • mode (optional): One of quality, balanced, or speed. Default: balanced
  • policy_target (optional): One of input, output, or both. Specifies whether to run the policy check on the request, response, or both. This must match the configured hooks:
    • input: Only for beforeRequestHook
    • output: Only for afterRequestHook
    • both: For both beforeRequestHook and afterRequestHook

Use Cases

Content Moderation

Filter harmful or inappropriate content in user inputs and AI responses

Compliance

Ensure AI responses adhere to company policies and regulatory requirements

Quality Assurance

Detect hallucinations, instruction violations, and poor tool usage

Data Protection

Prevent PII exposure and ensure data privacy

Observability

You can see the verdict and any actions taken directly in your Portkey logs! Monitor guardrail results to understand how your AI applications are performing and identify areas for improvement.
Start with a monitor action on your guardrails to observe results before switching to block in production. This helps you tune thresholds without disrupting users.

Get Support

If you face any issues with the Qualifire integration, join the Portkey community forum for assistance. For Qualifire-specific support, visit the Qualifire Documentation or contact the Qualifire support team.

Additional Resources