简体   繁体   中英

Watson Assistant: Can I define Intent using Entities in the Examples?

How to I create an #Intent which looks something like this:

How much is a @ProductType ?

Whereas the @ProductType is an simple Entity which consists of:

Soft Drinks: Coke, Pepsi, Sprite, Fanta
Fruits: Apple, Banana, Watermelon

I tried adding an Intent with above settings, but it doesn't seem to work. Is such ability natively supported in IBM Watson? Or otherwise, do I need to manually handle in the Dialog, using Conditions and stuffs? Please kindly advise.

The training is based on regular language and typical sentences or phrases. So @ProductType is not what you want in the phrase, but any of the fruits or drinks.

By defining the entities, Watson Assistant later learns the connection and to identify the entities and intents.

To get started, you define the intents and entities. Both can be imported from lists. Then you add the dialog which references the different types.

This blog should give insight to all the ways to train an entity and how it is used within intents. https://medium.com/ibm-watson/all-about-entities-dictionaries-and-patterns-with-watson-assistant-part-1-5ef7254df76b There are a number of possible pipelines you can choose from. 1. Indirect references: this is the preferred method. Use natural language in your intent training data. "I want to buy a pear" Watson will automatically see the other values you have related to pear and use those as intent training as well. This will be the fastest and simplest way to manage your data 2. Direct references: this should only be used if absolutely necessary Directly reference the entity in your intent data. "I want to buy an @pear" Nothing is done in the UI to tell you this works, but it does. This tells Watson the entity is a very important term and will increase the weight, as well as reference all synonyms with high weight. This is more effort for you to go through your entire workspace and relabel everything this way, hence why it is not recommended unless absolutely necessary. By doing this, you also tell watson that when the system sees various fruits without the @ symbol, to ignore them as entities which is not ideal 3. Contextual entities. This is highlighting them like in your screenshot. Note the UI has been updated so there is no an annotation mode instead of just highlighting. This builds a model around the entity, and is good for things like names or locations, but not necessary for a small list of items like crayons in a box, or fruit in a store. This will ignore all of the dictionary values youve created and only look at the model. It should be used according to the blog above when the use case is ideal.

What @data_henrik answered was partially correct. But it doesn't seem like Watson Assistant " automatically " learns the preferred @Entity just by simply inputting the pure (plain-text) Examples into the #Intent . In fact, that step was required. But we still need to do one more step.

After keying in the good plain-text Examples into the #Intent , we then still need to "right click" on the text-string of the possible @Entity entry, and then choose (teach Watson) the correct @Entity name from the dropdown list appeared.

Only then Watson starts to understand such; this #Intent uses that @Entity , I suppose.

在此处输入图片说明

Thank you @data_henrik, and appreciate your hint.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM