Skip to content

Commit 26ec26a

Browse files
authored
Merge pull request #107273 from diberry/diberry/0311-luis-api-spelling
[Cogsvcs] LUIS - Bing Spell Check
2 parents fdf3891 + d008f24 commit 26ec26a

File tree

1 file changed

+40
-44
lines changed

1 file changed

+40
-44
lines changed

articles/cognitive-services/LUIS/luis-migration-api-v3.md

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
---
22
title: Prediction endpoint changes in the V3 API
3-
titleSuffix: Azure Cognitive Services
4-
description: The query prediction endpoint V3 APIs have changed. Use this guide to understand how to migrate to version 3 endpoint APIs.
5-
services: cognitive-services
6-
author: diberry
7-
manager: nitinme
8-
ms.custom: seodec18
9-
ms.service: cognitive-services
10-
ms.subservice: language-understanding
3+
description: The query prediction endpoint V3 APIs have changed. Use this guide to understand how to migrate to version 3 endpoint APIs.
114
ms.topic: conceptual
12-
ms.date: 10/25/2019
5+
ms.date: 03/11/2020
136
ms.author: diberry
147
---
158

169

1710
# Prediction endpoint changes for V3
1811

19-
The query prediction endpoint V3 APIs have changed. Use this guide to understand how to migrate to version 3 endpoint APIs.
12+
The query prediction endpoint V3 APIs have changed. Use this guide to understand how to migrate to version 3 endpoint APIs.
2013

2114
[!INCLUDE [Waiting for LUIS portal refresh](./includes/wait-v3-upgrade.md)]
2215

@@ -38,9 +31,9 @@ The prediction endpoint [request](#request-changes) and [response](#response-cha
3831

3932
## V3 changes from preview to GA
4033

41-
V3 made the following changes as part of the move to GA:
34+
V3 made the following changes as part of the move to GA:
4235

43-
* The following prebuilt entities have different JSON responses:
36+
* The following prebuilt entities have different JSON responses:
4437
* [OrdinalV1](luis-reference-prebuilt-ordinal.md)
4538
* [GeographyV2](luis-reference-prebuilt-geographyv2.md)
4639
* [DatetimeV2](luis-reference-prebuilt-datetimev2.md)
@@ -55,23 +48,26 @@ V3 made the following changes as part of the move to GA:
5548

5649
## Suggested adoption strategy
5750

58-
If you use Bot Framework, Bing Spell Check V7, or want to migrate your LUIS app authoring only, continue to use the V2 endpoint.
51+
If you use Bot Framework, Bing Spell Check V7, or want to migrate your LUIS app authoring only, continue to use the V2 endpoint.
52+
53+
If you know none of your client application or integrations (Bot Framework, and Bing Spell Check V7) are impacted and you are comfortable migrating your LUIS app authoring and your prediction endpoint at the same time, begin using the V3 prediction endpoint. The V2 prediction endpoint will still be available and is a good fall-back strategy.
5954

60-
If you know none of your client application or integrations (Bot Framework, and Bing Spell Check V7) are impacted and you are comfortable migrating your LUIS app authoring and your prediction endpoint at the same time, begin using the V3 prediction endpoint. The V2 prediction endpoint will still be available and is a good fall-back strategy.
6155

6256
## Not supported
6357

64-
* Bing Spell Check API is not supported in V3 prediction endpoint - continue to use V2 API prediction endpoint for spelling corrections
58+
### Bing Spell Check
59+
60+
This API is not supported in V3 prediction endpoint - continue to use V2 API prediction endpoint for spelling corrections. If you need spelling correction while using V3 API, have the client application call the [Bing Spell Check](https://docs.microsoft.com/azure/cognitive-services/bing-spell-check/overview) API, and change the text to the correct spelling, prior to sending the text to the LUIS API.
6561

6662
## Bot Framework and Azure Bot Service client applications
6763

68-
Continue to use the V2 API prediction endpoint until the V4.7 of the Bot Framework is released.
64+
Continue to use the V2 API prediction endpoint until the V4.7 of the Bot Framework is released.
6965

70-
## V2 API Deprecation
66+
## V2 API Deprecation
7167

72-
The V2 prediction API will not be deprecated for at least 9 months after the V3 preview, June 8th, 2020.
68+
The V2 prediction API will not be deprecated for at least 9 months after the V3 preview, June 8th, 2020.
7369

74-
## Endpoint URL changes
70+
## Endpoint URL changes
7571

7672
### Changes by slot name and version name
7773

@@ -91,15 +87,15 @@ If you want to query by version, you first need to [publish via API](https://wes
9187
|`production`|
9288
|`staging`|
9389

94-
## Request changes
90+
## Request changes
9591

9692
### Query string changes
9793

9894
The V3 API has different query string parameters.
9995

10096
|Param name|Type|Version|Default|Purpose|
10197
|--|--|--|--|--|
102-
|`log`|boolean|V2 & V3|false|Store query in log file. Default value is false.|
98+
|`log`|boolean|V2 & V3|false|Store query in log file. Default value is false.|
10399
|`query`|string|V3 only|No default - it is required in the GET request|**In V2**, the utterance to be predicted is in the `q` parameter. <br><br>**In V3**, the functionality is passed in the `query` parameter.|
104100
|`show-all-intents`|boolean|V3 only|false|Return all intents with the corresponding score in the **prediction.intents** object. Intents are returned as objects in a parent `intents` object. This allows programmatic access without needing to find the intent in an array: `prediction.intents.give`. In V2, these were returned in an array. |
105101
|`verbose`|boolean|V2 & V3|false|**In V2**, when set to true, all predicted intents were returned. If you need all predicted intents, use the V3 param of `show-all-intents`.<br><br>**In V3**, this parameter only provides entity metadata details of entity prediction. |
@@ -133,7 +129,7 @@ The V3 API has different query string parameters.
133129

134130
## Response changes
135131

136-
The query response JSON changed to allow greater programmatic access to the data used most frequently.
132+
The query response JSON changed to allow greater programmatic access to the data used most frequently.
137133

138134
### Top level JSON changes
139135

@@ -158,7 +154,7 @@ The top JSON properties for V3 are:
158154
"query": "this is your utterance you want predicted",
159155
"prediction":{
160156
"topIntent": "intent-name-1",
161-
"intents": {},
157+
"intents": {},
162158
"entities":{}
163159
}
164160
}
@@ -176,13 +172,13 @@ The response JSON schema changes allow for:
176172
* Clear distinction between original utterance, `query`, and returned prediction, `prediction`.
177173
* Easier programmatic access to predicted data. Instead of enumerating through an array in V2, you can access values by **name** for both intents and entities. For predicted entity roles, the role name is returned because it is unique across the entire app.
178174
* Data types, if determined, are respected. Numerics are no longer returned as strings.
179-
* Distinction between first priority prediction information and additional metadata, returned in the `$instance` object.
175+
* Distinction between first priority prediction information and additional metadata, returned in the `$instance` object.
180176

181177
### Entity response changes
182178

183179
#### Marking placement of entities in utterances
184180

185-
**In V2**, an entity was marked in an utterance with the `startIndex` and `endIndex`.
181+
**In V2**, an entity was marked in an utterance with the `startIndex` and `endIndex`.
186182

187183
**In V3**, the entity is marked with `startIndex` and `entityLength`.
188184

@@ -192,13 +188,13 @@ If you need entity metadata, the query string needs to use the `verbose=true` fl
192188

193189
#### Each predicted entity is represented as an array
194190

195-
The `prediction.entities.<entity-name>` object contains an array because each entity can be predicted more than once in the utterance.
191+
The `prediction.entities.<entity-name>` object contains an array because each entity can be predicted more than once in the utterance.
196192

197193
<a name="prebuilt-entities-with-new-json"></a>
198194

199195
#### Prebuilt entity changes
200196

201-
The V3 response object includes changes to prebuilt entities. Review [specific prebuilt entities](luis-reference-prebuilt-entities.md) to learn more.
197+
The V3 response object includes changes to prebuilt entities. Review [specific prebuilt entities](luis-reference-prebuilt-entities.md) to learn more.
202198

203199
#### List entity prediction changes
204200

@@ -212,7 +208,7 @@ The JSON for a list entity prediction has changed to be an array of arrays:
212208
]
213209
}
214210
```
215-
Each interior array corresponds to text inside the utterance. The interior object is an array because the same text can appear in more than one sublist of a list entity.
211+
Each interior array corresponds to text inside the utterance. The interior object is an array because the same text can appear in more than one sublist of a list entity.
216212

217213
When mapping between the `entities` object to the `$instance` object, the order of objects is preserved for the list entity predictions.
218214

@@ -222,7 +218,7 @@ const predictedCanonicalForm = entities.my_list_entity[item];
222218
const associatedMetadata = entities.$instance.my_list_entity[item];
223219
```
224220

225-
#### Entity role name instead of entity name
221+
#### Entity role name instead of entity name
226222

227223
In V2, the `entities` array returned all the predicted entities with the entity name being the unique identifier. In V3, if the entity uses roles and the prediction is for an entity role, the primary identifier is the role name. This is possible because entity role names must be unique across the entire app including other model (intent, entity) names.
228224

@@ -285,11 +281,11 @@ In V3, the same result with the `verbose` flag to return entity metadata:
285281

286282
External entities give your LUIS app the ability to identify and label entities during runtime, which can be used as features to existing entities. This allows you to use your own separate and custom entity extractors before sending queries to your prediction endpoint. Because this is done at the query prediction endpoint, you don't need to retrain and publish your model.
287283

288-
The client-application is providing its own entity extractor by managing entity matching and determining the location within the utterance of that matched entity and then sending that information with the request.
284+
The client-application is providing its own entity extractor by managing entity matching and determining the location within the utterance of that matched entity and then sending that information with the request.
289285

290286
External entities are the mechanism for extending any entity type while still being used as signals to other models like roles, composite, and others.
291287

292-
This is useful for an entity that has data available only at query prediction runtime. Examples of this type of data are constantly changing data or specific per user. You can extend a LUIS contact entity with external information from a users contact list.
288+
This is useful for an entity that has data available only at query prediction runtime. Examples of this type of data are constantly changing data or specific per user. You can extend a LUIS contact entity with external information from a user's contact list.
293289

294290
### Entity already exists in app
295291

@@ -301,7 +297,7 @@ Consider a first utterance in a chat bot conversation where a user enters the fo
301297

302298
`Send Hazem a new message`
303299

304-
The request from the chat bot to LUIS can pass in information in the POST body about `Hazem` so it is directly matched as one of the users contacts.
300+
The request from the chat bot to LUIS can pass in information in the POST body about `Hazem` so it is directly matched as one of the user's contacts.
305301

306302
```json
307303
"externalEntities": [
@@ -317,7 +313,7 @@ The request from the chat bot to LUIS can pass in information in the POST body a
317313
]
318314
```
319315

320-
The prediction response includes that external entity, with all the other predicted entities, because it is defined in the request.
316+
The prediction response includes that external entity, with all the other predicted entities, because it is defined in the request.
321317

322318
### Second turn in conversation
323319

@@ -341,11 +337,11 @@ In the previous utterance, the utterance uses `him` as a reference to `Hazem`. T
341337
]
342338
```
343339

344-
The prediction response includes that external entity, with all the other predicted entities, because it is defined in the request.
340+
The prediction response includes that external entity, with all the other predicted entities, because it is defined in the request.
345341

346342
### Override existing model predictions
347343

348-
The `preferExternalEntities` options property specifies that if the user sends an external entity that overlaps with a predicted entity with the same name, LUIS chooses the entity passed in or the entity existing in the model.
344+
The `preferExternalEntities` options property specifies that if the user sends an external entity that overlaps with a predicted entity with the same name, LUIS chooses the entity passed in or the entity existing in the model.
349345

350346
For example, consider the query `today I'm free`. LUIS detects `today` as a datetimeV2 with the following response:
351347

@@ -376,7 +372,7 @@ If the user sends the external entity:
376372
}
377373
```
378374

379-
If the `preferExternalEntities` is set to `false`, LUIS returns a response as if the external entity were not sent.
375+
If the `preferExternalEntities` is set to `false`, LUIS returns a response as if the external entity were not sent.
380376

381377
```JSON
382378
"datetimeV2": [
@@ -406,22 +402,22 @@ If the `preferExternalEntities` is set to `true`, LUIS returns a response includ
406402

407403
#### Resolution
408404

409-
The _optional_ `resolution` property returns in the prediction response, allowing you to pass in the metadata associated with the external entity, then receive it back out in the response.
405+
The _optional_ `resolution` property returns in the prediction response, allowing you to pass in the metadata associated with the external entity, then receive it back out in the response.
410406

411-
The primary purpose is to extend prebuilt entities but it is not limited to that entity type.
407+
The primary purpose is to extend prebuilt entities but it is not limited to that entity type.
412408

413409
The `resolution` property can be a number, a string, an object, or an array:
414410

415411
* "Dallas"
416412
* {"text": "value"}
417-
* 12345
413+
* 12345
418414
* ["a", "b", "c"]
419415

420416

421417

422418
## Dynamic lists passed in at prediction time
423419

424-
Dynamic lists allow you to extend an existing trained and published list entity, already in the LUIS app.
420+
Dynamic lists allow you to extend an existing trained and published list entity, already in the LUIS app.
425421

426422
Use this feature when your list entity values need to change periodically. This feature allows you to extend an already trained and published list entity:
427423

@@ -459,12 +455,12 @@ Send in the following JSON body to add a new sublist with synonyms to the list,
459455
}
460456
```
461457

462-
The prediction response includes that list entity, with all the other predicted entities, because it is defined in the request.
458+
The prediction response includes that list entity, with all the other predicted entities, because it is defined in the request.
463459

464-
## Deprecation
460+
## Deprecation
465461

466-
The V2 API will not be deprecated for at least 9 months after the V3 preview.
462+
The V2 API will not be deprecated for at least 9 months after the V3 preview.
467463

468464
## Next steps
469465

470-
Use the V3 API documentation to update existing REST calls to LUIS [endpoint](https://aka.ms/luis-api-v3) APIs.
466+
Use the V3 API documentation to update existing REST calls to LUIS [endpoint](https://aka.ms/luis-api-v3) APIs.

0 commit comments

Comments
 (0)