Test your LUIS app

Testing an app is an iterative process. After training your LUIS app, test it with sample utterances to see if the intents and entities are recognized correctly. If they're not, make updates to the LUIS app, train, and test again.

Test an utterance

  1. Access your app by selecting its name on the My Apps page.

  2. To access the Test slide-out panel, select Test in your application's top panel.

    Train & Test App page

  3. Enter an utterance in the text box and select Enter. You can type as many test utterances as you want in the Test, but only one utterance at a time.

  4. The utterance, its top intent, and score are added to the list of utterances under the text box.

    Interactive testing identifies the wrong intent

Clear test panel

To clear all the entered test utterances and their results from the test console, select Start over at the upper-left corner of the Test panel.

Close test panel

To close the Test panel, select the Test button again.

Inspect score

You inspect details of the test result in the Inspect panel.

  1. With the Test slide-out panel open, select Inspect for an utterance you want to compare.

    Inspect button

  2. The Inspection panel appears. The panel includes the top scoring intent as well as any identified entities. The panel shows the result of the selected utterance.

    Inspect button

Correct top scoring intent

  1. If the top scoring intent is incorrect, select the Edit button.

  2. In the drop-down list, select the correct intent for the utterance.

    Select correct intent

View sentiment results

If Sentiment analysis is configured on the Publish page, the test results include the sentiment found in the utterance.

Image of Test pane with sentiment analysis

Correct matched pattern's intent

If you are using Patterns and the utterance matched a pattern, but the wrong intent was predicted, select the Edit link by the pattern, then select the correct intent.

Compare with published version

You can test the active version of your app with the published endpoint version. In the Inspect panel, select Compare with published. Any testing against the published model is deducted from your Azure subscription quota balance.

Compare with published

View endpoint JSON in test panel

You can view the endpoint JSON returned for the comparison by selecting the Show JSON view.

Published JSON response

Additional settings in test panel

LUIS endpoint

If you have several LUIS endpoints, use the Additional Settings link on the Test's Published pane to change the endpoint used for testing. If you are not sure which endpoint to use, select the default Starter_Key.

Test panel with Additional Settings link highlighted

View Bing Spell Check corrections in test panel

Requirements to view the spelling corrections:

  • Published app
  • Bing Spell Check service key. The service key is not stored and needs to be reset for each browser session.

Use the following procedure to include the Bing Spell Check v7 service in the Test pane results.

  1. In the Test pane, enter an utterance. When the utterance is predicted, select Inspect underneath the utterance you entered.

  2. When the Inspect panel opens, select Compare with Published.

  3. When the Published panel opens, select Additional Settings.

  4. In the pop-up dialog, enter your Bing Spell Check service key. Enter Bing Spell Check service key

  5. Enter a query with an incorrect spelling such as book flite to seattle and select enter. The incorrect spelling of the word flite is replaced in the query sent to LUIS and the resulting JSON shows both the original query, as query, and the corrected spelling in the query, as alteredQuery.

    Corrected spelling JSON

Batch testing

See batch testing concepts and learn how to test a batch of utterances.

Next steps

If testing indicates that your LUIS app doesn't recognize the correct intents and entities, you can work to improve your LUIS app's accuracy by labeling more utterances or adding features.