Simple bots work by taking an input (a user utterance) and providing an output (the bot response). This utterance and response map to an intent. These simple interactions are called QA pairs. Tecnically, a QA pair support multiple utterances and responses for the same intent. For convenience, we just call it a QA “pair”.
To add a QA Pair, go to Authoring > Train. Ensure that you are in the Questions and Answers tab. The interface is designed for fast bot prototyping. You can quickly add distinct user utterances, one after another. Click the line that says “Add utterance” to add an utterance. Hit enter to record the utterance. You can now add another utterance (for a different intent).
Each time you add an utterance, the platform automatically generates an intent id and detects the language of the utterance. You can change these values in the interaction editor.
Depending on the bot you created, you may or may not have pre-installed interactions.
Now that you have some utterances, you can edit each interaction and add more utterances along with some resposes. Click an utterance to view the interaction details. The interaction editor modal shows
You can change the intent name to whatever you want. In general, try to make it reflect the utterances, as it is used for reporting and analytics. Try not to change them too much, as it can create inconsistencies in the collected statistics.
If the system mis-classified the language, you can change it to the correct language via the dropdown menu.
You can add as many additional utterances as you like. This helps teach the bot about variations in lanugage for the same concept.
You can also add as many responses as you like. The bot will randomly choose
from the responses provided when the intent is triggered. If you don’t provide
a response, the bot will use the response in the special intent
Changes made in the GUI are local to your browser. Click the Test Bot button to upload the changes and save to the server. This will trigger the training and testing process for the bot. The platform automatically tests the bot for inconsistencies in utterances across your intents. If there are any misclassification errors, you will be told where the errors are. This saves you a lot of time, since you only need to test out-of-sample utterances.
If you encounter a training error, an error message will appear. Scroll through your list of interactions to find the errors. For mismatches, click the interaction to see which utterance is confusing the bot. To resolve the situation, either merge the two interactions, or delete the offending utterance.
Training errors are for informational purposes. We recommend resolving the issues, but it is not required. You can still publish your bot even when it has training errors, although the bot behavior may be less reliable.
When you are ready to publish your bot live, click the Save and Continue button. This will train one more time and advance you to the Preview and Publish page.
All bots have pre-defined special intents. You can use these intents to customize the behavior of the bot. To customize the behavior, create a new interaction with dummy text. Open the interaction editor and change the intent name to one of the ones in the table below. Remove the utterance and provide a response. The bot will then respond with the text you entered.
||What the bot says when it doesn’t understand a user utterance|
||What the bot says when the matched intent does not have any responses defined|
Use the search bar to find a specific interaction. Both the intent name and the utterance will be searched for matches. The list of interactions are filtered dynamically to show all matching interactions.