Creating a text categorization model to run topic detection models through an API

To run your custom topic detection models in Prediction Studio through an API, configure a text categorization model using the machine learning service connection to the prediction endpoint.

Before you begin: Define your model and the machine learning service connection:
  1. Configure the OAuth 2.0 authentication profile.

    For more information, see Creating an authentication profile.

  2. Deploy your custom model, for example, by using sample Docker containers.

    For more information, see Configuring sample containers to use Python models for topic detection.

  3. Define the machine learning service to connect to custom models through an API.

    For more information, see Configuring a machine learning service connection for topic detection models using REST API.

  1. In the navigation pane of Prediction Studio, click Models.
  2. In the header of the Models work area, click New > Text categorization.
  3. In the New text categorization model window, set up your topic detection model:
    1. In the New model name field, enter a unique name for your model.
    2. In the Save to IVA channel list, select the channel to which you want to save your model, for example, a chatbot channel.
    3. In the Apply to field, specify the class to which you want to save the model, and then specify its ruleset or branch.
    4. In the Detection section, select Topics.
    5. In the Text analytics service list, select Custom model.
    6. In the Language list, select the language for the model to use.
    7. In the Service name list, select the API service that you defined in step 3 in the Before you begin section.
    8. In the Model identifier field, enter the model identifier.
      Ensure that the model identifier matches the identifier of the model that you created in step 2 in the Before you begin section.
    9. If you mapped a parameter as a Prompt field type when you configured the machine learning service, in the Prompt field, enter a value for this parameter, for example, the model language or version.
    10. Add topics that you want the model to detect by clicking Edit, and then specifying the topics.
    11. Click Back.
    12. Click Create.
  4. In the Text Categorization - Topic Model area, review the model settings.
  5. Optional: To test the model, in the Test the model section, in the Sample text field, enter a sample text, and then click Test to detect the topic with the created model.
  6. Click Save.