Creating entities in AI applications involves defining the data elements or objects that you want the AI to recognize and interact with. In the context of AI-102 Designing and Implementing a Microsoft Azure AI Solution exam, it heavily leans on creating entities for AI models such as Language Understanding Intelligent Service (LUIS), QnA Maker, and Azure Bot Service. Here, let’s discuss how to create entities in LUIS and QnA Maker.
LUIS Entities
LUIS (Language Understanding Intelligent Service) is an AI service that allows the application to understand the user queries in their natural language. The primary components of LUIS are Intents, Utterances, and Entities. While Intents represent the action the user wants to take, Entities represent the detailed context about Intents.
To create a new entity in LUIS:
- Go to the LUIS portal and select your app.
- Click Entities in the left navigation.
- Click the ‘Create’ button.
- Provide appropriate name for your entity and select the type.
- Click ‘Create’.
Here, entities can be simple such as a temperature or more complex like a flight booking order consisting of destination, time, and passenger details.
Below are various types of entities provided by LUIS:
Entity Type | Description |
---|---|
Simple | Easy mapping to a single word or phrase |
Composite | Consists of multiple simple entities |
Prebuilt | Entities already available (like number, temperature, etc.) |
List | Explicitly specified values |
Pattern.Any | Entities based on pattern expression |
Regex | Entities based on regular expression |
Hierarchical | Consists of multiple levels |
QnA Maker Entities
QnA Maker is a cloud-based API service part of Azure Cognitive Services, which allows creation of a conversational layer based on existing content. In QnA Maker, Entities are used to extract the required detailing from the users’ queries.
In QnA Maker, while creating knowledgebase, entities are automatically identified by using the language models in Azure Cognitive Services. However, if you want to add more entities, go to the “Settings” of the knowledgebase, and then add the name of the entity in the “Extraction categories for enabling entity extraction in the prediction endpoint” field.
When you retrain and publish the knowledgebase, these added entities will be identified in the users’ queries.
Unlike LUIS, QnA Maker does not allow creating various types of entities. Though, it relies heavily on the prebuilt entities like Email, Url, PhoneNumber, DateTime, etc.
Conclusion
Understanding entities in AI solutions can significantly help in improving the interaction and response accuracy of your AI apps. Since it provides the necessary context, creating and training entities according to your domain is a crucial part of developing a sophisticated AI solution with Azure.
In conclusion, learning to create entities appropriately, will be a high-demand skill while preparing for AI-102 Designing and Implementing a Microsoft Azure AI Solution exam. The knowledge will ensure you are fully equipped to utilize LUIS, QnA Maker, and other Azure AI services to their full potential.
Practice Test
True/False: In Microsoft Azure AI, you can create a custom AI model without any coding or machine learning expertise.
- Answer: True
Explanation: Microsoft Azure AI includes pre-built AI models that require no coding or machine learning expertise. It also has tools for building custom models with automatic feature engineering.
True/False: When creating entities in Microsoft Azure AI, it’s better to add as many entities as possible.
- Answer: False
Explanation: When creating entities, it’s advised to only add entities that are necessary to achieve your goals. Adding too many entities can result in poor prediction performance and longer training times.
What is the first step in creating entities in Microsoft Azure AI?
- A) Defining actions
- B) Writing the code
- C) Specifying the name
- D) Defining the structure
Answer: C) Specifying the name
Explanation: The first step in creating entities in Microsoft Azure AI is to specify the name. The specified name should be unique and meaningful.
What are the common types of entities in Microsoft Azure AI?
- A) Simple, Composite and Hierarchical
- B) Integer, String, and Float
- C) Types, Instances, and Roles
- D) A and C
Answer: D) A and C
Explanation: In Microsoft Azure AI, Simple, Composite, Hierarchical as well Types, Instances, and Roles are the types of entities used.
True/False: It’s not possible to change the entities after they have been created.
- Answer: False
Explanation: After an entity has been created, it is possible to change it by editing the entity.
To create a structured data model within an Azure AI project, you would utilize:
- A) Python
- B) Graph Databases
- C) Knowledge Store
- D) Excel Spreadsheets
Answer: C) Knowledge Store
Explanation: The Knowledge Store in Azure AI is used to create a structured data model, which can provide organized information for further analysis.
True/False: Azure AI solutions require intensive programming knowledge.
- Answer: False
Explanation: Microsoft Azure AI solutions do not necessarily require intensive programming knowledge as it provides pre-built AI models in addition to its range of tools for building custom models.
True/False: Entities in the Azure AI solution can be imported from outside data sources.
- Answer: True
Explanation: Entities can be imported from outside data sources, adding flexibility and efficiency to the AI solution.
What is one of the main purposes of creating entities in Azure AI?
- A) Improve training times
- B) Improve prediction accuracy
- C) Generate useful insights from the data
- D) All of the above
Answer: D) All of the above
Explanation: The main purposes of creating entities in Azure AI are to facilitate meaningful analysis, improve prediction accuracy and improve training times.
In Azure AI, a “simple” entity type refers to which of the following?
- A) A predefined entity
- B) A single identifiable item
- C) An entity that defines a specific role
- D) A combination of two or more entities
Answer: B) A single identifiable item
Explanation: In Azure AI, a simple entity refers to a single identifiable item, while predefined entities are built into the system, role entities perform specific roles, and composite entities are combinations of two or more entities.
Interview Questions
What is an entity in relation to Microsoft Azure AI?
An entity in Microsoft Azure AI represents a class of objects or concepts that is relevant to a given task. For instance, in a travel bot scenario, possible entities could include things like ‘Airline’, ‘Destination’, or ‘Date’.
How can you create an entity in Azure AI?
An entity in Azure AI can be created through the language understanding service (LUIS). One needs to navigate to the LUIS portal, select the app for which they want to create an entity, go to the Build section, opt for Entities from the left navigation, and then choose Create.
What are the types of entities available in Microsoft Azure AI?
The types of entities available in Azure AI are machine-learned entity, role of an entity, pattern.any entity, list entity and regex entity.
What does a machine-learned entity do in Azure AI?
Machine-learned entities enable the model to extract data based on the example utterance you provide, so you don’t have to manually specify every variant of a question.
How can the role of an entity be applied in a LUKE model?
The role of an entity is used to clarify the context-based meaning of a word. For instance, in the sentence “I flew from New York to San Francisco,” the word ‘New York’ is a city but specifically in the context it is the city of departure.
What is a pattern.any entity in Azure AI?
The pattern.any entity extracts different types of data that are found with a specific pattern in an utterance.
What do you understand by a list entity in Azure AI?
A list entity in Azure AI is a fixed, closed set of related words or phrases that the bot is trained to recognize from the user’s input.
Define a regex entity in terms of Azure AI?
A regex entity refers to a regular expression entity that allows the bot to recognize the entities based on a pattern of characters.
Can you delete an entity in Azure AI?
Yes, you can delete an entity in Azure AI. However, before deleting an entity, you must first remove references to it from intents.
What is an entity’s normalized value in Azure AI?
An entity’s normalized value is a canonical form that the entity represents, which may differ from how it’s represented in the utterance.
How can you use entities in Azure AI?
In Azure AI, entities can be used to capture and make use of specific details from the user’s input. For example, if a user says, “I want to visit Paris next week”, the bot can detect “Paris” as a destination entity and “next week” as a date entity.
What happens when two entities overlap in Azure AI?
When two entities overlap, Azure AI follows a precedence where pattern.any entity is recognised first, followed by explicit, regex, prebuilt, and lastly the pattern entities.
Can I rename an entity in Azure AI?
Yes, in Azure AI, you have the option to rename your entities as per your preference.
Can one utterance contain multiple entities in Azure AI?
Yes, one utterance can contain multiple entities. For instance, in the request “Book me a flight from New York to London tomorrow”, ‘New York’ and ‘London’ could be recognized as city entities, and ‘tomorrow’ could be recognized as a date entity.
Is it possible to create an entity without using any regex pattern in Azure AI?
Yes, it is possible to create an entity without using a regex pattern in Azure AI. For example, you can create a machine-learned or a list entity.