In a new style of article the International Airline Group's digital team team joined up with Microsoft to build a prototype bot for the IAG's frequently asked questions. The Bot needed to be able to answer the questions in the most seamless way possible, so how did they do it?
Editors’ Note: this post may be a bit of a departure from the style of article you’re accustomed to on TechNet, but hopefully it gives our longtime IT Pro readers a glimpse into the kind of detailed technical discussions that our audience from the developer network know and love. Enjoy!
By Jamie Dalton
A look inside the recent collaboration with IAG
In July the International Airline Group (IAG) digital team worked alongside Microsoft to build a prototype for a Frequently Asked Questions (FAQ) bot. The goal was to build out a Proof of Concept (PoC) for IAG to see how they could open up new conversational channels to their existing customer base across their operating companies including Aer Lingus, Avios, British Airways, Iberia and Vueling. IAG’s customers have strong brand loyalty and being able to answer their needs in the most friction-free way is key to their customer service.
Hackfest team was formed as: Jamie Dalton (Microsoft), Gary Newby (IAG), James Crosthwaite (IAG), Andy Qua (IAG), Toby Bradshaw (Microsoft), Jason Fox (Microsoft), Ana Hidalgo de la Vega (IAG), Ami Turgman (Microsoft) and Simon Michael (Microsoft) - from left to right in the picture - Dan Jobling (IAG) and Lee Harvey (IAG).
The technologies used to build out the PoC were:
- Web: NodeJS
- Package Management: NPM
- Azure App Services: Azure App Service
- Azure Application Insights and Analytics: App Insights
- Bot Platform: Dev Bot Framework
- QnA Maker: QnA Maker
- Development tools: VS Code, ngrok, Github
- Blog storage: Azure Blob Storage
- Document storage: DocumentDB
An agile approach was taken by creating a shared vision of success, to then be able to triage and prioritise tasks from the Product Backlog. Once agreement on which user stories to address had been made, these were broken down into tasks that could be allocated to the hackfest participants.
The first step was for each developer to login to the MS Bot Framework portal and create their own individual bots, so that they could debug and run their code against them locally. We used the ngrok tool which works by creating a secure tunnel to localhost, allowing developers to configure their localhost bots to the messaging endpoint in the bot portal. We followed the below steps to get the debug environment up and running:
- Create a bot on Dev Bot Framework
- Run the bot website on localhost with a known port, e.g. 3978
- Run ngrok against that port (ngrok http 3978)
- Update the messaging endpoint of the bot in Step #1 to the generated ngrok endpoint
- Chat to the bot using the channel that we were developing against e.g. Skype,Slack, etc.
The next task was to setup a Github repository and a corresponding Azure App Service website. Once this had been done it was configured with continuous deployment against the repo, so we could gain early sight of progress as developers pushed each commit to the central repository.
IAG wanted to create separate bots for the different operating companies. These bots would need to analyse the question being asked by users and determine the most appropriate answer. The QnA Maker was used to do much of the heavy processing, as it is capable of creating a knowledge base of questions and answers from existing content. In this case, the service pointed to an existing FAQ url or data file and generated a service endpoint.
We needed one service endpoint for each operating company’s existing FAQ bot. Once the services were created we trained them to ensure they give the correct answers.
Within our sprint we added some stretch goals. One of these was to add telemetry to the bot, this is a recommended practice as it is important to see how your users are interacting with it and ensure that it is adding value. Application Insights was implemented to log whenever the user was given an un-helpful answer. This not only allows IAG to update their FAQ, but to regenerate the QnA Maker backend service to provide better responses in future.
IAG wanted to demonstrate how different types of media would be displayed on various conversational channels by initially focusing on Facebook Messenger, Skype and Slack. The existing FAQ contained simple question and answer text. It needed corresponding multimedia metadata associated to it - which could then be served up in the response. We wanted to showcase carousel and video responses. Whilst we were able to display text, images and hyperlinks, Skype does not currently support video playback. We therefore defaulted to displaying a hyperlink which opens the video within a browser.
IAG also wanted to be able to “channel hop”, the ability to start a conversation in one channel and then move it to another including the context. We used the scenario of beginning a conversation in Skype and then transferring to the Avios mobile application. To solve this, a combination of DirectLine channel and a backend store of conversation history was implemented. Afterwards, a deep-link with a token was displayed within the conversation to redirect the user to the mobile application, where state could be retrieved based on the token.
Dan Jobling, Disruptive Tech at IAG, said: “Bots could play an important role in our customer experience and internal applications. It is important to prototype with the latest bot technology to explore the possibilities within our business.”
Opportunities for reuse
Any FAQ-based bot can leverage the QnA Maker, it is a great tool to quickly provision a powerful backend question/answer service that your own bot can implement. This solution leverages this approach, whilst demonstrating multimedia support across channels and how to support “channel hopping”.