#3 Voice Bot with Google Dialogflow

Bruno Fernandes Carvalho
SOGEDES tech savvy
Published in
4 min readJul 4, 2023

Today we will understand how Dialogflow works, implement a basic project together and see how we can generate a phone number to talk to the bot. I will also share a very cool project we built for our website, where a Voice Bot sells itself.

My name is Bruno, AI Engineer at Sogedes. We are in the third blog post of this series and today we’re leaving theory behind and we will put our hands on a real project. Check out this conversation with Sogi, our Voice Bot that sells itself:

Super cool, right? You can try it yourself by calling the phone number +49 621 92109138. And if you want to build applications as awesome as Sogi, stay with me until the end!

But first, let’s understand how Conversational AI platforms like Dialogflow work. If you remember well from the previous posts, our focus is building Closed Domain applications where we want the user to follow a specific rule based conversation path. In this case, we do not want Generative Models, like ChatGPT, that generate a response based on an input. We would rather prefer to constrain the response space with a limited set of outputs, so we have a more controllable and predictable bot. This is the perfect scenario for Text Classification, or as it is commonly called in the Conversational AI world, Intent Classification. And Dialogflow is doing all of this for us. Check in this video the step by step to create a basic Voice Bot project:

If everything is working well, let’s move to the final step, integrating with a phone number for testing. Go to Integrations tab and create a Dialog Phone Gateway. Let’s call the generated number:

Great, our basic project is working. Of course in a production scenario you would need to use the Dialogflow API to integrate your Voice Bot with a more robust communication platform, like Twilio or SogedesX. To summarize: We’ve seen how to implement a basic Dialogflow Voice Bot project and we’ve covered the major topics of Conversational AI platforms, like Intents, Entities and Training phrases. If you want to create more complex cases, this varies from platform to platform, but in general the idea is simple: you need to provide the expected conversation flow. In Dialogflow, you need to use Contexts and Follow-up Intents, or in RASA, you define Stories with the expected conversation paths. You can refer to Dialogflow documentation in the description and see how to create more advanced cases, like Mega-Agents and Multilingual Agents.

Keep also in mind that intentless bots are powerful tools that are coming with the new era of innovation from Generative AI models, like ChatGPT. Depending on your use case, you might not need to define multiple intents to have a conversation, like in Q&A bots. In this scenario, you could use Large Language Models (LLM) with Knowledge Base integration (using Langchain) to give reliable and consistent replies based on your company specific data, without handcrafting any intents. On the other hand, if you need very defined conversation paths, like user authentication, rule based platforms like described in this tutorial could be more interesting. Here in Sogedes, we believe in the combination of these approaches to cover the best of both worlds.

Besides that, I had promised that I would introduce you to the Sogi Voice Bot that sells itself. This is indeed a more complex case and as you can see here, there are many more intents and entities than the project we implemented. And most importantly, there are much more training phrases, which increases a lot the quality of your bot.

Sogi — Voicebot that Sells Itself

We also integrated the Voice Bot with other services, such as Open Weather to check the city temperature and SOGEDES Sentiment Analysis model to detect the user’s feelings during the conversation. This kind of integration with APIs can be done through the Fullfilment tab or using our SogedesX product. And that’s a topic for the next blog, where I’ll show you the full automation we’ve done for Sogi, including API integration, redirecting calls to humans, sending SMS and Analytics dashboard.

And if you don’t have the time or resources to build your own Voice Bot project, here at SOGEDES we offer the whole package as a Service for you, so you don’t need to worry about anything. We’ll help you design the best use case, we’ll take care of the technical implementation and we’ll make sure your customers are happy with it. Feel free to share with us your use case, we will be very happy to take a look at it.

Note: if you wanna try Sogi demo, you can call +49 621 92109138.

If you have any technical questions, just leave a comment or reach me on linkedin. Thanks and see you on the next post! (https://www.linkedin.com/in/brunofcarvalho1996/).

--

--

Bruno Fernandes Carvalho
SOGEDES tech savvy

Mechatronic Engineer specialized in Artificial Intelligence and Software Development.