Connect the NLU engine

Step 1: Enable 3rd-party NLU support

Enable your account for 3rd-party NLU support within Account Details in Bot Accounts.

Step 2: Sign up and get the API keys

Repeat this step twice to create two sets of IBM Watson or Google DialogFlow service credentials. When you train (described below) the intents in a domain for the first time in Intent Manager, you'll use the first set of credentials. Those credentials will then be active for the first model version that gets created. Since only one set of credentials can be active at a time, you'll need to use the second set of credentials the second time you train. And with each subsequent training, you'll need to alternate back and forth between the credentials.

Two versions using different credentials, one Completed and the other In Progress

IBM Watson
  1. Register for or log in to an IBM Cloud account.

Page to log into IBM Cloud

  1. Create or access a Watson Assistant resource. Page to create or access a Watson Assistant resource

  2. Generate Service Credentials with the role of Manager and an Auto Generated Service ID. Add new credential page

  3. View and copy the newly created credentials. Credentials list, where you can view and copy a credential

Google Dialogflow
  1. Log in to the Dialogflow console.

  2. Create a new Dialogflow agent (which will create a new Google project).

  3. Create a new Service Account for the newly created Google project with the role of Dialogflow API Admin.

  4. Create a JSON-formatted private key for the service account by clicking the Create key.

  5. View and copy the created key. This will be used in your Dialogflow config data.

Step 3: Add a domain for the 3rd-party NLU provider

In Intent Manager, add a domain that uses the 3rd-party NLU engine as its NLU provider. You can import the intents and entities at that time or add them later but before proceeding to step 5.

The length of the domain name should not exceed 64 characters. (Watson limitation)

Step 4: Create the NLU provider credentials

In Intent Manager, in the domain that you created in the previous step, create the NLU provider credentials for the 3rd-party NLU engine. This is the discussed in the following section. This is when you'll copy and paste in the credentials that you downloaded from IBM Watson or Google Dialogflow (step 2 above).

Step 5: Train the domain

In Intent Manager, train the domain to create a model version. This is discussed farther below. Once training is completed, you can start to test.

Create a 3rd-party NLU provider credential

You must create a 3rd-party NLU provider credential, as the system requires and uses the credentials when training the domain.

To create a 3rd-party NLU provider credential

  1. Access Intent Manager.
  2. Locate the domain list in the Intent Manager dashboard.
  3. Select the name of the relevant domain, and then select Build from the menu that appears.
  4. On the Intents page, click Train in the upper-right corner.
  5. In the Train dialog, click the "Select NLU Provider Credential" option.

    Train window, where you can select an NLU provider credential

    This changes the option, so you can create a credential instead.

    Train window, with the option to create a new NLU provider credential

  6. Click "Create a new NLU Provider Credential."
  7. In the Add NLU Provider Credential dialog box, specify the following:
    • Credential Name: Enter a name for the credential.
    • NLU Provider: Select the 3rd-party NLU engine.
    • Credentials: Paste here the credentials that you downloaded when you set up your IBM Watson or Google Dialogflow account (discussed earlier on this page).

    Add NLU Provider Credential window

  8. Click Save Credentials.

    During training, you'll need to alternate between 2 sets of service credentials, as described below.

Train a domain

You must train the 3rd-party NLU domain after every update to the domain if you want the update to be reflected in subsequent testing/debugging and usage. Training creates a new model version that incorporates the changes. Once the domain is trained, you can use the testing tools to test.

Notes

  • Typically, training takes anywhere between 2 to 10 minutes depending on how big the domain is. Larger domains can take longer.
  • You can train the domain and create as many model versions as you want. There isn't a limit on this. However, only the latest 100 versions are stored and shown.

To train a domain

  1. Access Intent Manager.
  2. Locate the domain list in the Intent Manager dashboard.
  3. Select the name of the relevant domain, and then select Build from the menu that appears.
  4. On the Intents page, choose "Work in progress" from the selector in the upper-right corner, and make any necessary changes to the intents. Do likewise for entities.
  5. When you're done making changes, click Train & Create Version in the upper-right corner.

    (If you haven't updated the training data in the domain, i.e., made changes to the intents, their training phrases, or the entities, the Train & Create Version button is disabled.)

  6. In the pop-up window, select the NLU provider credential from the list, and click Train and create version.

    Train window, where you can select an NLU provider credential

    Note that you'll need to alternate between using your two sets of credentials, as discussed farther below.

    Once the training is completed, you can use the testing tools to test: test a single utterance; test with the Model Tester.

Alternating service credentials

When you created your 3rd-party service credentials, you created two sets, as discussed above. This is so you can alternate between them. When you train the intents in a domain for the first time in Intent Manager, you'll use the first set of credentials. Those credentials will then be active for the first model version that gets created. Since only one set of credentials can be active at a time, you'll need to use the second set of credentials the second time you train. And with each subsequent training, you'll need to alternate back and forth between the credentials.