Add an Azure LUIS resource to app

After you create a LUIS resource in the Azure portal, assign the resource to the LUIS app and get the correct endpoint URL. Use this endpoint URL to get LUIS predictions.

Assign resource

  1. Create a LUIS key on the Azure portal. For further instructions, see Creating an endpoint key using Azure.

  2. Select Manage in the top right menu, then select Keys and endpoints.

    Keys and endpoints page

  3. In order to add the LUIS, select Assign Resource +.

    Assign a resource to your app

  4. Select a Tenant in the dialog associated with the email address you login with to the LUIS website.

  5. Choose the Subscription Name associated with the Azure resource you want to add.

  6. Select the LUIS resource name.

  7. Select Assign resource.

  8. Find the new row in the table and copy the endpoint URL. It is correctly constructed to make an HTTP GET request to the LUIS endpoint for a prediction.

Unassign resource

When you unassign the endpoint key, it is not deleted from Azure. It is only unlinked from LUIS.

When an endpoint key is unassigned, or not assigned to the app, any request to the endpoint URL returns an error: 401 This application cannot be accessed with the current subscription.

Include all predicted intent scores

The Include all predicted intent scores checkbox allows the endpoint query response to include the prediction score for each intent.

This setting allows your chatbot or LUIS-calling application to make a programmatic decision based on the scores of the returned intents. Generally the top two intents are the most interesting. If the top score is the None intent, your chatbot can choose to ask a follow-up question that makes a definitive choice between the None intent and the other high-scoring intent.

The intents and their scores are also included the endpoint logs. You can export those logs and analyze the scores.

{
  "query": "book a flight to Cairo",
  "topScoringIntent": {
    "intent": "None",
    "score": 0.5223427
  },
  "intents": [
    {
      "intent": "None",
      "score": 0.5223427
    },
    {
      "intent": "BookFlight",
      "score": 0.372391433
    }
  ],
  "entities": []
}

Enable Bing spell checker

In the Endpoint url settings, the Bing spell checker toggle allows LUIS to correct misspelled words before prediction. Create a Bing Spell Check key.

Add the spellCheck=true querystring parameter and the bing-spell-check-subscription-key={YOUR_BING_KEY_HERE} . Replace the {YOUR_BING_KEY_HERE} with your Bing spell checker key.

{
  "query": "Book a flite to London?",
  "alteredQuery": "Book a flight to London?",
  "topScoringIntent": {
    "intent": "BookFlight",
    "score": 0.780123
  },
  "entities": []
}

Publishing regions

Learn more about publishing regions including publishing in Europe, and Australia. Publishing regions are different from authoring regions. Create an app in the authoring region corresponding to the publishing region you want for the query endpoint.

Next steps

Use your key to publish your app in the Publish app page. For instructions on publishing, see Publish app.

See Keys in LUIS to understand LUIS authoring and endpoint key concepts.