Skip to main content

Intent fine-tuning

As a bot continues its operation, JAICP constantly acquires new data on conversations with it: which phrases the users sent, how well the bot recognized them and what actions it took in response.

NLU can help you use this data to fine-tune your bot project: update intents with training phrases from dialogs that have already taken place. This way, you can quickly find out which phrases were not recognized and add them to the training dataset, so that similar errors no longer take place.

Fine-tuning can be done:

  • Via the data labeling tool. It can help process phrases so you have an easier time working with them.
  • Manually via dialog analytics.
tip
The article on How to train intents contains practical recommendations for creating NLU classifiers. It is advised to keep them in mind as you fine-tune your intents.

Via data labeling

caution
Data labeling is disabled by default. Send a request to our customer support if you want it to become available.

To begin fine-tuning via data labeling:

  1. Navigate to a project and select NLU → Data labeling in the dashboard.
  2. If you have already used data labeling, select New set of phrases.
  3. Select Import from analytics.

Only the last 500 phrases are imported. Duplicates, phrases already present in the intents, and phrases shorter than 3 and longer than 80 characters are excluded. After the import has finished, the phrases will fall into two groups:

  • Recognized phrases that the classifier mapped to one of the intents successfully.

    tip
    It is good practice to examine phrases recognized with a low score: you can find false positives among them. Such phrases should be added to other, more suitable intents. You can also increase the classifier thresholds, so that phrases with a low score are recognized less frequently.
  • Unrecognized phrases not assigned to any intent.

Now you can use the standard data labeling UI to work with these phrases: label them using different algorithms, gather similar phrases into groups, add them to existing intents or create new ones.

Manually

When browsing through dialog analytics, you can add user phrases to intents one by one.

  1. Navigate to a project and select Analytics → Dialogs in the dashboard.
  2. Configure the results view as needed:
    • Sessions (default view) — select it if you want to read through whole sessions of bot interactions.
    • Phrases — select it if you only need individual phrases, no matter their context.
  3. Configure the filters to narrow down search results.
tip
For example, you can only leave phrases not recognized in the script by applying the Message class filter by the noMatch event.
  1. If you are in the sessions view, select a session to go to its phrases.

  2. Select Add phrase to intent under the necessary phrase. An intent selection window will open.

    Adding a user phrase as an intent training phrase

tip
The phrase text is editable. You can correct typos, change the word order, or delete words not related to the intent.
  1. Choose the appropriate intent and select Add phrase to intent once more.