Customer queries are the most common way to trigger an intent. Simply, if you want to trigger an intent when a user asks the question “where is your office”, you can add that question as a query for that intent.
Adding queries to an intent
To do so, when creating or editing the intent in Studio:
- Click the Add query (user says) button.
- Type the query in the User says field.
Query variants
Of course, you cannot assume that the user will type the question in exactly the way you expect. Even if they do type the question you were expecting, they may mistype when doing so. Thanks to language recognition and AI, the query does not need to match exactly, it will recognise slight differences and typos, and still match this intent.
Nevertheless, it is a good idea to add your own variants of the query, to help catch broader differences.
To add more queries, do either or both of:
- Click the add new query link and type your new variant of the query in the next query field.
Or
- Click the icon to the right of your query to generate some AI-suggested variations.
- In the Add AI generated queries dialog, click to tick the query variants you would like to include.
- Click the Add button.
How many variants should an intent have?
While there are no hard rules for how many variant to use, there are several factors to consider:
- It is good to have at least five variations of the query to get enough accuracy and avoid "false positives", which lead to the bot giving the wrong answer.
- While there is no maximum number of query variants you can have, you cannot use the AI suggestions if you have more than 10 variations already.
- You might experience performance issues if there are hundreds of queries in a single intent.
Unanswered messages
Once your chatbot has been in use for a while, you may realise that users have found ways to ask their query that you and and the AI didn't account for. These will appear as unanswered messages for your chatbot. These are an vital tool in further training your bot. See the article Educating your chatbot with unanswered messages .