cathaldi
cathaldi

Reputation: 161

Q: IBM Watson conversation - Capturing two different entity values from an entity list

I'm trying to get more familiar with watson conversation so I'm trying to make a fruit selling chatbot, and as a feature I would like to add facilitate fruit swapping.

I initially tried with a single entity list but from watching the Watson conversation airport chatbot tutorial I've duplicated an existing @fruit entity into 2 entities, @giveFruit and @receiveFruit.

I'm having difficulty capturing the 2nd entity in conversation however.

"I have an apple but I want an orange"

For example: apple is captured as both the @giveFruit and @receieveFruit entity.

I'm not quite sure how to go about capturing 2 distinct entity values from either a single or multiple entity lists.

Upvotes: 1

Views: 193

Answers (1)

Bene
Bene

Reputation: 209

general Settings

You should only define one entity for fruit in general because otherwise its impossible to differentiate. In addition two more entities for receive and give. For the general recognition of the intent you can define a fruit exchange intent.

Entities:

  • Fruit
  • give
  • receive

Intent:

  • Fruit exchange

Create Slot

Finally you need to use the slots feature to make sure every of the required entities is provided by the user and maybe asked if one input was not provided.

Configure Slots:

  • Insert as check for @give AND @fruit save it as $giveFruit
  • Insert as check for @receive AND @fruit save it as $giveFruit

Example inclusive screenshots here: Slots example here

Upvotes: 1

Related Questions