What are Q&A and why should I consider using them in my bot?

Q&A stands for Questions & Answers
It is the simplest way to link an intent, to a response.
If you need more complex interactions involving multiturn dialogs, dynamic answer and use of external API calls, you should consider using the dialog flows.
But if you need simple interactions involving one question => on response pairs, Q&A will be very helpful.

Do I have to choose between Q&A and Dialog flows ?

Nope, you can use both! πŸ™‚
What will happen then is that during the training of the bot, all the intents will be merged together in a big NLU Model.
Then, here is what happen at each user request:
1 - the dialog engine asks the NLU Model for the best intent find in the user request
2 - the dialog engine will search for a match in the dialog flow
3 - if no answer is found in the dialog flow, the dialog engine will try the Q&A
Below is an illustration of this workflow.

Creating Questions/Answers

The Q&A component is available at the following location the Datasets > Q&A

Add a question / answer pair

To add question / answer pair, simply click on the following button

then you will be prompted with a Q&A form where you can add the question and the answer.

Later, you will be able to edit the Q&A by clicking on the pen icon.

For a better performance, you should add multiplie variations to each question.
Those variations will help the bot to learn and have a better understanding rate on your FAQ.

πŸ“˜

How many variations is necessary?

We recommand at least 5 variations per question. For tips on how to design those variations, you can check our tips here

What message formatting is possible for Q&A responses?

You can add some HTML tags to your responses.
Here is a list of the whitelisted tags:

<b> bold text <b>
<i> italic text </i>
<br> new line
<a href="https://linux.org" target="_new"> This is the url to the Linux website </a>

🚧

target="_new"

In the case you want to add links in your Q&A, you will use the <a> tag.
It is important to add the target="_new" param in the tag so the url will be opened in a new tab and not in the webchat itself πŸ˜‰

Using import files

If you already have a big FAQ file, you can leverage this data and upload it directly in the bot platform.

You can get a pre-formated file by clicking on the button at the center of the Datasets > Q&A section.
A file download will start.

πŸ“˜

Use our template to get the right file format

To keep special characters well managed by the platform, use our template (as shown below) and then change its content with yours.
Otherwise, the file format supported by the platform is CSV UTF8 + BOM with ; separation.

Open the file and update the content with the Q&A you want to push on your bot.
Hit save as and rename the file.

Upload your new file by clicking Import Q&A and selecting it.

Your Q&A should appear.
All the intents have been automatically created :)
Click the Train button to launch the training of your bot with those new intents.

🚧

Updating your Q&A

If you already have a Q&A, a popup will ask you for confirmation before overwriting your current Q&A with the one on your file.

You can now ask questions from your Q&A from the Simulator and from all you bot channels!

Good to know

  • Once the user request reception, the bot will first check your dialog flows then your Q&A
  • You can use our "Chit Chat" template in a dedicated bot
  • Try to adapt your website FAQ to the conversational format with shorter messages. Long text usually don't work well on chat channels