Create a test set

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 2 minutes to read
  • To create or add to an NLU test set, you can upload a file of test utterances matched with correct intents. Use the test set to assess the performance of your model.

    Before you begin

    • Ensure that the NLU Workbench - Core plugin, NLU Workbench plugin, NLU Workbench - Advanced Features plugin and Predictive Intelligence plugin are all installed and activated
    • You can use test sets with NLU models for Virtual Agent and AI Search.
    • Role required: nlu_editor, nlu_admin, or admin. The editor must be assigned to the model.

    About this task

    Your CSV or XLSX (Excel Workbook) file should contain a table that pairs your test utterances with the intents that you expect for them. Your file can contain up to 10,000 utterances. Ensure that the file has columns titled "Utterance" and "Expected intent".
    Note:
    For test sets in languages other than English, you must add the glide.import.csv.charset system property with the value UTF-8. See Import sets properties.

    For the most accurate test results, include utterances that the model is likely to encounter from your users. Ensure that you have test utterances covering all the intents in your model.

    Aim to include about 10% of test utterances with no expected intents. Including utterances with no expected intent helps assess your model's ability to detect irrelevant utterances that should not have any intent predicted.
    Note:
    To indicate that a test utterance in your file has no expected intent, the value for "Expected intent" should be empty.
    Table 1. Example test set table
    Utterance Expected intent
    Let me have a burger Order
    I want to pay Payment
    Get me something sweet Order
    Is the restaurant open
    Something wrong with my payment Order, Payment
    Total cost Payment

    Procedure

    1. Navigate to All > NLU Workbench > NLU Advanced Features > Multi-model Batch Testing.
    2. Click Test sets
    3. Click Create test set.
      Create new test set window.
    4. Choose a name for the test set.
    5. Choose a language.
    6. Click Select file and choose a CSV or XLSX (Excel Workbook) file.
    7. Click Create.
      Your test set appears in the list.

    What to do next

    Use the test set to run a test on your models. To learn how, see Test your model or Run a multi-model batch test.

    After you have created a test set, you can add more utterances to it. When viewing a test set, click Import utterances.
    Figure 1. Test set page with import utterances button
    Test set page with import utterances button.
    Select a CSV or XLSX (Excel Workbook) file with your additional utterances to import.
    Figure 2. Import utterances window
    Import utterances window.

    Click Import. The system adds your utterances to the test set. After importing, rerun any tests that use the test set.