Step 3: Create the card type questions

We have our entity and our passage, it's time to create the questions that will capture the card type the user mentions and store it as our entity value.

Let's take a quick look at how entities work:

  • An entity has a set of values, which are words or phrases that should match the entity.
  • When your user asks a question, the chatbot matches it against all its training phrases.
  • If the training phrase that best matches the question uses an entity, the chatbot compares the user's question to the entity values:
    • If the words the user mentioned match a value in the entity, that value is assigned as the entity's value for the passage.
      If the matching term was a synonym, the primary value is assigned, not the synonym.
    • If the words the user mentioned don't match any of the entity's values, the training phrase is still selected, but the entity value is blank.

In this case, the chatbot compares the user's words to all the card types and synonyms we defined. If the user asks to apply for a card type we didn't define, such as a Frequent Shopper Card, our training phrase will still match, but the entity value will be blank.

Let's create an Inbound Question to capture the card type:

  1. In the Credit card application passage, click Inbound Questions.
  2. Add a new Global question.
  3. Type a training phrase.
    When you want to use the entity in the phrase, type @ and select the entity from the list.
    Each entity can only be used once per training phrase.
  4. Add more training phrases until you have at least five.
    Make sure all your training phrases use the entity. If you use the Generate Training Phrases option, make sure you edit each phrase to use the entity.
  5. Click Save.

Make sure all training phrases use the entity

The entity is assigned by the matching training phrase. If the training phrase that best matches doesn't use the entity, then the chatbot won't capture the information. The passage will still be selected, but there won't be any value in the entity, and the entity placeholder will be blank.

This also happens if the conversation flow reaches the passage without matching a question, such as being directed from another passage, or if the words the user used don't match any of the entity's values.

To capture the card type and use it in our response, we need to make sure every training phrase in the Inbound Questions for this passage use the entity, and that there is no other way the conversation flow can reach this passage.

Now that we've captured a value for our entity, let's use it in our chatbot response.

Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.