Creating your first chatbot
This integration allows ThumbCrowd to offer advanced Natural Language Understanding capabilities in any language and context driven dialogue management.
Last updated
This integration allows ThumbCrowd to offer advanced Natural Language Understanding capabilities in any language and context driven dialogue management.
Last updated
Similarly to human-to-human interactions, human-to-machine interactions are based on dialogue turns. A turn consists in a user input followed by a virtual assistant response.
In ThumbCrowd, you can design automated conversations in fragments called stories and rules. The rules are for very simple interactions using automation flow not requiring AI, such as FAQ, and launching a form, and stories are for conversational experiences when you expect AI to complement the cases you provide in your data. For logical flows with complex conditional logic, you can use forms (and rules or stories to orchestrate them)
Let’s start with a simple example, how to create a new domain and intent.
Training phrases are example phrases for what end-users might type or say, known as end-user input. When end-user input resembles one of these phrases, ThumbCrowd matches the intent. You don't have to define every possible example, because ThumbCrowd's built-in machine learning expands on your list with other, similar phrases.
Let’s have a closer look to what happened in that video:
We created a new intent in the domain of menu and give it name menu.main.
We defined Start the phrases with a user utterance (menu)
We set the response given by the assistant.
Add intent mapping question for the user in that case if the bot has a low confidence to predict the intent
When you save a user utterance, it is also added & edit to your training data to easily develop and enhance your model.
Conversation-Driven Development (CDD) means letting real user conversations guide your development. For building a great NLU model, this means two key things:
It is always a good idea to collect as much real user data as possible to use as training data. Real user messages can be messy, contain typos, and be far from 'ideal' examples of your intents. But keep in mind that those are the messages you're asking your model to make predictions about! Your digital assistant will always make mistakes initially, but the process of training & evaluating on user data will set your model up to generalize much more effectively in real-world scenarios.
In order to gather real data, you’re going to need real user messages. A bot developer can only come up with a limited range of examples, and users will always surprise you with what they say. This means you should share your bot with test users outside the development team as early as possible.
Intents are classified using character and word-level features extracted from your training examples. When different intents contain the same words ordered in a similar fashion, this can create confusion for the intent classifier.
Intent confusion often occurs when you want your digital assistant's response to be conditioned on information provided by the user. For example, "How do I get flight to KHI from Dubai?" versus "I want to get flight from London "
Since each of these messages will lead to a different response, your initial approach might be to create separate intents for each flight type, e.g. booking_flight_KHI
and booking_flight_London
. However, these intents are trying to achieve the same goal (get flight) and will likely be phrased similarly, which may cause the model to confuse these intents.
To avoid intent confusion, group these training examples into single booking_flight
intent and make the response depend on the value of a categorical product
slot that comes from an entity. This also makes it easy to handle the case when no entity is provided, e.g. "How do I get flight to KHI?"
You can define custom entities and annotate them in your training data to teach your model to recognize them.
Regexes are useful for performing entity extraction on structured patterns such as 5-digit U.S. zip codes. Regex patterns can be used to generate features for the NLU model to learn, or as a method of direct entity matching.
Lookup tables are processed as a regex pattern that checks if any of the lookup table entries exist in the training example. Similar to regexes, lookup tables can be used to provide features to the model to improve entity recognition, or used to perform match-based entity recognition. Examples of useful applications of lookup tables are flavors of ice cream, brands of bottled water, and even sock length styles.
Adding synonyms to your training data is useful for mapping certain entity values to a single normalized entity. Synonyms, however, are not meant for improving your model's entity recognition and have no effect on NLU performance.
A good use case for synonyms is when normalizing entities belonging to distinct groups. For example, in an assistant that asks users what insurance policies they're interested in, they might respond with "my truck," "a car," or "I drive a batmobile." It would be a good idea to map truck
, car
, and batmobile
to the normalized value auto
so that the processing logic will only need to account for a narrow set of possibilities.
It is always a good idea to define an out_of_scope
intent in your bot to capture any user messages outside of your bot's domain. When an out_of_scope
intent is identified, you can respond with messages such as "I'm not sure how to handle that, here are some things you can ask me..." to gracefully guide the user towards a supported skill.
We can’t expect a user to always greet with Hello. There are many ways to greet and we want our virtual assistant to understand as many as possible.
We need to teach our assistant many ways of greeting: our story isn’t just about replying to someone saying Hello, it is about replying to all users greeting your AI assistant.
Click on the user utterance and add your examples as shown below:
You can now train your bot and talk start chatting.
ThumbCrowd comes with different response types. In the examples above we used text responses, but in many cases you want to offer easy options to users.
In the example above, we could provide a button menu.