Test the bot
Last updated
Last updated
Tous droits réservés @ 2023 dydu.
As you build your bot in the Dydu BMS, you can use the Test bot to see how the bot answers user questions so that you can detect and fix any unexpected behavior.
Go to the Knowledge page and click on the Test my bot button at the top of the knowledge list.
It's a good idea to select new dialog at the top right of the Test bot panel to clear previous conversations. Clearing previous conversations allows to erase any parameters (such as variables or bounce conditions) used by the bot that will impact the matching results.
At the "Type your question here" prompt at the bottom of the test bot, enter the predefined user question to start the conversaiton.
It can be written the same as the user question, with intentional misspellings or by replacing certain words with their synonyms.
This will allow you to detect any weakness in your bot and enrich it.
TIP
With the Up and Down arrow key on your keyboard, you can navigate through messages sent previously until you click the "new dialog" button.
If you have several consultation spaces that contain different answers to the same user question, use the drop-down list at the bottom of the test to to choose the consultation space in which you want to run your test.
To know more about the consultation space, read this article.
When the test bot does not understand a user query, it will provide a general phrase shown in the orange color. (This general phrase can be personnalized here.)
In this case, you can train the bot to recongnize the query either by creating a new knowledge item or adding a formulation to the existing knowledge item.
When the bot does not understand a user query, it implies that after processing the query the bot was not able to identify any knowledge item with a matching score high enough to provide an answer.
Therefore, you can enrich the best-matched knowledge item with the misunderstood query to improve its matching score so that it can be used by the bot as a matched answer.
To do so:
Click on the magnifying glass icon (Search) above the bot's answer.
This will open on the right of your screen a list of knowledge items that have been analyzed by the bot for this query sorted from the highest score to the lowest.
Choose the knowledge item that is the closest to the intention of the misunderstood query and click Complete this knowledge.
Confirm (or modify) the user question that you want to associate to this knowledge item and click on the Associate button.
You will receive a confirmation message that the new formulation is now added to the existing knowledge item. You can test the bot again to check the behavior.
The test bot only allows you to create simple knowledge items. Other knowledge types such as slot or event triggers must be created from the Knowledge page.
To create a new knowledge item from the test bot, click on the the + button above the bot's answer.
It opens the knowledge edition panel on the right of the screen with the misunderstood user query alrealy pre-filled:
Edit this knowledge item as you would usually do.
Reset the dialog of the test bot and ask it the same question. The bot now should give you the expected answer.
The Debug feature of the test bot allows you to get insights about your bot's behavior such as variables use, conversation log, matching details, etc.
The debug panel is accessible on the top right of the test bot by clicking the button.
After the bot reacts to your query (whether with an expected answer or not), you can open the debug panel to check how the bot has processed the question.
As shown in the image below, in the Matching section knowledge items that have been analyzed by the bot are sorted by matching scores et bots.
The item with the highest score is provided as the bot's answer.
Please note that if both the social bot and the business bot have an answer that scores the same, it's the business bot that takes over.
By clicking on the icon you can look at how the bot has processed each word of the user question. It's useful to look at this panel to find out why sometimes you get unexpected answers from the bot.
Matching Score with a Knowledge :
The score of each intent in the knowledge ranges from 0 to 100%.
From 0 to 50%: The intent is considered a failure. If no intent with a higher score is found, the user's phrase is considered as not understood.
From 50% to 79.98%: The intent is considered a rewording (or reword). If no intent with a higher score is found, alternative intents are suggested to the user.
Above 80%: The intent is considered a direct match. A response is provided to the user using the intent with the highest score.
A score of 0 means there is no similarity between the two phrases, while a score of 100% means the two phrases are identical.
Sometimes you might get a "wrong" (unwanted) anwser from the test bot. However, when you look at the matching details, the matching algorithm has a 100% match with the "right" answer and somehow the latter was not used by the bot. Why?
There are several reasons for that.
The knowledge item is disabled:
when the bot matches with a disabled knowledge item, the bot behaves as if there is 0 match (meaning that it will not even answer with the second most matched knowledge item).
Matching with a keyword:
when the bot matches with a keyword contained in a knowledge item, the latter will be considered by the bot as a more appropriate answer than any item with a higher matching score.
There is a match after rewording but the "enable reword" option is not activated:
when the bot does not find a direct match between the user query and any knowledge item, it can still match with an exsting item whose intention is close to the original query and use its answer as output.
In this case, the knowledge item is used as a rewording. However, if the option "enable reword" is not activated on the rewording knowledge item, it can not be used by the bot.
There is a match after rewording but the item as part of a desicion tree is not directly accessible:
if the rewording knowledge item is a sub-item of a decision tree on which direct access is not allowed, the bot will not use it to answer the user query.
The option "only display published rewords" is activated while the rewording knowledge is not published:
the option "only display published rewords" allows the bot administrator to only test on finished and published knowledge items.
Therefore, if a rewording knowledge item is not published, it will not be used by the bot to provide answers.
If none of these explanations help you resolve your issue, please contact our support team.