LUIS App Using SDK - Creating and Adding Intents and Utterances
Explore the process of creating a LUIS application using the Azure Python SDK. Learn to add intents, incorporate pre-built geographic entities, and provide training utterances to build a functional conversational AI that can interpret user requests and fetch weather information.
Introduction
In this lesson, we’ll build a LUIS application that will identify the city that is present in the user utterance and then check the weather for that city. We’ll use a pre-built entity to create the entity.
Dependencies
To work with this chapter and run the code snippets on your local machine, you would need the following package to be installed:
azure-cognitiveservices-language-luis
To learn how to install the packages, please visit the Appendix section.
Implementation
We’ll follow the steps mentioned below to create and consume the LUIS app:
-
Step 1: We’ll create an app in LUIS using the Python SDK’s
ApplicationCreateObjectclass. -
Step 2: We’ll add one intent in the LUIS app that will contain the utterances to identify the user’s intent to check the weather of a particular city.
-
Step 3: We’ll add a pre-built entity, geographyV2. This entity will identify and extract all the geography-related text from the user utterance like country name, city name, state name, and so on.
-
Step 4: We ...