My team and I were working on an open-source customer project in the aerospace domain that provided scientific data for students and university data scientists. After several attempts to build a classic Web UI application, we moved to a simplified Bot Flow. And this is why and how.
The project has a short and straightforward data response. It contains only essential data like:
However, some messages have links to the detailed report that is a classic Web UI. Having a chat with a bot is more natural as you feel like you are communicating with a person.
Here is another good example of how bot service can be convenient in our daily life. Recently Microsoft has launched the Healthcare Bot Service.
In this article, I build a simplified version of a Bot that aggregates data from the NASA API and provides the user with a simple workflow and short data feedback. Also, I use Azure Language Recognition (LUIS) service to improve and simplify the conversation flow.
The NASA Bot contains the following functions:
Before we dive deep into the details, let’s examine why the Bot is better than a classic UI.
Using the bot approach may significantly improve the user experience if you have:
UI is better than a Bot if you have:
The best option may be to combine both approaches and use all benefits from a Bot and a classic UI.
I have chosen NASA API because of:
NASA API is divided into categories or sub APIs, like:
Azure Bot Service, alongside the Bot Framework, provides you with an opportunity to build, test, store your Bot. Bot Framework includes tools, SDK, AI services, and templates that allow you to make a bot quite quickly.
In my case, I have created a project with Visual Studio using the template and installed a toolset, SDK, and templates. I have used .NET Core and C#. However, this framework also allows using JavaScript and Python.
LUIS is a language understanding service that allows you to build and train your Bot to understand a natural language. I have included LUIS in my Bot to provide people with information from NASA API using different natural language construction.
For the current project, I have trained LUIS manually using the LUIS Portal. Below you can see that I added language sentences to train the LUIS to recognize user feedback and set the score. The LUIS portal also contains an option that allows you to test your data set and deploy it to different stages.
Of course, a manually trained model is suitable for small and middle-level bot projects. You should consider using pre-trained models that you quickly find in JSON format or set up for the production application.
You can also improve language understanding by adding QnA (Question and Answers) and language generation templates.
The NASA Bot architecture represents an N-tire structure based on an MVC pattern. The Bot includes API Controllers, Models, and Services.
The NASA bot consists of the following main components.
You can find code examples and the NASA Bot project here.
Below is the list of other bot components with a link to the GIT repository:
Below, I have added several screenshots that demonstrate an interaction with the Bot. As you see, here I used Bot Framework Emulator.
The article demonstrates the main advantages that bot services can bring in comparison to UI interfaces. In the next article, I will extend the Bot by adding more advanced features.
Here is the link to the git repository where you can clone the project.
In the next article, I will upgrade the Bot by adding:
Please feel free to suggest your ideas on what else should be added to the Bot or covered in the next article. Looking forward to hearing from you in the comments.
Free Resources