Delen via


Examples - List

Returns example utterances to be reviewed from a version of the application.

GET {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/examples
GET {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/examples?skip={skip}&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).

versionId
path True

string

The version ID.

enableNestedChildren
query

boolean

Toggles nested/flat format

skip
query

integer

The number of entries to skip. Default value is 0.

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

LabeledUtterance[]

A list of predictions and label pairs for every example utterance in the application.

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Review Labeled Examples request

Sample request

GET {Endpoint}/luis/authoring/v3.0-preview/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/examples?enableNestedChildren=False

Sample response

[
  {
    "id": -12,
    "text": "what's the weather like in seattle?",
    "tokenizedText": [
      "what",
      "'",
      "s",
      "the",
      "weather",
      "like",
      "in",
      "seattle",
      "?"
    ],
    "intentLabel": "GetWeather",
    "entityLabels": [
      {
        "entityName": "Location",
        "startTokenIndex": 7,
        "endTokenIndex": 7
      }
    ],
    "intentPredictions": [
      {
        "name": "GetWeather",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.21
      },
      {
        "name": "BookFlight",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Location",
        "startTokenIndex": 7,
        "endTokenIndex": 7,
        "phrase": "seattle"
      }
    ]
  },
  {
    "id": -11,
    "text": "book me a flight from cairo to redmond next thursday",
    "tokenizedText": [
      "book",
      "me",
      "a",
      "flight",
      "from",
      "cairo",
      "to",
      "redmond",
      "next",
      "thursday"
    ],
    "intentLabel": "BookFlight",
    "entityLabels": [
      {
        "entityName": "Location",
        "startTokenIndex": 7,
        "endTokenIndex": 7,
        "role": "To"
      },
      {
        "entityName": "Location",
        "startTokenIndex": 5,
        "endTokenIndex": 5,
        "role": "from"
      }
    ],
    "intentPredictions": [
      {
        "name": "BookFlight",
        "score": 0.93
      },
      {
        "name": "None",
        "score": 0.41
      },
      {
        "name": "GetWeather",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 8,
        "endTokenIndex": 9,
        "phrase": "next thursday"
      }
    ]
  }
]

Definitions

Name Description
EntityLabel

Defines the entity type and position of the extracted entity within the example.

EntityPrediction

A suggested entity.

ErrorResponse

Error response when invoking an operation on the API.

IntentPrediction

A suggested intent.

LabeledUtterance

A prediction and label pair of an example.

EntityLabel

Defines the entity type and position of the extracted entity within the example.

Name Type Description
children

EntityLabel[]

Defines the entity type and position of the extracted entity within the example.

endTokenIndex

integer

The index within the utterance where the extracted entity ends.

entityName

string

The entity type.

role

string

The role of the predicted entity.

roleId

string

The role id for the predicted entity.

startTokenIndex

integer

The index within the utterance where the extracted entity starts.

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.

LabeledUtterance

A prediction and label pair of an example.

Name Type Description
entityLabels

EntityLabel[]

The entities matching the example.

entityPredictions

EntityPrediction[]

List of suggested entities.

id

integer

ID of Labeled Utterance.

intentLabel

string

The intent matching the example.

intentPredictions

IntentPrediction[]

List of suggested intents.

text

string

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

tokenizedText

string[]

The utterance tokenized.