In this How-To, we will explore a scenario in a Banking Bot, where traits can be used to steer the conversation flow in a more natural and predictable direction. For details on what Trait is and how it is implemented in the Kore.ai Bots platform, refer here.
Problem Statement
Consider the cases where the user is trying to report an issue or ask a question pertaining to “Transfer Funds”. The Bot will trigger the “Transfer Amount” intent as opposed to “Issue Resolution” or “FAQ regarding Funds Transfer”
In this document, we will show how Traits can be used to identify such situations and take appropriate action.
Implementation
Intent Detection using Traits
We will be using Trait to steer the conversation to “Issue Resolution” when the word “issue” is present in the User Utterance.
Steps:
- Select Build tab from the top menu
- From Natural Language -> Training select the Traits tab.
- Click Add New Trait. We will be using a trait to identify the existence of the word ‘issue’ in the user utterance.
- Add a Trait Type as Problem Statement, and Traits as issue. A given Trait Type can have multiple Traits grouped together logically.
- Optionally you can add utterances for Issues as ‘problem’, ‘unable to’, and ‘not working’. These are the alternate words that users might use to indicate an issue.
- Save & Add Rule
- We will be defining the intent that needs to be triggered in the presence of this Issue trait.
- Select Intent – Issue Resolution to be triggered in presence of the trait.
- Add the Trait Rules – issue as the trait that should trigger the above selected intent.
- Save the Trait Mapping
- Train the Traits.
- Open the Issue Resolution Intent to see the Trait Rules under the NLP properties panel updated with the issue trait.
- Run the Bot and see the changed flow.