The IBM Watson UK Hack challenged developers to build a bot that disrupts digital business. News Labs developers combined artificial intelligence and natural language processing to win the competition with wingBot — the Facebook Messenger automaton that’s smarter than your run-of-the-mill wingman.
News Labbers Alex Norton, Lei He and Rachel Wilson teamed up with colleagues Dario Ramalho (BBC News UX&D) and Shane Kelly (myBBC) for the two-day IBM Watson Build a Bot hack. The challenge? Create a prototype using Watson Cloud Service technologies that innovatively solves a real-world problem.
The BBC team.
Judges marked bots on three criteria:
- How well they solved the specified problem.
- How well they incorporated different Watson Cloud Services and other APIs.
- The overall appeal for target audiences.
All coding took place during the competition, and teams were expected to present a working prototype at the end of the second day.
Our Solution: WingBot
So how did the team do it? Lei He and Alex Norton share their views:
In coming up with an idea, we knew we had to be realistic about what we could complete in the short amount of time available. We wanted to build a bot using a number of different Watson and partner services, as this was one of the marking criteria. We also kept in mind that when giving a short demo it’s easier to win people over with a funny idea than a boring one.
We discussed several ideas, but we kept coming back to a bot-based “dating assistant” to help break the ice on first dates. The synthesis of modern technology and romance is a hot topic these days, with services like Tinder drastically changing how people look for love. The theme was open-ended enough to allow us to integrate a number of different services, and made us laugh enough to think that it might go down well at the hack.
We chose to make a bot for Facebook Messenger because of the number of people using the platform (it crossed the one billion mark this summer) and its carousel feature for displaying sets of different links. This let us aim at a large target audience and gave us features which could be easily manipulated under the table at a restaurant. As a bonus, Messenger recently acquired Wit.ai - which works similarly to the Watson Conversation API - so we knew that transferring some of what we learned at the hackathon back to our existing work with bots in Messenger would be feasible.
Show and Tell
We used a combination of Watson services and third-party APIs to create a bot that:
- Gives on-demand dating advice
- Searches and retrieves contextual news
- Finds nearby restaurants
- Offers personality insights based on your date’s Twitter timeline
- Gives an emergency excuse to escape the date when needed
Watson Conversation is at the core of wingBot. It provides a friendly web interface (see the picture below) to easily and quickly build natural conversation flows and test them out before launching. The whole conversation can then be exported as a json file. In addition, Watson Conversation’s APIs allow developers to build chatbots on different platforms — in our case, Facebook Messenger.
You use Watson Conversation to create intents (e.g. #befunny) and provide examples of various ways users might express that intent (I need to be funny”). Watson Conversation has the ability to learn from user input, so you can use it to train your bot. It also doesn’t require users to input every possible combination of words. When we type “Be humorous”, Watson Conversation detects the right intent(#befunny) and replies with the expected answer — even though “Be humorous” is not a given example under the #befunny intent.
“Be humorous” allows Watson Conversation to detect the right intent(#befunny).
We also used Watson AlchemyData News API and Personality Insights API, which allowed us to search and return relevant news articles based on input from the user and gain insight into how and why people think, act, and feel the way they do. To find common ground for conversation with their date, users input their date’s hobbies or interests. WingBot calls the AlchemyData News API, returning relevant real-time news articles in a carousel format that Messenger provides. If users input a Twitter handle, the bot calls the Twitter API and analyzes all the tweets from that handle using the Watson Personality Insights API.
When a user sends a help message, wingBot requests additional information to evaluate how the date is going. We used Foursquare’s API to recommend nearby cocktail bars if wingBot determines the date is going well. If the date is going badly and the user wants to end their romantic evening out, wingBot asks for confirmation before using Twilio’s API to call the person and read out the text which is stored in an XML file. Users can then plead a need to deal with the call and exit gracefully.
What We Learned
This hack gave us a great opportunity to look into Watson. We plan to learn more about some of its services, such as Watson Conversation, Personality Insights, Tone Analyzer and Speech to Text, as part of our research into possible BBC News bots. Our hope is that these kinds of services will allow us to build personality for the bot and make it a much more natural conversational experience. Working out the new editorial - and social - experience which we need to offer to make bots work as a new and trusted source of news is likely to be a substantial project for us next year. As a first step we will be aiming to train the bot to have more natural conversations with users.