To run your custom topic models in Prediction Studio through an API, configure a text categorization model using the machine learning service connection to the prediction endpoint.
- Configure the OAuth 2.0 authentication profile.
For more information, see Creating an authentication profile.
- Deploy your custom model, for example, by using sample
For more information, see Configuring sample containers to use Python models for topic detection.
- 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 models using REST API.
- In the navigation pane of Prediction Studio, click Models.
- In the header of the Models work area, click .
- In the New text categorization model window, set up your
- In the New model name field, enter a unique name for your model.
- In the Save to IVA channel list, select the channel to which you want to save your model, for example, a chatbot channel.
- In the Apply to field, specify the class to which you want to save the model, and then specify its ruleset or branch.
- In the Detection section, select Topics.
- In the Text analytics service list, select Custom model.
- In the Language list, select the language for
the model to use.For more information, see Language support for NLP.
- In the Service name list, select the API service that you defined in step 3 in the Before you begin section.
- 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.
- 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.
- Add topics that you want the model to detect by clicking Edit, and then specifying the topics.
- Click Back.
- Click Create.
- In the Text Categorization - Topic Model area, review the model settings.
- 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.
- Click Save.