Content Moderation uses the default moderation policy of Alibaba Cloud for machine-assisted moderation. If you find that the default moderation policy cannot meet your business needs during testing, you can customize policies for machine-assisted moderation based on the templates provided by Content Moderation. This topic describes how to customize a policy for machine-assisted moderation.

Background information

Currently, Content Moderation provides templates for you to customize policies for moderating images for pornographic content and terrorist content.

Before you customize a policy for machine-assisted moderation, get familiar with the following concepts:

  • bizType: the business scenario. Moderation policies are customized based on the bizType setting. Each bizType setting corresponds to a moderation policy. If you do not customize moderation policies, the default bizType setting and corresponding default moderation policy are used. After you add a bizType setting, you can use the bizType setting to specify the bizType parameter in an API request for content moderation. In this case, the corresponding moderation policy takes effect.
  • Accuracy rate: the ratio of the number of objects that are detected as violations by machine-assisted moderation and tagged as violations by human review to the number of objects that are detected as violations by machine-assisted moderation.
  • Detection rate: the ratio of the number of objects that are detected as violations by machine-assisted moderation and tagged as violations by human review to the number of objects that are tagged as violations by human review.
  • Review rate: the ratio of the number of objects that are detected as suspected violations by machine-assisted moderation to the total number of moderated objects.

Procedure

  1. Log on to the Alibaba Cloud Content Moderation console.
  2. In the left-side navigation pane, choose Settings > Moderation API. The Moderation Policy tab of the Moderation API page appears.
  3. On the Moderation Policy tab, click the Create bizType icon for the first time. Click Add new BizType if you have created a bizType setting.Moderation Policy tab
  4. In the Add new BizType dialog box that appears, set relevant parameters and click OK. The following table describes the parameters.
    Parameter Description
    Name The name of the bizType setting. The name can contain digits, letters, and underscores (_). It can be up to 32 characters in length.
    Import You can import an existing bizType setting.
    Add a bizType setting
    The bizType setting is created. You can view the created bizType setting in the left-side list.
  5. Click the tab of the created bizType setting and customize a moderation policy.
    The moderation policy template varies with the moderation scenario. For more information, see the templates in the console. Currently, you can only customize the moderation policy to moderate images for pornographic content and terrorist content. The following table describes the configuration of the moderation policy.
    Moderation object Moderation scenario Moderation policy Description
    Image Pornography detection The moderation rule for pornography detection. You can select only one rule. Valid values:
    • Rules for High Detection Rate
    • Rules for High Accuracy Rate
    • Rules for porn detected and sexy ignored
    When you call an API operation to moderate images for pornographic content, set the scenes parameter to porn in the API request. In this case, the moderation policy takes effect. For more information, see Moderate images synchronously.
    Image Terrorist content detection The scenarios to be controlled for terrorist content detection. You can select one or more scenarios. Valid values:
    • Politics
    • Logo
    • Outfit
    • Guns
    • Weapons
    • Badges
    • Money
    • Bloody
    When you call an API operation to moderate images for terrorist content, set the scenes parameter to terrorism in the API request. In this case, the moderation policy takes effect. For more information, see Moderate images synchronously.
  6. After the configuration is completed, click Save.

Result

The moderation policy is customized.

What to do next

Inform developers of the bizType setting of the moderation policy to be applied. Then, the developers can use the bizType setting to specify the bizType parameter when they follow the API reference to call the Content Moderation API. In this case, the custom moderation policy corresponding to the bizType setting is used during machine-assisted moderation.

For example, you want to call a synchronous operation to moderate images. If you set the bizType parameter in the API request to the name of the bizType setting you specified in the console, the corresponding moderation policy is applied to image moderation.