Performance issues

Updated at:

Common issues with detection performance when you use the AI Guardrails API.

Why is normal text identified as abusive content? Why is abusive content not detected?

Abusive text is classified into three severity categories: severe abuse, minor abuse, and profanity. Adjust the machine-assisted moderation rules for text in the console to fit your scenario. If specific text is not detected or is misidentified, add it to a custom similar text library or keyword library, and then use an ignore list or a review list to resolve the issue.

For more information, see Customize machine-assisted moderation rules and Manage custom text libraries.

Why is normal text identified as pornographic content? Why is pornographic content not detected?

Pornographic text is classified into three severity categories: severe pornography, vulgar content, and sexual knowledge. Adjust the machine-assisted moderation rules for text in the console to fit your scenario. If specific text is not detected or is misidentified, add it to a custom similar text library or keyword library, and then use an ignore list or a whitelist to resolve the issue.

For more information, see Customize machine-assisted moderation rules and Manage custom text libraries.

Why are keywords such as QR codes not detected during text moderation?

The text advertisement detection scenario detects content such as phone numbers, WeChat, QQ, URLs, and ad slogans. Adjust the machine-assisted moderation rules for text in the console to suit your scenario. If specific text is not detected, add it to a custom similar text library or keyword library, and then use a blacklist or a review list to resolve the issue.

For more information, see Customize machine-assisted moderation rules and Manage custom text libraries.

Why are pornographic images not detected during image moderation?

The pornography detection scenario classifies images into three categories based on explicitness: explicit pornography, vulgarity, and suggestive exposure. Adjust the machine-assisted moderation rules for images in the console. If a specific image is not detected, add it to a custom image library, select the pornography detection scenario, and then use a blacklist or a review list to resolve the issue.

For more information, see Customize machine-assisted moderation rules and Manage custom text libraries.

Why are whitelisted keywords still blocked?

A custom text library may not take effect for the following reasons:

  • It takes about 15 minutes for added keywords to take effect. Try again later.

  • Confirm how the text library is used:

    • For content with five or fewer characters, use the Keywords option. Set the matching method to Transform then Match.

    • For content with more than five characters, use the Similar Text option.

  • Make sure that the text library is applied to the corresponding business scenario (Biztype).

For more information, see Manage custom text libraries.

Why are images with national flags and emblems not blocked?

AI Guardrails provides several detection scenarios, such as pornography detection, terrorist content, text and image violations, and undesirable scenes. To block content such as national flags and emblems, use the terrorist content detection scenario. This scenario detects several types of content, including people, symbols, weapons, events, religion, official business, and certificates. Adjust the machine-assisted moderation rules for images in the console. In the Symbol Detection category, select the national flag and emblem. You must also specify the terrorist content detection scenario in the AI Guardrails API.

For more information, see Customize machine-assisted moderation rules and Synchronous detection.

How do I handle medical images of human bodies that are identified as pornographic?

The pornography detection feature of AI Guardrails may incorrectly classify medical images as pornographic content. If an image is misclassified, use its data ID (dataId) to perform a manual review. The dataId is returned by the synchronous image detection API and the manual image review API.

For more information, see the synchronous image detection API or the manual image review API.

Why are Content Moderation detection results unstable, or why does content remain blocked after whitelisting or manual correction?

Detection results may appear inconsistent or may not respond to whitelist rules and manual corrections due to several factors. The following describes the three most common scenarios.

Scenario 1: Whitelist or manual correction not taking effect

If you have configured a whitelist entry or submitted a manual correction, but the content continues to be blocked, possible causes include:

  • Data synchronization delay: Whitelist rules and manual corrections typically take up to 15 minutes to propagate. Confirm your configuration is correct and wait 15 minutes, then retest.

  • Backend configuration anomaly: If the content is still blocked after 15 minutes, submit a support ticket and include the RequestID of the affected request so the backend team can investigate.

You can also upgrade to Content Moderation Enterprise Edition, which supports custom detection rules for more precise and controllable enforcement.

Scenario 2: Inconsistent detection results for the same image

The same image may receive different detection results on separate calls. This can be caused by:

  • Dynamic adjustment of backend detection policies.

  • AI model updates or optimization.

Recommended action: Call the detection API again with the same image to verify the latest result. If the inconsistency persists, include the latest RequestID in your feedback ticket so the backend team can investigate.

Scenario 3: Specific RequestID shows missed detections or false positives

If content that should be blocked passes through (missed detection), or if valid content is incorrectly flagged—for example, as political content, pornography, or drug-related content (false positive)—possible causes include:

  • Special detection policies active during sensitive time periods.

  • AI model recognition bias.

  • Backend configuration issues.

Recommended action: Retest the content to confirm whether the issue is reproducible. If the issue persists, include the latest RequestID in your feedback ticket. The backend team will perform policy adjustment or model fine-tuning as needed.

Why is a violation not detected when it is spaced out or embedded in long text?

Scenario 1: Text miss caused by inserted digits, special characters, separators, or embedding in long text

When a prohibited term is altered by inserting digits, symbols, or spaces, it may not be matched. In Risk Libraries > Custom Text Library, add the variant terms and, when you create or edit the library, set the Match Mode to Check after Preprocess Texts (before matching, the system converts traditional Chinese to simplified, uppercase to lowercase, and symbol-form digits to plain digits). A rule change takes about 2 to 5 minutes to take effect; a text library change takes about 5 minutes. Wait, then call the detection API again to verify. If the configuration is correct but the miss persists, submit a ticket with the request RequestID so technical support can check the detection policy.

Prohibited content embedded in long text

For long text (more than 20 characters), use similar text moderation. The system uses a similarity algorithm to match the text, which is better suited than keyword matching for identifying prohibited expressions embedded in long passages.

Scenario 2: The violation is text inside an image

In Online test, whether text inside an image is moderated depends on the detection scopes that the service you call supports. In Image Moderation > Rule Configuration > Moderation Scope, confirm whether the current service includes an image-text Detection Scope (its label value ends with _tii and it is configured with a keyword library), and verify by selecting Text Information in Online Test.

Why does Content Moderation return a violation label (such as political_a) without specifying the exact content?

Label meaning

political_a is a second-level label in the political scenario. In the console its Meaning is "political special safeguard enhancement" and its Detection Scope is "a political special-safeguard policy launched for specific time periods". Such special labels also include political_accidents and project_specialGuard. You can view the meaning and detection scope of each label under Text Moderation > Rule Configuration by using the row action View Labels.

Why the response may contain no specific matched content

Different detection objects return different levels of detail: the riskWords field appears only in the details of document detection results, whereas text detection result details show the matched labels and the full response. It is therefore normal for some labels to return only the label value without a specific matched snippet; this does not affect the risk verdict.

How to view and give feedback

Open the record details under Result Query to view the request RequestID, service, risk level, matched labels, and the copyable full response. If the label affects normal business and you have confirmed the content is not a violation, select No violation false alarm under Feedback results for that record; if further investigation is needed, submit a ticket with the RequestID.

Why is content still blocked after I disabled a specific policy (such as political_a), or why is normal text misjudged as sensitive?

Possible causes for continued blocking

  1. Configuration not yet effective: a rule change takes about 2 to 5 minutes (a keyword library about 5 minutes) to take effect. Wait, then retest.

  2. The scope is red-line controlled and cannot be disabled: if the Detection Status toggle of that Detection Scope is grayed out with the tip "This detection is red-line controlled content and cannot be disabled. If you need tuning for a performance issue, contact us", you cannot disable it in the console and must submit a ticket. The non-disable list is delivered per service by the backend; rely on whether the toggle is clickable.

  3. Other high-risk labels are also matched: if the matched label's score falls in the High Risk Score range, or other high-risk labels are matched, a high-risk result is still returned.

Normal text misjudged (for example a date judged as high-risk political)

No extra console setting is required, and there is no front-end correction entry for a single case. Submit a No violation false alarm feedback under Feedback results with the RequestID for backend policy optimization, then monitor subsequent detections. You can also manage variant terms in Risk Libraries > Custom Text Library.

What should I do if AI Guardrails fails to block prompt attacks, medical advice, copyright infringement, or other specific risks?

This item applies to Model Protection in AI Guardrails. Console path: AI Guardrails > Protection Configuration > Model Protection > Configuration Management for the target service.

  1. Check whether detection items are enabled: text detection items include Content Moderation, Sensitive Data, Prompt Attack, Malicious URL, Malicious File, model hallucination, digital watermark, custom desensitization, custom detection agent, known IP detection agent, and desensitized data restoration; at least one of Content Moderation, Sensitive Data, and Prompt Attack must be enabled. "Medical advice" and "copyright/IP" are not standalone items: copyright and IP semantics live in the sub-labels of Sensitive Data, and medical semantics live in the advertising-compliance sub-labels of Content Moderation.

  2. Adjust detection strength: tune the Low Risk Score, Medium Risk Score, and High Risk Score, or the Label Level and Disposition (observe, mask, block).

    Detection item

    Adjustable setting

    Values

    Model Hallucination

    Hallucination Detection Level

    60–100. Default value: 60. A model response is classified as a hallucination when the score returned by the model exceeds the configured threshold.

  3. Use custom capabilities: for scenarios the baseline does not cover, use a custom detection agent (fill in the label and description, then Test and Publish; about 2 to 5 minutes to take effect), or add keywords under Knowledge Base Management > Lexicon Management > Keyword Library Management (effective only for Content Moderation; up to 100,000 keywords and 20 libraries per account).

  4. Report missed detections: submit a Missed Violation feedback under Result Query for the missed record.

  5. View detection logs: under AI Guardrails > Log Analysis > Model Protection (enable it separately), filter by request RequestID, service, suggestion (block, pass, watch, mask), and protection dimension to confirm whether the request triggered the corresponding item.

Note

Log Analysis does not expose confidence scores, and some regions do not provide the custom detection agent.

Why do the matched risk words (riskWords) differ in simplified or traditional form from the original text?

The matched-word field in text detection results is riskWords in the console. When you set the Match Mode of a Custom Text Library (under Risk Libraries) to Check after Preprocess Texts , the system converts traditional Chinese to simplified, uppercase to lowercase, and symbol-form digits to plain digits before matching. As a result, the returned matched word takes the form stored in the library and may differ from the original text; this does not affect the violation verdict. You can review the full response in the Result Query details to check the matched words and the risk level.