Вы находитесь на странице: 1из 34

Insights Issue: May 2018

THE COMPLETE
GUIDE TO:
CHATBOTS

Credit: iStock

Produced by
Insights

Credit: iStock
Talking tech
C
hatbots are growing in popularity within the
technology sector, partly thanks to the increasing
adoption of virtual assistants like Google
Assistant and Amazon Alexa among consumers. They
are broadly defined as software that conducts a written
or spoken conversation.
One of the top selling points for chatbots is that they
allow companies to automate conversations with their
customers, relying on technology rather than a human
sales representative, thus saving them time and money.

2
Insights

Messaging apps such as Facebook Messenger,


WeChat and WhatsApp have proved popular
platforms for hosting chatbots.
The main use cases have been for customer service,
sales and marketing, although others have emerged
such as providing legal, financial or health advice.
In this guide, we’ll provide a thorough explanation
of what chatbots are, which companies are building
them, the main use cases for chatbots and finally
how you build one yourself.
There are multiple platforms out there that help
to ease the chatbot-building process, many of them
requiring no coding ability at all. We review the best
and provide some hints and tips on how to build as
‘human’ a chatbot as possible.
With these resources at your disposal, you’ll be
passing the Turing test in no time. Charlotte Jee

Contents
4 Chatbots explained

10 Best chatbot building platforms for developers

16 The best ways businesses are using chatbots

22 How to build a chatbot

31 Make your chatbot appear more human

3
Insights

Credit: iStock
Chatbots explained
Facebook and Microsoft can’t stop talking about them, but what
are they, are they any good and how do you start building them?

T
he transition from obscure tech to buzzword
to leading the news agenda arrived when
Microsoft launched Tay in March 2016, before
it went on a genocidal, racist Twitter rant and was
subsequently taken offline for some tweaking.
Facebook then firmly secured chatbots position
as ‘tech du jour’, with its announcement at its F8
developer conference in April 2016 that businesses
would be able to provide chatbots to deliver automated
customer support via its Messenger service.

4
Insights

What is a chatbot?
Before chatbots there were just bots: a piece of software
designed to automate a specific task. A chatbot is built
on the same premise, though it delivers this task around
a single function, namely chat, or simulated conversation.
It uses machine learning to pick up on conversational
cadences, allowing it to effectively mimic human
conversation and react to spoken or written prompts to
deliver a service. In essence, it is a user interface that
can be plugged into a number of data sources via APIs,
so it can deliver information or services on demand,
such as weather forecasts or breaking news.
Lauren Kunze, principal at Pandorabots, has been
building chatbots since she was 15 years old. She is
now principal at Pandorabots and tells Techworld that
there are two main categories of chatbots: “Largely
there are two classes: utility chatbots and then
there are content‑driven bots. Utility gets something
done following a prompt. At a higher level, the more
entertainment-related chatbots are able to answer
all questions and get things done. Siri and Cortana
you can have small talk with, as well as getting things
done, so they are much harder to build.”
It’s worth noting that, despite the hype, this isn’t new
technology. Joseph Weizenbaum developed a natural
language processing programme named ELIZA in the
1960s. What has changed is the advancement in AI and
its growing accessibility for developers to build and
deploy functioning chatbots relatively quickly.

Which companies are building chatbots?


Naturally, most of the tech giants are helping
developers build chatbots on their platform.

5
Insights

Chatbots obviously lend themselves well to


communication platforms, which is why Slack
users will be familiar with Slackbot. Unfortunately,
my interactions with Slackbot have only led to an
existential crisis so far.

Similarly, Twitter bots have been around for the


better part of a decade. Like this bot (fave.co/2qrlSIR),
which pushes out tweets relating to Big Data, with
774,000 tweets to date.
In 2016, Facebook CEO Mark Zuckerberg took to
the stage at the firm’s annual F8 developer conference
to talk chatbots. The initial results weren’t overly
impressive (see CNN’s live news bot, overleaf).

“My CNN bot already feels a little bit spammy.


Cute emoticons don’t really cut it in this case...
pic.twitter.com/9EY7gBwyMQ [see overleaf]”
Olivia Solon (@oliviasolon)

There is a wealth of potential for bots built into


Facebook Messenger to facilitate direct communication

6
Insights

between consumers and brands.


Retail and media organizations are
circling the technology.
Chatbots are being developed
by brands to serve single service
needs, like Taco Bell’s Slack-
based Tacobot. Another use
case for chatbots is for personal
concierge services, like Amy, an
AI-powered personal assistant
embedded within your email.

How do you build a chatbot?


Kunze says there are two ways to
build chatbots: “Either take a rule-
based approach, so the developer
is hand writing rules for the system:
hard coding. Then there is machine learning, which
requires a massive amount of streaming data and
the system learns on its own.”
Pandorabots is an open-source web service for
building and deploying chatbots through either its
Playground, a free environment for developers to
learn the basics of chatbot development, or through
its Artificial Intelligence as a Service (AIaaS), which
provides API access and software development kits.
Of course, developers can also go it alone, with a
wealth of resources available on GitHub, including these
open source Artificial Intelligence Markup Language
(AIML) frameworks – fave.co/2qr8ynL. The primary risk
with the machine learning approach is that, according to
Kunze, “if you don’t properly define learning parameters
it quickly devolves and is no longer brand appropriate”.

7
Insights

Tay
This was exactly the case with Microsoft and its foul-
mouthed teenage girl-aping bot, Tay. It was built to
learn the way millennials converse on Twitter, with
the aim of being able to hold a conversation on the
platform. In Microsoft’s words: “Tay has been built
by mining relevant public data and by using AI and
editorial developed by a staff including improvisational
comedians. Public data that’s been anonymized is Tay’s
primary data source. That data has been modelled,
cleaned and filtered by the team developing Tay.”
Unfortunately, the old adage of trash in, trash out
came back to bite Microsoft. Tay was soon being fed
racist, sexist and genocidal language by the Twitter user
base, leading it to regurgitate these views. Microsoft
eventually took Tay down for some retooling, but when
it returned the AI was significantly weaker, simply
repeating itself before being taken offline indefinitely.
The irony is that the foul-mouthed Tay was a
pretty successful chatbot in that it learned what it was
told and coherently put out responses to queries,
just not in a politically correct way. The neutered
Tay lacked coherence. The key will be to find the
line between an AI that is impressionable, with one
that can learn but also moderate its responses in a
way that is socially acceptable, or at least fits with a
company’s corporate image.

Beware the hype


Prashant Sridharan, Microsoft’s principal manager
developer relations, says: “I’ve seen a lot of hyperbole
around bots as the new apps, but I don’t know if I
believe that. I don’t think we’re going to see this mass

8
Insights

exodus of people stopping building apps and going


to build bots. I think they’re going to build bots in
addition to the app that they have or the service
they provide,” as reported by re/code.
Nicolas Beraudo, MD EMEA of App Annie,
believes: “Bots will become an integral aspect of
our lives and are the next step of mobile innovation,
but not the end of apps themselves. Mobile-first still
equals app‑first.” Scott Carey

9
Insights

Credit: iStock
Best chatbot building
platforms for developers
You don’t have to be a Silicon Valley giant with endless resources
to build your own chatbot. We round up the best platforms

W
e saw unprecedented hype about chatbots
in 2017 thanks to Microsoft’s bot ‘Zo’ and
Facebook’s decision to integrate chatbot
capabilities into Messenger.
The use of artificial intelligence and its ability to
converse in natural language can make chatbots
seem as if we are experiencing the future right now.

10
Insights

However, you don’t have to be a Silicon Valley giant


with endless developers to hand to build one. In fact,
you could do it from your own home and you don’t
even necessarily need complex programming skills.
Here is a selection of the best platforms to use if
you want to build your own chatbot.

1. Mobile Monkey
Mobile Monkey (fave.co/2v5lHHW) lets you build
a Facebook Messenger chatbot in minutes with no
coding experience required, enabling automated
mobile messaging between businesses and their
customers. The training process requires you to
review and answer a few questions every couple
of days, helping your chatbot learn to ask and
answer any question about your company.
The platform’s plans start with a free version
with options up to $149 (around £105) per month.

2. Landbot.io
Landbot.io (fave.co/2qoW0gK) is a platform that lets
you turn a website into a chatbot. With this tool you
can also create bots on Facebook Messenger, and
WhatsApp, or live chat and manage them from the same
platform with human assistance features. It creates a
conversational interface in substitution of forms, and
requires no coding experience to get started.

3. Flow XO
Flow XO (fave.co/2GXbqz0) is a UK-based company
providing a visual platform that allows you to easily
build and create your own chatbot for your website,
Facebook, SMS, Telegram and Slack. It has over 100

11
Insights

integrations with other systems businesses use, without


the need for coding abilities or technical knowledge.
Pricing plans start at $19 (around £13) per month.

4. The Bot Platform


The Bot Platform’s (fave.co/2v6oZdG) CMS allows
you to build, test, deploy, and track multiple bots
on both Facebook Messenger and Workplace.
Used by the likes of the BBC, Showtime, and Sony
Music, its platform enables those with no coding
experience to build and deploy a bot in minutes.
The Bot Platform’s marketing automation system
functionality allows bot users to be segmented based
on how they interact with the bot. This, alongside the
ability to integrate into Google Analytics, provides
insights into user preferences and behaviour. Customers
can then use the platform to generate bespoke
outbound messages, such as surveys, drip campaigns,
and more, aimed at specific user segments.

5. Chatfuel
This chatbot engine (fave.co/2GZn9Nd) will do
most of the hard work for you, and is ideal for those
lacking programming experience. MTV, TechCrunch,
BuzzFeed, British Airways, and Adidas are said to
have used Chatfuel to create their chatbots, along with
almost 20,000 other users across the globe. The user
interface is easy and slick, meaning you could create
a chatbot in less than 15 minutes.

6. Engati
Engati (fave.co/2vgiMfg) is a chatbot platform that claims
you can build, manage, integrate, train, analyse and

12
Insights

publish a chatbot using its software in just 10 minutes.


It currently supports eight major messaging platforms,
including Messenger, Kik, Slack and Webchat.

7. Chattypeople
Chattypeople (fave.co/2qskrcP) is another code-free
option. It supports Stripe and PayPal integration as
well as e-commerce services such as OpenCard and
Magento. This enterprise chatbot builder also offers
in-depth analytics of your bots performance and the
transactions happening as a result of the dialogue.

8. Microsoft’s ‘Bot Platform’


In 2016, Microsoft added chatbot capabilities to Skype
and launched Bot Builder for Node.js (fave.co/2GY0pxe),
a framework for constructing your own bots. “It can
handle both free-form interactions and more guided
ones where the possibilities are explicitly shown to
the user,” according to Microsoft. It provides a platform
where developers can build, test and publish their
own bots, using frameworks like Express and Restify.

9. ChatScript
Launched back in 2011, ChatScript (fave.co/2qrYqea)
is a ‘next generation chatbot engine’, and has won
the Loebner Prize (awarded for the most human-like
examples of artificial intelligence) four times. The
platform provides an open source framework for
developers to build and deploy chatbots.

10. Pandorabots
Pandorabots (fave.co/2GY1tBe) is an online service
that lets developers build, host and deploy chatbots.

13
Insights

It has 225,000 registered developers and its tools


have helped to build nearly 300,000 chatbots.
Pandorabots uses AIML (Artificial Intelligence Markup
Language), which is the open standard for writing
chatbots. Tools on offer include ‘Artificial Intelligence
as a Service’, which provides API access to its bot
hosting platform and the ‘Pandorabots Playground’:
a free, integrated development environment for
building chatbots.

11. Facebook’s ‘Bots for Messenger’


At its F8 developer conference in April 2016, Facebook
launched ‘Bots for Messenger’ (fave.co/2vdbx84), a
tool that allows developers and businesses to build
chatbots for its Messenger platform (which is used by
almost a billion people). Developers build bots, submit
them for review, then Facebook decides which get
onto Messenger. The three main capabilities are its
send/receive API, generic message templates, and
the ability to customize the welcome screen users
first see when interacting with your bot.

12. Rebot.me
Rebot.me (fave.co/2vazyMX) is a simple service that
allows you to create, teach, test and then deploy
chatbots to your website. One of its main selling
points is that you don’t need programming skills
to be able to use it. It works by letting you set up,
then customize your chatbot, teaching it to respond
to certain questions. The more you talk to it, the
more it learns. Rebot.me says its chatbots can help
visitors to your website become familiarized with your
products or services more quickly, among other uses.

14
Insights

13. Imperson
Disney Accelerator/Techstars 2015 alum Imperson
(fave.co/2GVh2tf) has created a chatbot generator
for creating, deploying and managing chatbots via
Facebook Messenger, Skype, Kik, Slack, Twitter, Amazon
Echo, and SMS. Specializing in character bots, it has
successfully launched Miss Piggy and Doc Brown
chatbots, developed for Facebook Messenger.
Erez Baum, co-founder and CEO of Imperson, says:
“The current bot experience is still very primitive, with
menu driven experiences that don’t allow brands to
differentiate their voices from one another. The release
of our new platform will enable creative people in brands
and digital agencies to create richer and deeper bot
experiences that can converse with consumers one-on-
one to develop a more engaging relationship.”

14. POP
POP (fave.co/2qsQucK) is a platform for people to create
and launch a Facebook Messenger bot in a few easy
steps. Prices start at $29 (around £20) per month. POP
claims open rates as high as 90 to 95 percent.

15. ChatbotsBuilder
ChatbotsBuilder (fave.co/2qqxMmg) is an online
platform that lets you build Facebook Messenger
chatbots to capture leads, engage users and build
new business relationships. Users can build chatbots
in three steps: by choosing and creating a Facebook
page, using ChatbotsBuilder to create triggers and
replies, then deploying and promoting their bot. It
is free to try, with basic pricing plans starting at $19
(around £13) per month. Charlotte Jee

15
Insights

Credit: iStock
The best ways businesses
are using chatbots
A look at the way companies use chatbots to enhance their operations

T
here has been an unusually large focus devoted
to chatbots within the tech community in recent
years, thanks to Facebook’s integrated chatbot
capabilities in Messenger, and Microsoft’s controversial
‘teen girl’ Twitter bot ‘Tay’.
However, how much of this has actually translated
into real-world applications? It’s still relatively early
days, but there are a few companies and organizations

16
Insights

that have started to try out chatbots as part of their


operations. Here are a few notable examples.

1. To book a flight
Dutch airline KLM was established in October 1919,
almost 99 years ago. However, this hasn’t stopped
it from venturing into emerging technology such as
chatbots. The firm has its own bot called BlueBot
(fave.co/2qtgB3c) or BB for short, designed to help
passengers book flights with the airline. Through
Facebook messenger, BB is able to provide booking
confirmation, check-in information and reminders,
boarding passes, as well as flight information and answer
any simple passenger queries. BB also works with
Google Home, so you can ask it for packing advice.

2. To order flowers
Ordering flowers is already easy with most florists going
online and the likes of Interflora and smaller businesses
such as Bloom and Wild making the process a lot
easier. However, US-based florist 1-800 Flowers has
created a bot on Facebook’s Messenger platform. The
bot can send flowers and gifts, processing the order
and its payment. It will also make suggestions, and
can send payment, shipping and delivery alerts.

3. To help you pick an outfit


H&M launched a chatbot on Kik (fave.co/2qtgYep) – a
Canadian instant messaging platform – in April 2016 to
provide tailored fashion advice for its customers. The
bot suggests items of clothing based on your set of
preferences and can pull clothing from the catalogue
to complete outfits.

17
Insights

4. To book gig tickets


The events industry is massive and could benefit
hugely from the use of chatbots during most aspects
of the purchase, from browsing to booking. And one
Manchester-based company called TickX is trying to
exploit this lucrative area. “We can help users get from
A to B a lot faster,” explains the firm’s co-founder Steve
Pearce. “You could ask it, ‘what’s the cheapest ticket to
see Motown: The Musical in July’ and it will respond in
a second with the cheapest prices available.”

5. As a credit score coach


Credit checking service provider ClearScore has a
chatbot designed to help people improve their credit
score (fave.co/2J6WQ8K). The service is available for
free and provides three different types of credit rating
help: ‘Build’ ,aimed at young people that lack credit
history; ‘Repair’, designed to help people with poor
credit history improve their score; and ‘Shape Up’, for
those just looking to maintain their healthy credit rating.

6. As a lawyer
A free ‘DoNotPay’ chatbot (fave.co/2qtjzVr) has
reportedly turned over 160,000 parking tickets in
London and New York. Created by 19-year-old Stanford
University student Joshua Browder, this chatbot helps
its users contest parking tickets by asking a series of
questions to determine whether the parking ticket was
unfairly issued with a reported 64 percent success rate.
Chatbots could be used regularly in the legal sector to
sift through large volumes of data to pick out anomalies.
Similar uses of AI have been used by Ravn Systems that
created Ravn ACE, an AI ‘robot’ to search, read, interpret

18
Insights

and summarize vast amounts of unstructured data,


10 million times faster than its human counterparts.

7. As a personal stylist
Imagine a bot that tells you exactly what suits you and
what doesn’t, based on your measurements, skin tone
and type. In fact this now exists thanks to Sephora,
which has developed its own chatbot on the messaging
app Kik (fave.co/2qmOP8H). H&M also has a chatbot,
which learns about your style through your photos
then recommends outfits.

8. To order food
In a demo at Microsoft’s 2016 ‘BUILD’ developers
conference, a chatbot was used to order a pizza from
Domino’s. Rather than filling in an online ordering form,
you could create an order just by typing/and or talking
to a ‘bot’, thus saving you time and effort. Over in the
US, Taco Bell has also got in on the action, creating
‘Tacobot’, a chatbot which lets you order from Taco
Bell via the Slack messaging platform.

9. As your personal concierge


The idea of a personal concierge or butler within a
chatbot platform shouldn’t be too much of a leap.
After all, we already have Siri and Cortana – it’s not a
huge stretch to imagine improved versions with richer
functionality. A number of tech experts have suggested
that rather than having many individual chatbots for
different functions, instead, you’d have one ‘chatbot
to rule them all’. This bot would be able to organize
your emails, diary, make appointments and access
other bots’ services.

19
Insights

10. As a doctor
Obviously a chatbot will never be able to fix a broken
leg. However, it could perhaps give you medical
advice, recommend treatments or direct you to
your nearest medical facility, based on access to a
vast library of knowledge (for example, the WebMD
website, fave.co/2GWYtoF). This would let you easily
access medical knowledge, thus saving time and
money (at least for less serious ailments).

11. As a pensions or financial advisor


We’ve already seen a number of ‘intelligent assistants’
emerge within the finance and pensions sector.
Consultancy firm Matter has built a pensions adviser
chatbot called ‘Matilda’, which can have a natural
language conversation and has a wealth of knowledge
on pensions. However, big banks are also getting
involved: RBS has built a chatbot called ‘Luvo’, which
helps with simple but common issues such as lost debit
cards, locked PINs, or how to order a new card reader.

12. As a teacher
The potential for chatbots to be used as teachers is
obvious, given their ability to communicate in natural
language and their access to vast reams of data online.
There are some bots out there already: ‘Leslie’ bot can
help improve your mastery of the English language,
while IBM’s Watson technology has been used to
build teaching assistant bot ‘Jill Watson’.

13. Your own newsreader


A number of news organizations offer chatbots, however
they are mainly those based in the US such as the Wall

20
Insights

Street Journal and CNN. You can choose to see top


stories, stories curated for your interests or ask the
chatbot questions, in CNN’s case.

14. As a toy
Talking to toys is by no means something new. Children
have always chatted to their toys and there are plenty of
products with built-in chat capability already. However,
chatbots offer the chance for a richer, more two-way
interaction: see products like ‘Hello Barbie’ and ‘Thomas
& Friends Talk To You’, built by Mattel and ToyTalk.

15. As an accountant
The word ‘accounts’ can fill people with dread: it’s a
byword for data entry, admin and a shoebox full of
receipts. Business software firm Sage hopes to change
this with its new accounting bot Pegg, which acts as
a smart assistant, letting users track expenses and
manage finances via messaging apps such as Facebook
Messenger and Slack. The idea is that Pegg takes away
the complexity of accounting by letting entrepreneurs
manage their finances by just having a conversation.

16. As a partner
Taking inspiration from the film Her they will be available
to talk whenever you need to. Mitsuku is one such
example. She learns by experience (the more you talk
to her, the smarter she becomes) and is friendly but will
argue back. Unsurprisingly, most chatbot companions
available at the moment are female. However, we can
expect to see many more versions get built over time.
Whether they are a substitute for a real-life human
partner is less obvious. Charlotte Jee

21
Insights

Credit: iStock
How to build a chatbot
This detailed tutorial will equip you with the tools and advice
you need to start building your own chatbot

C
hatbots are popping up everywhere: from your
favourite takeaway to the frontline of transport
operators’ customer service. As advanced as AI
is and as much as we would hope for the opposite to
be true, chatbots are not going to build themselves.
Progress is currently exploring bot technology
and the various ways that it could potentially deliver
business benefit for our customers and partners. While
we don’t directly offer bots as part of our software –
yet – the technology exists to build bots for OpenEdge
applications with the help of Microsoft Bot Builder.

22
Insights

Here you will find a detailed tutorial that gives you the
tools and advice to start building your own chatbot.
Bots give you the power to establish meaningful,
natural language communication among your
applications, and the beauty of it all lies in the
simplicity of the system. The system can be
understood through just a few components.

Components needed to create your bot


The bot registry: This is a publicly available registry
where people can install your bot for you. In the case of
a Skype bot, it is the Skype bot registry. When you log
in to Skype and search the bot by name, you will find it
right there and can easily add it to your contacts.

The client: In the case of a SMS bot, the client is the SMS
app on your phone. If you’re using a Skype bot, then the
Skype application on your system is the client. The client
varies depending on the channel of communication.

Microsoft Bot Framework: This is the infrastructure


laid by Microsoft to facilitate building bots. It provides
easy integration, various messaging channels,
conversational infrastructure and assimilation with
the natural language engine.

LUIS: LUIS, which stands for ‘Language Understanding


Intelligent Services’, currently supports five major
languages. You can create an application in LUIS and
host it on a public cloud. In our case, it is hosted on
Microsoft Azure – hosting is paid for per usage. It is
easy to use LUIS for language understanding because
it identifies and breaks down sentences into intents and

23
Insights

entities. Intents translate to the purpose of the sentence,


while entities can be considered the subject of the
intent. For example, a time, date, place or name could be
considered entities. You can also define custom entities.
This application does need training, and it requires
definitions of the intents and entities for given sample
utterances. For example, you can have intents for
Greeting, Farewell, Process Order, and many more.
The more you train, the better LUIS understands.
Here is a sample training screenshot:

Credit: Progress

The bot brain: This is one of the only pieces where you
have to write a lot of code. You need to write intent
handlers, meaning you must define the action with that
intent once LUIS decodes the intent of a given utterance.
The action can just be a call to a database or invocation
of a web service. You can write the bot in Node.js or C#
if you’re using the Microsoft Bot Framework.

24
Insights

var dialog = newbuilder.


LuisDialog(‘https://api.projectoxford.ai/
luis/v1/application?id=769f6dc0’);
var bot = new builder.
BotConnectorBot({appId: ‘notfbot’,
appSecret: ‘XXXXX’ });
bot.add(‘/’, dialog);
// Handling the Greeting intent.
dialog.on(‘Greeting’, function (session,
args) {
console.log (‘in greeting ‘);
session.send(‘Hello there! I am the
notification bot. I can notify about the
urgent orders’);
});
// Handling unrecognized conversations.
dialog.on(‘None’, function (session,
args) {
console.log (‘in none intent’);
session.send(“I am sorry! I am a
bot, perhaps not programmed to understand
this command”);
});
dialog.on(‘Notify’, function (session,
args) {
console.log (‘in notify ‘);
session.send(‘we just got an urgent
order. Want to review it?’);
});

System of records: This is where you have your data


and information, possibly in the form of a web service

25
Insights

or database. In our case, it is an OpenEdge application


hosted on the Arcade cloud.

Architecture of the chatbot


Let’s put these bot components together. Below is an
architectural representation of all the components and
their interactions. The arrows show how data flows from
the software client at the user end to the bot, and vice-
versa. The purple box is the user client, like a phone,
or Skype. The blue box is the Azure cloud, which hosts
the natural language engine LUIS and bot framework.
The green box contains the Progress specific pieces
(the OpenEdge app). This exposes the REST endpoint
and serves as the data store and actual bot application,
which contain the business logic/intent handlers.

Credit: Progress

If a user types an English sentence on Skype


addressing our bot, the message is sent to the

26
Insights

bot framework, which knows the public URL of our


bot deployed on Modulus. The bot knows the URL
for LUIS and asks it to resolve the message. LUIS
returns a structured JSON where it breaks down
the message into intents and entities, and ranks
the intents with scores as shown below:

var dialog = newbuilder.


LuisDialog(‘https://api.projectoxford.ai/
luis/v1/application?id=769f6dc0’);
var bot = new builder.
BotConnectorBot({appId: ‘notfbot’,
appSecret: ‘XXXXX’ });
bot.add(‘/’, dialog);
// Handling the Greeting intent.
dialog.on(‘Greeting’, function (session,
args) {
console.log (‘in greeting ‘);
session.send(‘Hello there! I am the
notification bot. I can notify about the
urgent orders’);
});
// Handling unrecognized conversations.
dialog.on(‘None’, function (session,
args) {
console.log (‘in none intent’);
session.send(“I am sorry! I am a
bot, perhaps not programmed to understand
this command”);
});
dialog.on(‘Notify’, function (session,
args) {
console.log (‘in notify ‘);

27
Insights

session.send(‘we just got an urgent


order. Want to review it?’);
});

Once the bot knows about the intent and entities


of the message, an action can be performed. The
action can be as complex as establishing a nested
conversation with multiple rounds of question and
answers, or as trivial as invoking a REST endpoint
and serving processed results.

Credit: Progress

The bot framework portal pictured above shows the


messaging endpoint is the public URL of the bot hosted
on Modulus. Enabling a bot is as easy as clicking on
the ‘Add’ link in the ‘Add another channel’ section.
The bot is running on the channels marked with
a ‘Running’ status. Each channel has a specific set of
instructions for enabling a bot on the channel. Once you
add a bot, you will get a bot URL which can be directly
sent to user, who can then add the bot to their local

28
Insights

clients (Skype, Slack, and so on.). In the case of an SMS


bot, you’d get a phone number. With Slack or Skype, it
would appear in the bot registry as well.

Thoughts on the development experience


The framework, as well as many other aspects of the
development, are in beta mode, so you can expect
some changes to arise. However, you can participate
in their road map and request some really interesting
features for free.
I would suggest paying extra attention to the LUIS
training. Defining clear intents is key, and getting
enough sample utterances is equally important
(around 20 to 30 per Intent is a good number).
If possible, I would recommend getting subject
matter experts to write sample utterances for you.
There are infinite variations of a question, and there
can be many responses to the same question, so
templating the responses is a good idea.
It is also important to define thresholds for intent
resolution. For example, LUIS resolves the utterances
and assigns a score for each intent. The intent with the
highest score is chosen. However, it is possible that the
highest score is too small to be considered for an action.
In such cases, you can define minimum thresholds and
let the intents resolve to ‘None’ if it doesn’t suit you.
One of the powerful features of LUIS is active
learning: it can critique its own work and ask you to
relabel things if they don’t seem right to you.

Places to look for help


The documentation for Microsoft Bot Framework is
illustrative and nearly complete. If you want to look

29
Insights

at the code samples we created to prove the idea, you


can find them on GitHub (fave.co/2GVeRWW). You can
also find all relevant links on the GitHub ReadMe page
(fave.co/2qvnHnZ).
If you want to start interacting with the bot, try
adding the notification bot to your Skype using
the following link – fave.co/2qr0aoh. Dharmendra
Prasad, lead software engineer Progress

30
Insights

Credit: iStock
Make your chatbot
appear more human
Here’s how you can give your chatbot an illusion of personality
to enhance how it interacts with your customers

T
he whole tech community is focused on chatbots
right now. This is creating an opportunity
for businesses of all sizes to enhance their
relationships with their customers.
However, the technology is not yet sophisticated
enough to have ‘truly human’ conversations that convey
subtle nuances such as humour, wit and sarcasm.

31
Insights

But at Meekan we’ve developed ways to give an


illusion of personality and here are my top tips to
cheat the unofficial Turing test.

1. Get the basics right


First thing’s first, make sure the robot is doing its job
properly. This is imperative. Once you have your robots
core functionality up and running you can play around
with the cosmetic and conversational touches.

2. Add in conversational touches


Humans, being human, don’t respond quite as
predictably as your robot would like. You can prepare
your chatbot for every eventuality relating to its task
but, as we found, people tend to stray from your
carefully thought through engine.
To counter this loop, which for the user will
undoubtedly get boring, we added conversational
intents to our already established work ones. These
included ‘Greeting’, ‘Compliment’ and ‘Insult’. Suddenly
our robot is interacting with users on a ‘human’ level.

3. Build a response bank


Teaching your robot to give an on-topic response is not
worth it if it will just keep repeating the same phrase
over and over again. This immediately breaks the illusion
of sentience and reveals the mechanisms underneath.
To counter this, for every intent the robot recognizes
you need to have prepared a whole list of responses
for the robot to choose from. Often we will write 30
possible responses to common questions or intents.
It’s a very quick and effective way for the robot to
appear intelligent outside of its core functions.

32
Insights

4. Draw from the information around you


Use the basic information you have about your user
to your advantage. Little touches like using the user’s
name, knowing what the weather is like where they
are, or even knowing the local time, can go a long way
to making your robot seem more knowledgeable.

5. Maintain the illusion of a physical being


Refer to your robot as a robot, not a bot, in conversation
with users. Or even as a he or a she. This helps to
maintain the illusion that there is a real life humanoid
robot sitting on the other side of the conversation
typing away on their futuristic chrome keyboard.
Another little touch that goes a long way is answering
long questions line by line instead of in one large body
of text. Pacing your answer like this will make it seem
like your robot has to obey the physical constraints that
humans face (typing with fingers) and less automated.

6. Stay in character
Who is your robot? Develop a character and stick to
it. Mixing in different styles of speaking will make your
user feel like they are speaking to a random service
rep rather than the humanoid robot helper you’ve
spent a lot of time developing. Matty Marianksy,
co‑founder of Meekan by Doodle

33
©2018 International Data Group.

34

Вам также может понравиться