Modern Developer | September 20, 2017

Deliver Chatbots That Propel Your AI Strategy

By: Alexa Morales


A basic chatbot isn’t that hard to build. In JavaScript, write a public REST endpoint to connect a Facebook page to some chat logic (botly is a popular option) and deploy the whole thing to run on a cloud platform.

Zoom out to the bigger picture, though, and you see that Facebook is just one channel. If you use Skype, Slack, Kik, and digital voice assistants, you’ll have to build six or eight of these endpoints straight away. And chatbots are being asked to handle ever more complex responses, so you better build on a platform of machine learning and natural language processing to keep up.

That’s why the question enterprise developers should be asking is not “Which chatbot service do I start with?” but “Which platform will let me crank out a chatbot today and also support multiple channels and integrate with back-end systems as these chatbots take off?”

Answering these questions can put a chatbot project at the hub of a wider enterprise artificial intelligence effort—providing a tangible use case without the confusion that a bottom-up AI effort can entail.

“We’ve taken a completely different approach to applying AI,” says Suhas Uliyar, vice president of mobile, bot, and AI strategy and product management for Oracle. “We are using the bot use case to bring in AI algorithms for deep learning, cognitive services, dialog and context, and knowledge services, and fine tune them for chatbots, which enterprises are prioritizing as their AI use case today.”

So where do you start with an intelligent chatbot project? Uliyar urges developers to focus on these four concepts.

1. Channels represent a surprising amount of complexity.

“Take SMS or Facebook Messenger or Skype. The way instant messaging works is the same: you type something, you hit return, and it responds back. But the look and feel is very different. A menu structure in Messenger is not even supported in SMS. As a developer, I need to figure out the best way to provide a delightful experience on the channel itself,” Uliyar says, noting that Facebook, Line, Telegram, and others are each also expanding the use of graphics.

There is no standard among these social networks for prioritization, routing, or error handling—and different channels are popular in different regions.

“You could say, well, I’ll just stick to Facebook Messenger,” Uliyar says. “But if you go to Japan, for instance, Line is the number one messaging platform. If you look to China, it’s WeChat. In India, it’s WhatsApp. If you go to Malaysia, it’s Telegram.” There are also voice-based personal assistants and voice services on mobile phones. Uliyar notes that many organizations are still skeptical about these consumer-oriented channels, but want to start by offering bot services as an extension to their mobile app and on their corporate website. “So it’s not like you could say, ‘I’ll just pick one, and the world will follow,’” Uliyar says.

For these reasons, a chatbot platform that abstracts channel complexity, so a developer can write a conversation script one time for use on many channels, is a productivity booster while delivering the real business value of personalized engagement with the end user.

With Oracle Mobile Cloud Enterprise (OMCe), developers get a multichannel platform to engage with customers and employees across all of today’s most popular messaging, mobile and web platforms. It also brings together channels, dialog flow, an AI engine, and integration with bot builder capabilities.

2. Tuning your machine learning to understand user intent is non-trivial, so your technology platform should take care of that.

There are several open source machine learning libraries for natural language understanding that developers that can embed, but just embedding these libraries isn’t enough. The public core natural language processing (NLP) and machine learning algorithms have become commodities that are basic pieces of the total solution.

Using NLP and ML is a system design problem where the developer needs to consider the target use cases, design and operating environment, and available data, Uliyar says. This determines the workflow design, data integration, pre-processing, meaning extraction approach, desired outputs, tools, and operational requirements. NLP and ML algorithms are driven by these considerations. The specific combination and models are then designed accordingly and are tuned for this system design, including unique extensions and inventions.

Enter two concepts universal to machine learning: supervised and unsupervised learning.

You use supervised learning, or classification, when your organization doesn’t have a lot of well-organized data that can teach your algorithm. Most enterprises are in this situation as they get started. In this model, an administrator trains the bot through conversational logs created through increasing interactions with bot users.

You use unsupervised learning, or clustering, when you have a lot of data. The model can go through a transcript analyzer to reduce many of the steps required in supervised learning and auto-generate models that the bot can use as a starting point. An algorithm trains on vast amounts of unlabeled data to do things like searching documents or sounds, segmenting customers by similar traits, and optimizing data center topology by usage metrics.

“The more data you have, the more accurate your predictions become,” Uliyar says, but a vast amount isn’t necessary. Your platform should handle both supervised and unsupervised learning.

3. A good dialog engine leads to context-appropriate conversations.

“You and I have different ways of asking how much money we have: ‘Hey, what’s my balance?’ or ‘What’s my checking balance?” Uliyar says. A neural network-based algorithm needs to understand that. “But on top of that, the developer needs to build a conversation that lets an end user converse with the bot,” Uliyar says.

Dialog creation is as critical to bot adoption as the UI experience is for a mobile app. So having a strong dialog builder and some best practices on designing conversations is crucial.

Dialog creation allows the bot to respond in multiple ways to discover user intent, as well as extract all the necessary information to give an appropriate response, such as figuring out which of three bank accounts a customer is referring to. Expressive scripts, based on topics around typical enterprise use cases, help the dialog engine generate—and learn from—human-like conversations. Sentence analysis and question tagging, plus databases for words and concepts, are key features you’ll need.

4. Enterprise integration wraps up the total package.

Chatbots are most powerful when they can directly pull data and insights from systems of record, be they financial, enterprise resource planning, customer relationship management, or any kind of data source. That’s why at least 70% of the work to build an actionable bot will be integration to provide context to the dialog with the end user, Uliyar says. And it’s why Oracle Mobile Cloud Enterprise provides support out of the box for APIs to connect to back-end systems that can be leveraged across mobile, web and chatbots. With the introduction Oracle’s Intelligent Bots, Oracle will be able to embed chatbot capabilities into its cloud applications, and developers will be able to customize their bots to meet the needs of an industry such as retail or finance or a department like finance or HR.

“The messaging channels are becoming the new browser,” Uliyar says.

But chatbots can’t solve every problem. Chatbots are wonderful for quick request and response interactions, Uliyar says, but forms are a better experience for collecting or reviewing a lot of structured data. For example, a banking bot is a great way to check your balance or ask for current interest rates, but not great at filling out a form to apply for a loan. So Uliyar advocates having an architecture and strategy where the bot is intelligent enough to surface the right process via a mobile app at the right time. To do that, he thinks mobile apps will go through a major change from monolithic apps to contextual, purpose-built apps, very similar to the strategy of turning monolithic services into microservices and functions.

“You’ll be hearing new terminology at Oracle OpenWorld—‘instant apps,’” he says. “Our definition of a mobile app is to decompose it into functional components instead of one monolithic mobile app that does everything.”


Alexa Weber Morales is director of developer content at Oracle. Morales is the former editor in chief of Software Development magazine and has more than 15 years of experience as a technology content strategist and journalist.

More about Alexa Morales