App Development

How to develop a bot

Developing a bot is a challenging but worthwhile endeavor. If done properly, users will be delighted with your bot and the incredible convenience it offers. The two most critical pieces of developing a bot are the conversational architectures and the language understanding models. Getting these two pieces just right can mean the difference between an annoyance and a friendly helper.

Strategy first

Our strategy centers around doing extensive user research to get a detailed understanding of exactly what users will be expecting from the bot. Once we have a listing of everything a user might try to accomplish, we begin designing the conversational architecture. For example, if a user is presented with a movie bot, they will likely want to ask about showtimes, trailers, or theaters. These queries are all examples of “intents” and they are central to developing the language understanding models. After developing a list of intents, we can proceed with designing the conversation so we can capture all the necessary parameters to respond to the user’s request. Next, we input these intents and parameters into our natural language processor which trains our models on real user messages.

Modular design

With the recent explosion of bot-ready platforms, it’s become increasingly important to design your bots to be modular and easily integrable with new platforms. We have chosen to use Amazon Web Services (AWS) to spin-up new integration modules that plug into our pre-existing bot business logic quickly and easily. Our business logic also uses AWS Lambda, which allows our clients to rest easy knowing there are no servers to manage and they only pay per request. In the ever changing artificial intelligence landscape, it has never been more important to remain agile.

Ultimately, our chatbot architecture consists of three main components (sample architecture provided below): the messaging integration modules, the natural language processor, and the business logic. The messaging integration modules should all agree to a contract with the business logic so new modules can be added easily and the bot that will behave consistently across multiple platforms. The business logic receives the raw messages via the integration modules over a REST API, sends the message to be processed by our NLP engine, and then handles the parsed intent and entities appropriately.

blog-post-image 1 how-to-build-bots-510x209 Example Messenger Bot Architecture in AWS

Rapid intelligence

To speed the development of an intelligent bot, we have used Microsoft LUIS , which is NLP offered as a service. LUIS, like other services such as Facebook’s and Google’s , allow for you to customize and train a predesigned machine learning algorithm. These services only require you configure intents and entities, rather than developing your own NLP algorithm. Once intents and entities have been configured, all that is left is training.

Xcode Cloud: Choosing the Right Continuous Integration and Delivery Tool for Your Team

Apple recently announced the release of Xcode Cloud at the latest iteration of their...

Read the article