All Products
Search
Document Center

AI Guardrails:Configure check items

Last Updated:Sep 17, 2026

Detection item configuration is used to manage detection services and protection dimensions for AI Guardrails. This topic describes how to view the Service list, enable protection dimensions, and configure detection rules and vocabularies in the console.

Procedure

  1. Log on to the AI Guardrails console.

  2. In the left-side navigation pane, choose Protection Config > Model Protection.

    If you previously configured detection items under Detection item configuration, the same capability is now available under Protection Config > Model Protection. Follow the paths described in this topic.

    The Model Protection list displays the available Services:

    • AI input content moderation (query_security_check_intl): detects text content submitted to the large model.

    • AI-generated content moderation (response_security_check_intl): detects text content generated by the large model.

    • AIGC Input Image Security Detection (img_query_security_check_intl): detects image content submitted by users.

    • AIGC Image Security Detection (img_response_security_check_intl): detects image content generated by the large model.

  3. In the Actions column of the target Service, click Configuration to go to the configuration page of that Service.

  4. In the Protection Dimension area, view the detection capabilities supported by the current Service. Each protection dimension is displayed as a card with a toggle to enable or disable the feature.

    Text-based Services support the following protection dimensions:

    • Content Compliance: detects pornographic, violent, political, and other undesirable content. Enabled by default.

    • Sensitive content detection: detects personal information or enterprise sensitive data that may be leaked.

    • Prompt injection detection: detects malicious prompts designed to bypass the safety limits of large models.

    • Malicious URL (public preview): scans content from large models for malicious links.

    • Model Hallucination (public preview): detects false or inaccurate information generated by large models. After you enable this dimension, you must also pass referenceContent (the reference content for comparison with the content to be detected) in the request parameters when you call the multi-modal real-time moderation API of AI Guardrails. Otherwise, no model hallucination detection results are returned. For parameter descriptions and request examples, see Multimodal API integration guide.

    Note

    Enabling Sensitive content detection or Prompt injection detection incurs separate charges. For details, see Activation and billing.

  5. Vocabulary settings: In the Model Protection list, click Set keyword library for a text-based Service to configure blocklist or allowlist vocabularies. In Mitigation Settings, you can only associate an existing vocabulary, image library, or answer library with a specific Service. To create, edit, or delete these libraries, go to knowledge base management. For vocabulary operations, choose knowledge base management > Vocabulary management. For details, see Vocabulary management.

Configuration management

On the configuration page of that Service, click Configuration Management on a Protection Dimension card to configure the detection toggles and detailed rules for each risk tag under that dimension.

Take AI input content moderation (query_security_check_intl) as an example. In the Model Protection list, click Configuration in the Actions column.

  1. In the Protection Dimension area, click Configuration Management on the target dimension card (for example, Content compliance).

  2. Select the detection type to adjust, click Edit to enter edit mode, and modify the detection status.

    Note

    Difference between baseline rules and independent rules update mechanism

    • Using baseline rules directly: Detection capabilities automatically sync to the latest version as official updates are released. No manual adjustment is required.

    • Independent rules created by copying a Service: Updates to baseline rules do NOT automatically sync to copied independent rules. The independent rules retain their original configuration. To use the latest strategy on an independent rule, you must manually edit and synchronize the configuration. When you copy a Service, the new Service's configuration (including billing method, configurable items, and custom vocabulary settings) is the same as the source Service.

  3. Click Save. Changes take effect in approximately 2 to 5 minutes.

    Important

    Policy adjustment delay notice

    Due to the delay in policy propagation, testing immediately after a configuration change may produce inconsistent results or false positives (for example, phone numbers being incorrectly blocked). Wait for a period of time after modifying a policy before re-sending requests to verify that the latest policy has taken effect.

FAQ

What is the difference between desensitization, blocking, and observation for sensitive data detection?

In sensitive data detection configuration, you can configure the following three handling methods for each sensitive data tag:

  • Desensitization (Masking): Applies masking to detected sensitive data before outputting it. For example, a phone number 13812345678 is displayed as 1**********8, preserving the format without exposing the complete information.

  • Blocking: Directly intercepts the request. No original content is returned; instead, a block message is displayed. Suitable for scenarios with zero tolerance for sensitive data exposure.

  • Observation: Only performs detection logging without any interception. The content is output normally without modification or blocking. Suitable for the testing phase or when you need to understand the distribution of sensitive data before enabling active protection.

Can RAM users independently manage AI Guardrails configurations?

AI Guardrails configurations (such as detection rules and vocabularies) are managed centrally by the primary Alibaba Cloud account. RAM users cannot configure them independently.

All RAM users share the same set of mitigation policies and quotas. Configuration changes must be performed by the primary account (or a RAM user with the corresponding permissions) in the console. Each RAM user can only call APIs with authorized permissions.