OpenAI Intent Detection

 

https://www.youtube.com/watch?v=YHHG3-COwoI

 

UChat with its native integration with Open AI has now released an intent detection system, which enables the users to collect parameters based on the intent of the query provided. The system works like Google’s Dialogflow where you make intents and fill out entities.

 

The feature only works when you have your Open AI integrated, hence we will establish a connection betwee OpenAI and UChat.

Connecting OpenAI Account:

 

Follow the steps to integrate your OpenAI account with your Uchat account.

 

Visit https://platform.openai.com

 

Login using your credentials.

 

 

 

Click on top-right corner on the “Personal” tab.

 

 

From here, you will be able to generate an api key.

 

[Note : You will only be able to see your api key once]

 

 

 

 

Paste your api key inside Uchat and click “Save” to establish the connection.

 

 

Your account has successfully been connected with Uchat.

 

Using Intents

You can use intents by going inside the Automations tab from inside your bot.

 

The priority system within automations is that the bot will first recognize the intents, then comes keywords and in the last comes the default reply.

 

Creating Intents

Enable the “Auto Intent Detect” slider. If you receive an error here, please make sure that your OpenAI account is properly integrated.

 

Afterwards click on “+ New Intent”

 

 

Inside the creation window, you will see the following settings

 

 

Click on +Add Parameter to create one

 

 

For List of values tab, we give the users some options to choose from. This is used when you want to set a limitation to the data you received from the intent.s reply.

 

 

You can add values by clicking on the “Values” tab and entering the probable values for the intent.

 

 

At the last, you will have to choose a subflow to trigger based on the status of your intent.

 

Clearing User Fields After Intent Is Complete

After an intent cycle is completed, Uchat saves the intent parameter values inside the custom userfields. Hence if the user next time interacts with the bot again, old values are fetched.

 

Hence it is important that you clear out the userfields after the intent cycle is complete. The way the intent system works is that it searches for the value of parameters whether they are empty or not and if an old value is stored, it will mark it automatically complete.

 

You can build this automation within the flow by saving the intents directly in JSON CUF instead of individual custom user fields and then placing an action node at the very of your attached subflow to clear the values.

 

 

Intents Working Inside the Bot

Intents are triggered just like you would trigger a keyword automation or a comments automation. A user will type a question or a statement and then following the hierarchy of automations, the Intent feature will check the intent of the sentence based on the keywords used in the sentence and the confidence score that you provide it to work with.

 

Once an intent is successfully matched, it will trigger the parameter values collection until all the parameters are filled before triggering the final attached flow.

 

 

The following statement should trigger an appointment setting intent if you have configured it that way. And thats how the intent system works on the live bot.

 

Token Utilization

For intent detection feature, the tokens are utilized based on the number of parameters the intent has to fulfill and the confidence score. That means the higher the number of parameters, the higher the token consumed, similarly the higher the confidence score, the higher the token consumed when detecting intent.