Quickstart: Topic modeling V2.1

Topic modeling V2.1 includes the following features:

  • Model size selection
  • Industry topic sets
  • Custom topics
  • Topic editing

Create a model from the Conversational Insights console

You can optionally use the new features below when you create a topic model.

Model size

On the Model details page, you can select a model size. The model size determines how many topics can be generated for a new topic model. The model sizes roughly correspond to the following number of topics:

  • More coarse: up to 30 topics
  • Coarse: up to 50 topics
  • Standard: up to 150 topics
  • Fine: up to 200 topics
  • More fine: up to 350 topics

Industry template

On the Additional information page, you can select an industry name from the drop-down. The model training process is biased towards producing topics for the selected industry.

Custom topics

On the Custom topics page, you can add any number of your own custom topics. You can either add custom topics one at a time using the input field, or upload a .csv file containing a set of custom topics. All custom topics are included in the final trained topic model.

Create a model with the REST API

To create a V2 topic model from the REST API, follow the prerequisite and data import steps for topic model creation.

To create a model, you must send a creation request to the Insights API with a definition for your model. In addition to a display name and training data configuration, you must include the model type TYPE_V2 in your request. You can optionally specify the language_code field in the request to train a model for a specific language.

In input_data_config you can optionally add fields custom_taxonomy, issue_granularity, and industry.

REST

To create a topic model, call the create method on the issueModel resource.

Before using any of the request data, make the following replacements:

  • PROJECT_ID: Your project ID.
  • MODEL_NAME: A human-readable name for the new issue model.

HTTP method and URL:

POST https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/issueModels

Request JSON body:

{
  "display_name": "my new test model",
  "input_data_config": {
      "filter": "medium=\"CHAT\"",
      "custom_taxonomy": {
        "taxonomy_entries": [
          {
            "display_name": "reschedule car service"
          },
          {
            "display_name": "problem with windshield wipers"
          }
        ]
      },
      "industry": "auto",
      "issue_granularity": "STANDARD"
   },
   "model_type": "TYPE_V2",
   "language_code": "en-US"
}

To send your request, expand one of these options:

You should receive a JSON response similar to the following:

{
  "name": "projects/PROJECT_ID/locations/us-central1/operations/OPERATION_ID"
}

Edit topics

After creating a V2 topic model, you can edit the set of topics belonging to the model from the Insights console. To review and edit topics, navigate to the topic models page and select the topic model you would like to edit.

Create a topic

To create a topic:

  1. Enter a topic name in the New topic input field.
  2. Click Add to create a topic with this name.

Merge topics

To merge a group of topics:

  1. Using the checkbox on each topic row, select the topics you'd like to merge.
  2. Click Merge selected topics.
  3. Provide a name for the new topic and click Merge. The selected topics are grouped into a single new topic with the provided name.

Topic information

Find additional information, such as the topic description and matched training snippets, through the menu that appears to the right of each topic.