Natural Language Understanding (NLU) models, such as those used in Dialogflow, specialize in recognizing the intent behind user input and generating precise responses. In contrast to generative AI models that create new texts, NLU models focus on understanding and processing existing texts.
What is Dialogflow?
Dialogflow is a pre-built natural language understanding (NLU) tool from Google Cloud specialized in recognizing and understanding user intentions. It allows for precise detection and response to specific user queries by leveraging predefined modules and extensive training.
An introduction: Using Dialogflow for my call flows
What is an intent?
Intents are a central component of Dialogflow and represents a specific user intention. For example, an intent could represent a user's intention to place an order or ask a question about a product. Intents are essentially triggers that react to certain keywords or phrases in the user requests and trigger actions. Intents consist of the following components:
- Training Phrases: Example phrases that users could enter and that match this intent.
- Parameters: Important information to be extracted from the user request.
- Responses: Predefined responses that the bot should give when the intent is recognized.
How do I train my Intents?
The “Training” section refers to the process of teaching the model to correctly interpret user requests and identify the corresponding intent. This includes:
- Creating and adding training phrases
- Expanding the data set
- Adaptation and fine-tuning
In the "History" section, you can save and analyze past user interactions and assign them to existing intents.
Creating an Intent in Dialogflow
To create a new intent, navigate to “Intents” in the menu and click on “Create Intent”. Give your intent a name that reflects the user's intention, e.g. “Test Billing Plan”.
After creating an Intent, you need to add “Training Phrases” to it. These are example requests that users might make in our example, such as “I want to change my monthly subscription”, “What is my billing plan?”, “When is my next payment due?” or Can I change my “contract?”
Dialogflow uses these phrases to recognize and correctly assign similar requests in the future. The more training phrases you add, the more accurate the model becomes in recognizing user intent.
Integrate Intent into a Call Flow in babelforce
Step 1: Creating a new test call flow
- Create a new Speech-to-Text module and name it “SST Welcome Billing Test”
- In the text field, you can write the following sentence: “Hello! Why are you calling?”
- Make sure that the language (in our case English) matches the language settings in Dialogflow
- Label the variable with the name “callreason1”
Step 2: Set up local automations in the STT-module
- Create a new local automation within the Speech-to-Text module.
- Name the Label: “Callreason Dialogflow”
- Set the Position to “After”
- Priority should be high, for example, type "1000"
- Action: Search for “Dialogflow” and select the category “Google Dialogflow” with the action “detect intent”
- Initially set the trigger to “Always” to keep it simple. This can be expanded later.
- Scroll down to the “Integration” field and make sure that the integration “My custom gcloud_dialogflow” is included
- Enter in the text field: {app.speechToText.callreason1}
The integration with DialogFlow will now send your spoken word to DialogFlow. To ensure proper functionality of all settings, we will proceed with testing a Text-to-speech module in the next step.
Step 3: Setting up a Text-to-speech module (TTS) for the after-flow
To do this, we use a TTS module as the AfterFlow of the SST module and go through the following steps:
- Create a new TTS-module and name it “TTS Response - Dialogflow”
- Enter the following in the text field: “Your input {app.speechToText.callreason1}”
- The system plays back the caller's input at this point
Your call flow should be structured as follows:
Test Scenario: Connecting Your Call Flow with DialogFlow
To test your setup, connect your call flow to a phone number. At the text-to-speech (TTS) module prompt, when asked to speak, say "I need information regarding my billing plan."
The system should respond with "Your Input: I need information regarding my billing plan."
Verification in Dialogflow
Return to Dialogflow and navigate to the "History" section. You should see an interaction, referred to as a "Conversation" in Dialogflow, that includes the information you provided during the call. It should look like this:
If everything appears correct, you have successfully completed the test!
What do I do now with the Conversation?
Now, navigate to the "Training" section in Dialogflow. Locate the conversation that includes the information from your call, and ensure that Dialogflow has assigned it to the appropriate intent ("Test Billing Plan").
You can now train and expand your intent by associating relevant conversations with it.
Besides DialogFlow, there are other NLU systems that have been successfully integrated with babelforce for years, such as Deepassist by Deepsearch.
Related to
Comments
0 comments
Please sign in to leave a comment.