CSML updates
CSML updates
www.csml.dev

Prepare for upcoming NLP behaviour change

 

Change

 

 

As a part of our current efforts to better integrate Natural Language Processing into CSML Studio chatbots, we are planning a change impacting bots connected with a NLU service provider (such as Dialogflow, Amazon Lex, IBM Watson…).

What is changing

Currently, if a chatbot user says something that is found to be an intent in your configured provider, the original text CSML event is transformed into a payload type of event, with a payload of IntentName (where IntentName is the actual name of the intent that was found by the NLU service). event.text will also contain the original text event as expressed by the user.

After this update, events matching an intent will have their payload formatted as intent:IntentName, where IntentName is once again the name of the intent that was found by the NLU service.

Why are we changing this behaviour

CSML developers have been complaining since the original release of the NLP feature that using the intent names was confusing in some cases where they could be mistaken for a regular text.

By prefixing found intent names with intent:, we believe that using NLU in CSML chatbots will be far easier. It will also allow us to color code intents in various places of the interface, which will eventually help with identifying them more quickly.

image.png

Finally, it is also part of a much bigger upcoming update that will allow you to directly train your NLU service, no matter what provider you are using, directly from CSML Studio.

How to find out if your bot is impacted

To check whether your bot is impacted by this change, visit the AI Rules > NLU Configuration panel. If your bot is running in Strict Mode, you are not impacted.

How to prepare for this change

To make sure that your bot continues working as expected, you should update your bot as follows.

  • If you are matching found intents with CSML flows in the AI Rules panel, every time you are using an intent in the left column, you should also add the new format in the list of triggers. For example, if you are matching IntentName with flow MyCoolFlow, you should also match intent:IntentName with the same flow. Then, save and build your bot.

  • If you are using the intent detection feature inside your flows (not as flow triggers but for example to help analyze what your users are responding to a question), you should adapt your code accordingly. There are many ways you can do that, but basically every time you have code such as:

if (event == "IntentName") { ... }

You can change it to:

if (event == "IntentName" || event == "intent:IntentName") { ... }

After the change goes live, you can then simply remove all the old mappings using the intent name directly and only keep the intent:IntentName syntax.

When does this change come into effect?

This change will be released gradually during the weekend of February 27-28th, 2021. To prevent any issue with your bot after this date, you should update your bots as described above before February 26th.

I don't know what to do, please help!

If you are unsure how to update your bot, please send an email to contact@csml.dev or reach out on Slack and we will guide you through the process.