Use the Conversation API to detect Topics, which are the most important keywords or phrases in a conversation. Symbl.ai bases the Topics model on a conversation structure with multiple interrelated concepts. This approach improves upon intuition and traditional topic modeling which depend on frequency, probability distribution, and supervised training algorithms.

In a free-flowing discussion, people tend to initiate a topic then switch to another topic as the conversation progresses. Every time a conversation changes context, the Symbl.ai Topics algorithm detects the change and extracts the most relevant Topics.

You can use the Topics algorithm as a framework to calibrate and precisely model relationships between Topics. Derive the most relevant Topics and develop a better understanding of context changes within a conversation.

The Topics algorithm improves on traditional keyword and linear discriminant analysis (LDA) driven models.

Highlights of the Symbl.ai Topics model:

  • Keywords Ranking identifies the top keywords in a conversation. It also assigns a contextual score to keywords based on the graph intelligence that model’s the structure of the conversation.

  • Topic Based Sentiments describes the ability to detect the segment of discussion in which the topic has an impact. You can see topic based sentiments in the Topics API response by passing sentiment=true as a query parameter.

  • Parent Topics are the highest level of discussion abstraction. Parent Topics can have one or more Child Topics per segment of a conversation. To see a conversation's Topic Hierarchy, pass the parentRefs parameter in the Retrieve topics from conversation request.

  • The Scope of a Topic defines the sentences and the information in the conversation. The Topics model links Scope to the Topic of discussion. You can see the Scope of the Topic in the Topics API response.

  • Works with real-time and asynchronous conversations.

Authentication

This request requires an access token, as described in Authenticate.


Get Topics

This section describes how to get Topics from a conversation. This request requires a conversation ID. You receive a conversation ID when you process a conversation with the Symbl.ai APIs.

To get topics, use the GET https://api.symbl.ai/v1/conversations/<CONVERSATION_ID>/topics operation:

👍

Try our interactive examples!

We provide interactive versions of these code samples: curl, Node.js, Python

To get started with our code samples, see Set Up Your Test Environment.

ACCESS_TOKEN="<ACCESS_TOKEN>"
CONVERSATION_ID="<CONVERSATION_ID>"

curl --request GET \
  --url "https://api.symbl.ai/v1/conversations/$CONVERSATION_ID/topics?sentiment=true&parentRefs=true" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header "Content-Type: application/json"
import fetch from 'node-fetch';

const accessToken = '<ACCESS_TOKEN>';
const conversationId = '<CONVERSATION_ID>';

const fetchResponse = await fetch(`https://api.symbl.ai/v1/conversations/${conversationId}/topics?sentiment=true&parentRefs=true`, {
  method: 'get',
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Content-Type': 'application/json'
  }
});

const responseBody = await fetchResponse.json();

console.log(JSON.stringify(responseBody, null, 2));
import json
import requests

access_token = "<ACCESS_TOKEN>"
conversation_id = "<CONVERSATION_ID>"

headers = {
  "Authorization": "Bearer " + access_token,
  "Content-Type": "application/json"
}

response = requests.request(
  method="GET", 
  url="https://api.symbl.ai/v1/conversations/" + conversation_id + "/topics?sentiment=true&parentRefs=true",
  headers=headers
)

print(json.dumps(response.json(), indent=2))

Where:

For additional reference information, see Retrieve Topics by conversation ID.

Optional query parameters

This request supports the following optional query parameters.

Parameter

Type

Description

parentRefs

Boolean

The parentRefs parameter enables the topic hierarchy in the response.

If not included, the default value is false.

sentiment

Boolean

The sentiment parameter enables Sentiment Analysis for topics.

If not included, the default value is false.

Example response

{
  "topics": [
    {
      "text": "service provider",
      "type": "topic",
      "score": 0.9,
      "messageIds": [
        "4808748496322560"
      ],
      "sentiment": {
        "polarity": {
          "score": -0.155
        },
        "suggested": "neutral"
      },
      "parentRefs": []
    },
    {
      "text": "service technician",
      "type": "topic",
      "score": 0.45,
      "messageIds": [
        "6418613790572544",
        "6633702162432000"
      ],
      "sentiment": {
        "polarity": {
          "score": -0.65
        },
        "suggested": "negative"
      },
      "parentRefs": [
        {
          "type": "topic",
          "text": "service provider"
        }
      ]
    },
    {
      "text": "appointment",
      "type": "topic",
      "score": 0.09,
      "messageIds": [
        "4550301271982080"
      ],
      "sentiment": {
        "polarity": {
          "score": 0.169
        },
        "suggested": "neutral"
      },
      "parentRefs": [
        {
          "type": "topic",
          "text": "service provider"
        }
      ]
    }
  ]
}

Topic Hierarchy

Topic Hierarchy is the one-to-many relationship of a Parent Topic to Child Topics.

Parent Topics are the highest-level abstraction of a meeting. These are the key points that the speakers discussed at length.

Child Topic are the subtopics that aggregate or are originated from the Parent Topic.

In any conversation, there can be multiple related topics discussed. It is possible to organize them in a hierarchy for better insights and consumption. The Symbl.ai Topic Hierarchy algorithm finds patterns in the conversation and creates parent (global) topics. Each parent topic can have any number of nested child topics.

Consider a meeting that includes discussions about: “Sales Conversation” and then “Activity Call Logs”, “Salesforce”, “Draft”, “Custom Integration” and “Jira”. The Topics Hierarchy makes Sales Conversation the parent topic and the rest of the topics are the child topics under it.


Abstract Topics (Labs)

Abstract topics show recurrent themes in a conversation. You can quickly scan the list of recurring topics to see what was covered.

For example:

  • Conversation on topics such as pricing, negotiation, sales representative, and so on, are abstracted to Sales.

  • Conversation about coughing, cold, fever, chills, chest pain, are abstracted to Covid-19 Symptoms.

Abstract Topics API request

To get abstract topics, you must first process your conversation using the Async API. After you process the conversation, you receive a Conversation ID which you must pass in Fetch abstract topics.


Did this page help you?