Quickstart: Deploy an app in the LUIS portal

When your LUIS app is ready to return utterance predictions to a client application (for example, a chat bot), you need to deploy the app to the prediction endpoint.

In this quickstart, you learn to deploy an application. You create a prediction endpoint resource, assign the resource to the app, train the app, and publish the app.

Prerequisites

Create LUIS resources in Azure portal

  1. Use this link to begin creating LUIS resources in the Azure portal.

  2. Enter all required settings:

    Name Purpose
    Subscription name the subscription that will be billed for the resource.
    Resource group A custom resource group name you choose or create. Resource groups allow you to group Azure resources for access and management.
    Name A custom name you choose, used as your custom subdomain for your authoring and prediction endpoint queries.
    Authoring location The region associated with your model.
    Authoring pricing tier The pricing tier determines the maximum transaction per second and month.
    Runtime location The region associated with your published prediction endpoint runtime.
    Runtime pricing tier The pricing tier determines the maximum transaction per second and month.

    Create the language understanding resource

  3. Click Review + create and wait for the resource to be created.

  4. After both resources are created, still in the Azure portal, select the new authoring resource, then Quickstarts to get the authoring endpoint URL and key for authoring programmatically.

Tip

To use the resources, in the LUIS portal, assign the resources.

Assign the resource key to the LUIS app in the LUIS portal

Every time you create a new authoring or query prediction resource for LUIS, you need to assign the resource to the LUIS app. After it's assigned, you won't need to do this step again unless you create a new resource. You might create a new resource to expand the regions of your app or to support a higher number of prediction queries.

  1. Sign in to the LUIS portal and choose the myEnglishApp app from the apps list.

  2. Select Manage in the upper-right menu, and then select Azure Resources.

  3. To add the LUIS, select Add prediction resource.

    To add the LUIS prediction resource, select Add prediction resource

  4. Select your tenant, subscription, and resource name. Select Assign resource.

    Assign a resource to your app

  5. Complete the same steps to add the authoring key to your app.

  6. Find the new row in the table for the new prediction resource and copy the endpoint URL. It's correctly constructed to make an HTTP GET request to the LUIS API endpoint for a prediction.

Tip

If you intend to use Active learning to improve your LUIS app, select Change query parameters and select Save logs. This action changes the example URL by adding the log=true querystring parameter. Copy and use the changed example query URL when making prediction queries to the runtime endpoint.

Train the app

If you changed the app since you trained it last, train the app.

Publish the app to the prediction endpoint

In order to receive a LUIS prediction in a chat bot or other client application, you need to publish the app to the prediction endpoint.

  1. Select Publish in the top-right navigation.

    Screenshot of LUIS publish to endpoint button in top right menu

  2. Select the Production slot, then select Done.

    Screenshot of LUIS publish to endpoint

  3. Select the Access your endpoint URLs link in the notification to go to the Azure Resources page. The endpoint URLs are listed as the Example Query.

Prediction endpoint request

In the portal, query= at the end of the URL is where the user's utterance is appended to the GET request. After the query=, enter the same user utterance used at the end of the previous quickstart:

Is there a form named hrf-234098

Make sure the query string includes the following pairs:

  • show-all-intents=true
  • verbose=true

The browser shows the response:

{
    "query": "Is there a form named hrf-234098",
    "prediction": {
        "topIntent": "FindForm",
        "intents": {
            "FindForm": {
                "score": 0.9768753
            },
            "None": {
                "score": 0.0216071177
            }
        },
        "entities": {
            "Human Resources Form Number": [
                "hrf-234098"
            ],
            "$instance": {
                "Human Resources Form Number": [
                    {
                        "type": "Human Resources Form Number",
                        "text": "hrf-234098",
                        "startIndex": 22,
                        "length": 10,
                        "modelTypeId": 8,
                        "modelType": "Regex Entity Extractor",
                        "recognitionSources": [
                            "model"
                        ]
                    }
                ]
            }
        }
    }
}

To see this same level of information in the test pane, you must publish the app. After the app is published, select Compare with published in the test pane. Use Show JSON view in the published test pane to see the same JSON as the previous step. In this way, you can compare changes to the current app you're working on with an app that is published to the endpoint.

Compare currently editing versus published version of app

Clean up resources

When you're done with this quickstart, select My apps from the top navigation menu. Select the app's check box from the list, and then select Delete from the context toolbar above the list.

Next steps