Creating Serverless Chatbot
‘Fin’

On the 31st of May, SAS Netherlands held the Data Science & Analytics Day 2018. In light of this event, SAS approached Finaps to create a mobile solution that would guide attendees through the day. There was only one major request: it must have an integrated chatbot.

Date: 10-2018

As result, Finaps created a mobile solution that enabled attendees to see the schedule of the event and to create their own schedule. Based on the personalised schedule, attendees were alerted 5 minutes before their ‘liked’ talk would start. Furthermore, the app enabled attendees to chat and connect with the SAS partners that were present at the event. The app also had the requested chatbot that could provide additional information about the schedule, and even recommend talks based on the attendee’s preferences.

In this article we discuss the approach to create the entire solution within a tight schedule. Finaps chose to approach this project with a new architecture that we never used before. However, it was a perfect fit to develop the mobile app for the SAS Data Science & Analytics Day 2018.

Serverless architectures
Serverless is a way of architecting a solution which eliminates the need to manage a server yourself. With this approach, you do not have to worry about the physical aspects of your server like memory and CPU power. The advantage of this approach is that your solution is still running on a server, but you do not have to manage that server. Instead, you outsource the management of the server to an external party like Microsoft (Azure), Google (Google Cloud Platform) or Amazon (Amazon Web Services).

 

By outsourcing server management, you trust your provider with managing the maintenance of the servers, and availability of the server. In addition, you can choose to let the server scale with the need of your users. If your user base increases exponentially, your provider will handle this increase automatically (although you have to pay for it). In the end, you only pay for what you use.

Choosing a bigger cloud provider to handle your server is not directly the same as going serverless. You can still choose to create an entire solution, including database, backend and a frontend, and host it on one of the servers of your provider. When you go entirely serverless, you have to embrace the idea of ‘Functions as a Service’, or FaaS, instead of the idea of creating a front-end, back-end and database. FaaS is very similar to a microservices architecture. But instead of creating your own small services and connect them, you will use existing functions and connect these through available services. You can for instance easily use a database service, connect it with a payment service and AI service, without creating a backend application that needs to run on a server.

‘Fin’ as a serverless chatbot
When SAS asked Finaps to create a mobile event app with an integrated chatbot for the Data Science & Analytics Day 2018, we had a tight schedule. By going serverless, we eliminated the time we needed for setting up a server.

Because the focus is a mobile application, not a web-application, we could also use existing services to provide the envisioned experience. These existing services were already stable enough and covered all we needed. So, a serverless Fin was born.

We needed one source of truth for the mobile app. By using an existing database service, we could easily create a central repository that would hold the daily information about the program, the users and the preferences of the users. A separate notification service did every 5 minutes a database call to the database service to see if a push notification for the personalised schedule was available.

A big aspect for our solution was the integrated chatbot Fin. By combining two services, the envisioned chatbot experience could be provided to the attendees of the event. Through the mobile app, an attendee was talking to an AI service that ensured correct interpretation and answering of all the natural text. The AI services used an analytics service that was connected to the database, so that personalised responses could be created.

A great example is when an attendee asks for a recommendation. The AI services parses the request and sees that a personalised response is needed. The analytics services does a database call to find the preferences and what their personalised schedule is. By matching the ‘liked’ talks and the attendee’s topic preferences with the entire schedule, a personalised recommendation can be created. This recommendation is given back to the AI service, which presents it directly to the attendee. If the attendee requests more information about this recommendation, the AI service recognises the context of the conversation, and can obtain more information about the recommendation through the analytics service.

Results
The described approached enabled Finaps to fully focus on the experience of the attendees visiting the event. By creating a native mobile experience, the attendees were given an intuitive and performant application that feels right for their phone.

Besides the experience in the app itself, a lot of time was spent, together with Mark Bakker of SAS, to configure and train the chatbot. The end result is a solution we are all proud of.

The SAS Data Science & Analytics Day 2018 was very successful for both Finaps and our Fin. Not only did we have a strong presence on the day itself with multiple presentations, the positive feedback on our event solution was tremendous. We can see this back in the statistics of the mobile apps as well. To conclude, the app has been a success that exceeded not only our expectations, but also the expectations of our partner SAS.

Let’s create your business solution