Natural Language Processing and Conversational Content

This section describes the NLP platforms that can be used with Soul Machines Digital Person and the options available for building dynamic data in the conversational content.

NLP Integration

Soul Machines Digital People leverage Natural Language Processing platforms (NLPs) in order to:

  1. Understand the user’s intention or inquiry by analyzing their utterance.

  2. Select the proper pre-written response from a finite set of responses.

There are currently two NLP platforms supported out-of-the-box: ​Google Dialogflow and ​IBM Watson​ Assistant​. Additionally, other NLPs can be utilized by building an “Orchestration Layer'' with customer-built API integration between Soul Machine’s backend WebSocket events and the desired NLP’s API. This is covered further on the​ Orchestration page.

The following sections provide a discussion of the basics of how to work with your Soul Machine’s technical contact to set up a Digital Person with integration to ​Dialogflow​ or ​Watson Assistant​.

Dialogflow (API V2)

The following instructions can also be followed, using the official ​Dialogflow Documentation​.

  1. Log in to the ​Console​ on ​Dialogflow​.

  2. Under the Dialogflow​  logo in the top left corner, select the desired ​ Agent​  from the​ drop-down list.

  3. Click the ​Settings Cog ​to the right of the selected ​Agent​.

  4. On the ​General Settings​ tab, look for the section labeled ​Google Project​ and then click the name of the ​Service Account​—the format looks like an email and it is a blue URL. The ​Service Account​ page can also be found by directly visiting the ​Google Cloud IAM​.

  5. At the top of the ​Service Account​ page, click ​+ Create Service Account​.

  6. In the pop-up, enter a name for the ​Service Account​.

  7. Select the Client​ role (We do not require nor recommend ​Admin​ access, and Soul Machines requires more than ​Read Only​ access).

  8. Select the ​Furnish a new private key​ checkbox and be sure to select ​JSON​ as output type.

  9. Click ​Create​.

  10. Download the ​JSON​, and securely share it with your Soul Machines technical contact. We recommend encrypting the file in a password locker, such as ​1Pass​.

WARNING: Emailing the JSON in plain text may risk exposing your API key, and thus, may result in a data breach of your Dialogflow account and transcript logs​.             

IBM Watson Assistant

Instructions for generating and retrieving a ​Watson Assistant​ API key can be found here.

Once the API credentials are generated, we recommend encrypting the file in a password locker, such as ​1Pass​ to share them with your Soul Machines technical contact.

WARNING: Emailing the JSON in plain text may risk exposing your API key, and thus, may result in a data breach of your IBM Cloud account and transcript logs.

Including Dynamic Data in the Conversational Content

While developing the Conversational Content, you may find scenarios in which static, predetermined text is not sufficient in creating a natural, ​Person​-like conversation. For example, consider the Digital ​Person​ being asked about “What’s the weather outside?" or “What is my account balance?”

In scenarios where dynamic content is a requirement, you can leverage Dialogflow​'s ​​ Fulfillment Integrations to pull the necessary data from 3rd party services (such as a weather provider, in the above case), or your company’s own API endpoints. 

With ​IBM Watson Assistant​, you may leverage Cloud Functions ​to instantiate an API request for this 3rd party data. For any assistance with making Fulfillment requests, please leverage your Soul Machines Solutions Architect or Conversational Engineer.

Note that dynamic content can also be provided via an ​Orchestration server.