Import NLU samples

When developing an NLU model, you can import examples of the types of things your users might say to train the model. These examples, called samples, must be stored in a text (TXT) file.

If you are importing data for a project that contains multiple locales, you must prepare one file per locale.

Prepare text (TXT) file

The TXT file must have one sample per line. Each sample must not include more than 500 characters; otherwise, you will get an error and the sample will not be imported.

Example .txt file (one example per line):

i would like 1 scoop of vanilla ice cream and some hot fudge
i'll get a chocolate ice cream on a cone
give me a strawberry smoothie

If you are importing data for a project that contains multiple locales, you must prepare one TXT file per locale.

Import samples

Upon importing, you can select to which intent you would like to assign the samples. If you do not select an intent, they will be imported to Unassigned Samples. Don’t forget to annotate these samples with entities before training your model.

To import NLU samples:

  1. In the Mix dashboard, select the project and click the Import/Export tab.

  2. Click the import icon for a TXT file. The Upload a file window appears.

  3. Either click to select a file from your computer, or drag and drop the file in the input field.

  4. Click Next Step.

  5. If your project includes multiple languages/locales, select the locale for which to import data.

  1. Choose how you wish to upload the samples. You have two options:

    • Upload to a specific Intent: Upload the samples to a specific intent.

      NLU samples import to specific intent

    • Auto-intent: Import a set of samples and apply Auto-intent to suggest, for each sample, either an existing intent or a newly detected intent (by selecting Identity new intents). For more information on auto-intent, see Apply automation.

      NLU samples import to auto-import

  2. (If using Auto-intent) Click Next Step.

    When Auto-intent is initiated, Mix.nlu runs a health check of the training sample, model, and data sent for automation. For more information, see Health checks.

  3. Click Upload (or Upload & automate if using Auto-intent). A report of the import appears.

    NLU samples report

  4. (Optional) Click Download logs to download additional import information in CSV format.

  5. Click Close to close the upload window.

Download logs

Click Download logs to download import information. Download logs are in CSV file format.

Download logs contain the following additional information:

Parameter Description
addedToExistingSampleCount Number of the samples imported that already existed in the project.
errors Any errors in the import.
sampleIncrementedCount Number of existing samples in the project that incremented the counter.
samplesCount Number of new samples created during import.
warnings Any warnings in the import.