Model - List Intent Suggestions

Suggests example utterances that would improve the accuracy of the intent model in a version of the application.

GET {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest
GET {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest?take={take}&enableNestedChildren={enableNestedChildren}

URI Parameters

Name In Required Type Description
appId
path True

string

uuid

The application ID.

Endpoint
path True

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).

intentId
path True

string

uuid

The intent classifier ID.

versionId
path True

string

The version ID.

enableNestedChildren
query

boolean

Toggles nested/flat format

take
query

integer

The number of entries to return. Maximum page size is 500. Default is 100.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Responses

Name Type Description
200 OK

IntentsSuggestionExample[]

If there's no trained intent model, nothing is returned in the response. If there's a trained model and active learning finds any relevant queries, they are returned with the intent model predictions. If there's a trained model but active learning didn't find any relevant queries, an empty list is returned in the response.

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Get Intents Suggestion Examples

Sample request

GET {Endpoint}/luis/authoring/v3.0-preview/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/intents/3d73462d-98f0-4dcd-8d30-fab9e65f2e73/suggest?enableNestedChildren=False

Sample response

[
  {
    "text": "hey",
    "tokenizedText": [
      "hey"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.65
      },
      {
        "name": "FindAirportByCode",
        "score": 0.02
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "2-2-2017",
    "tokenizedText": [
      "2",
      "-",
      "2",
      "-",
      "2017"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.88
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 4,
        "phrase": "2-2-2017"
      }
    ]
  },
  {
    "text": "maybe find me an airport first",
    "tokenizedText": [
      "maybe",
      "find",
      "me",
      "an",
      "airport",
      "first"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 0.99
      },
      {
        "name": "FindHotels",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "as",
    "tokenizedText": [
      "as"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.98
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "find hotel in barcelona",
    "tokenizedText": [
      "find",
      "hotel",
      "in",
      "barcelona"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "barcelona"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "barcelona"
      }
    ]
  }
]

Definitions

Name Description
EntityPrediction

A suggested entity.

ErrorResponse

Error response when invoking an operation on the API.

IntentPrediction

A suggested intent.

IntentsSuggestionExample

Predicted/suggested intent.

EntityPrediction

A suggested entity.

Name Type Description
children

EntityPrediction[]

A suggested entity.

endTokenIndex

integer

The index within the utterance where the extracted entity ends.

entityName

string

The entity's name

phrase

string

The actual token(s) that comprise the entity.

startTokenIndex

integer

The index within the utterance where the extracted entity starts.

ErrorResponse

Error response when invoking an operation on the API.

Name Type Description
errorType

string

IntentPrediction

A suggested intent.

Name Type Description
name

string

The intent's name

score

number

The intent's score, based on the prediction model.

IntentsSuggestionExample

Predicted/suggested intent.

Name Type Description
entityPredictions

EntityPrediction[]

Predicted/suggested entities.

intentPredictions

IntentPrediction[]

Predicted/suggested intents.

text

string

The utterance. For example, "What's the weather like in seattle?"

tokenizedText

string[]

The tokenized utterance.