What is Luis
The LUIS app
provides intelligence so the client application can make smart choices. LUIS
doesn't provide those choices.
Points to be noted:
- After the model is built and published to the endpoint, the client application sends utterances to the published prediction endpoint API. The API applies the model to the text for analysis. The API responds with the prediction results in a JSON format.
- The minimum JSON endpoint response contains the query utterance, and the top scoring intent. It can also extract data such as the following Contact Type entity.
- Improve model prediction:After a LUIS model is published and receives real user utterances, LUIS provides several methods to improve prediction accuracy: active learning of endpoint utterances, phrase lists for domain word inclusion, and patterns to reduce the number of utterances needed.
Query the endpoint
with a different utterance
- In the Manage section (top right menu), on the Keys and endpoints page (left menu), select the endpoint URL at the bottom of the page. This action opens another browser tab with the endpoint URL in the address bar.
- The endpoint URL looks like https://<region>.api.cognitive.microsoft.com/luis/v2.0/apps/<appID>?verbose=true&subscription-key=<YOUR_KEY>&<optional-name-value-pairs>&q=<user-utterance-text>.
For
e.g https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/2ff8d79d-0466-4f37-8856-e636574bc436?verbose=true&timezoneOffset=-360&subscription-key=d653c07e5fd04debae8def9f88e5eff7&q=Turn
off the lights
Will
look like
Normal steps
followed in LUIS
- Create a new app
- Create intents in default model
- Add example utterances
- Train app
- Publish app
- Test model: Get intent from endpoint URL hit
Points must know
about LUIS
- If LUIS returns the "None" intent for an utterance, your client application can ask if the user wants to end the conversation or give more directions for continuing the conversation.
- The verbose=true querystring parameter means include all the intents in the app's query results.
- The JSON result identifies the top scoring intent as topScoringIntent property. All scores are between 1 and 0, with the better score being close to 1.
- LUIS doesn't provide answers to user utterances, it only identifies what type of information is being asked for in natural language. The conversational follow-up is provided by the client application such as an Azure Bot.
- LUIS doesn't know about the changes until it is trained.
- In order to receive a LUIS prediction in a chat bot or other client application, you need to publish the app to the endpoint.
- The authoring key and endpoint key have different purposes. Do not use them interchangeably.
Login details
required in client application
- {AUTHORING_KEY}: This key is used to get the packaged app from the LUIS service in the cloud and upload the query logs back to the cloud. The format is
- {APPLICATION_ID}: This ID is used to select the App.The format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
- {API_KEY}: This key is used to start the container. You can find the endpoint key in two places. The first is the Azure portal within the Cognitive Services resource's keys list. The endpoint key is also available in the LUIS portal on the Keys and Endpoint settings page. Do not use the starter key
- {ENDPOINT_URI}: The endpoint as provided on the Overview page.
LUIS boundaries /limitations
- Intents: 500 per application: 499 custom intents, and the required None intent.
- Utterance: 500 characters
- Utterances: 15,000 per application - there is no limit on the number of utterances per intent
- Versions : no limit
- Version name: 10 characters restricted to alphanumeric and period (.)
Object naming
Do not use following
characters in following names
- Intent, entity, and role names : $
- Version name \/:?&=*+()%@$~!#
LUIS Authoring
regions
|
LUIS
|
Authoring region
|
Azure region name
|
|
U.S. , not Europe,
not Australia
|
westus
|
|
|
Australia
|
australiaeast
|
|
|
Europe
|
westeurope
|
******Publishing
regions are tied to authoring regions**********
The authoring region
app can only be published to a corresponding publish region. If your app is
currently in the wrong authoring region, export the app, and import it into the
correct authoring region for your publishing region.
Europe publishing regions
|
Global region
|
Authoring API region & authoring website
|
Publishing & querying region
API region name
|
Endpoint URL format
|
|
westeurope
|
France Central
francecentral
|
||
|
westeurope
|
North Europe
northeurope
|
||
|
westeurope
|
West Europe
westeurope
|
||
|
westeurope
|
UK South
uksouth
|
Boundaries
Useful links
LUIS APIs link : https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c46
Azure portal account
: https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.CognitiveServices%2Faccounts
Install and run LUIS
docker containers: https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-container-howto
Authoring and
endpoint keys: https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-concept-keys
Comments
Post a Comment