Prediction - Get Slot Prediction GET
Gets the predictions for an application slot.
GET {Endpoint}/luis/prediction/v3.0/apps/{appId}/slots/{slotName}/predict?query={query}
GET {Endpoint}/luis/prediction/v3.0/apps/{appId}/slots/{slotName}/predict?query={query}&verbose={verbose}&show-all-intents={show-all-intents}&log={log}
Name | In | Required | Type | Description |
---|---|---|---|---|
app
|
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). |
slot
|
path | True |
string |
The application slot name. |
query
|
query | True |
string |
The query to predict. |
log
|
query |
boolean |
Indicates whether to log the endpoint query or not. |
|
show-all-intents
|
query |
boolean |
Indicates whether to return all the intents in the response or just the top intent. |
|
verbose
|
query |
boolean |
Indicates whether to get extra metadata for the entities predictions or not. |
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Name | Type | Description |
---|---|---|
200 OK |
The prediction for the supplied query. |
|
Other Status Codes |
Unexpected error. |
Type:
apiKey
In:
header
Sample request
GET {Endpoint}/luis/prediction/v3.0/apps/{Application Id}/slots/{Slot Name}/predict?query=forward to frank 30 dollars through HSBC
Sample response
{
"query": "forward to frank 30 dollars through HSBC",
"prediction": {
"topIntent": "give",
"intents": {
"give": {
"score": 0.943442
}
},
"entities": {
"frank": [
"frank"
],
"number": [
30
],
"money": [
{
"units": "Dollar",
"value": 30
}
],
"Bank": [
"HSBC"
]
},
"sentiment": {
"label": "positive",
"score": 0.9163064
}
}
}
Name | Description |
---|---|
Error |
Represents the error that occurred. |
Error |
Represents the definition of the error that occurred. |
Intent |
Represents an intent prediction. |
Prediction |
Represents the prediction of a query. |
Prediction |
Represents the prediction response. |
Sentiment |
The result of the sentiment analysis. |
Represents the error that occurred.
Name | Type | Description |
---|---|---|
error |
Represents the definition of the error that occurred. |
Represents the definition of the error that occurred.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
message |
string |
The error message. |
Represents an intent prediction.
Name | Type | Description |
---|---|---|
childApp |
The prediction of the dispatched application. |
|
score |
number |
The score of the fired intent. |
Represents the prediction of a query.
Name | Type | Description |
---|---|---|
alteredQuery |
string |
The query after spell checking. Only set if spell check was enabled and a spelling mistake was found. |
entities |
|
A dictionary representing the entities that fired. |
intents |
<string, Intent> |
A dictionary representing the intents that fired. |
sentiment |
The result of the sentiment analysis. |
|
topIntent |
string |
The name of the top scoring intent. |
Represents the prediction response.
Name | Type | Description |
---|---|---|
prediction |
The prediction of the requested query. |
|
query |
string |
The query used in the prediction. |
The result of the sentiment analysis.
Name | Type | Description |
---|---|---|
label |
string |
The label of the sentiment analysis result. |
score |
number |
The sentiment score of the query. |