Abhishek Singh, Karthik Ramasubramanian and Shrey Shivam

Building an Enterprise Chatbot

Work with Protected Enterprise Data Using Open Source Frameworks

Abhishek Singh
New Delhi, Delhi, India
Karthik Ramasubramanian
New Delhi, Delhi, India
Shrey Shivam
Donegal, Donegal, Ireland
ISBN 978-1-4842-5033-4e-ISBN 978-1-4842-5034-1
© Abhishek Singh, Karthik Ramasubramanian, Shrey Shivam 2019
Apress Standard
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.

Abhishek and Karthik dedicate this book to their parents for their unwavering support and love.

Shrey dedicates this book in memory of his grandparents, the late Mr. Ravindra Narayan Singh and late Dr. Ganga Prasad Singh, for being the source of his inspiration and pride.

Introduction

There are numerous frameworks and propriety off-the-shelf chatbot offerings, but most do not clearly map out the much-needed control of data by an organization. Often the propriety offerings take an organization’s private data for training on the cloud and provide the outcome as a model. In this book, we will focus on data privacy and control over the development process. The chatbot that you will learn how to develop could be completely built in-house using open-source JAVA frameworks and NLP libraries in Python.

The beginning of the book helps you understand the processes in the banking industry and delves into identifying the sources of data to mine for the intent from customer queries. The second part focuses on natural language processing, understanding, and generation, which are demonstrated using Python. These three concepts are the core components of a chatbot. In the final part, you take up the development of a chatbot called IRIS using open-source frameworks written in JAVA.

The following are the key topics this book offers:
  • Identify the business processes where chatbots could be used in an industry and suitably guide the design in a solution architecture

  • Focus on building a chatbot for one industry and one use-case, rather than building a ubiquitous and generic chatbot

  • Natural language understanding, processing, and generation

  • Learn how to deploy a complete in-house-built chatbot using an open source technology stack like RASA and Botpress (such chatbots avoid sharing any PIIs with any third-party tools)

  • Develop a chatbot called IRIS from scratch by customizing an existing open-source chatbot framework

  • Use APIs for chatbot integration with internal data sources

  • Deployment and continuous improvement framework through representational learning

We hope you enjoy the journey.

Acknowledgments

We are grateful to our teachers at various universities and their continued support in our professional lives.

Abhishek Singh thanks his colleagues at Probyto who inspire him to write impactful content for better use of AI for public use; the idea of this book evolved through discussions with his colleagues and his work in the EU market. A special mention goes to his parents, Mr. Charan Singh and Mrs. Jayawati, for their intriguing insights on how to think about general human use of AI. Their support and demand for the simplistic design of solutions using AI-generated data inspires his day-to-day design of data products.

Karthik is immensely grateful to his parents, Mr. S Ramasubramanian and Mrs. Kanchana, for their unwavering support throughout his life and during the development of this book. This book was made possible by hundreds of researchers who shared their life’s work as open-source offerings. He thanks all such researchers who make this world better and passionately share their work with everyone. Lastly, a large part of his work and success comes from his mentors and colleagues from work, where he continuously learns and improves.

Shrey is hugely grateful to his parents, Mr. Vijay Pratap Singh and Mrs. Bharti Singh, for their love, care, and sacrifice in helping him fulfill his dreams. He expresses gratitude to his uncle, Mr. Tarun Singh, for being a pillar of strength. Shrey also thanks his past and current colleagues, including Dipesh Singh and Jaspinder Singh Virdee, for their continuous encouragement and support in taking up challenging and innovative ideas to execution.

Finally, this book would not have been possible without the support of the Apress team: Aditee, Celestin, Matthew, and the production support staff. We also acknowledge and thank our Technical Reviewer (TR) for their critical reviews that helped to make the book even better.

Table of Contents

Index 377

About the Authors and About the Technical Reviewer

About the Authors

Abhishek Singh
../images/478492_1_En_BookFrontmatter_Figb_HTML.jpg
is on a mission to profess the de facto language of this millennium, the numbers. He is on a journey to bring machines closer to humans, for a better and more beautiful world by generating opportunities with artificial intelligence and machine learning. He leads a team of data science professionals solving pressing problems in food security, cyber security, natural disasters, healthcare, and many more areas, all with the help of data and technology. Abhishek is in the process of bringing smart IoT devices to smaller cities in India so that people can leverage technology for the betterment of life.

He has worked with colleagues from many parts of the United States, Europe, and Asia, and strives to work with more people from various backgrounds. In seven years at big corporations, he has stress-tested the assets of U.S. banks at Deloitte, solved insurance pricing models at Prudential, made telecom experiences easier for customers at Celcom, and created core SaaS data products at Probyto. He is now creating data science opportunities with his team of young minds.

He actively participates in analytics-related thought leadership, authoring, public speaking, meetups, and training in data science. He is a staunch supporter of responsible use of AI to remove biases and fair use of AI for a better society.

Abhishek completed his MBA from IIM Bangalore, a B.Tech. in Mathematics and Computing from IITGuwahati, and has a PG Diploma in Cyber Law from NALSAR University, Hyderabad.

 
Karthik Ramasubramanian
../images/478492_1_En_BookFrontmatter_Figc_HTML.jpg
has over seven years of practice in data science and business analytics in retail, FMCG, e-commerce, and information technology for a multi-national and two unicorn startups. He is a researcher and problem solver with a diverse set of experiences in the data science lifecycle, starting from a data problem discovery to creating a data science prototype/product.

On the descriptive side of data science, he designed, developed, and spearheaded many A/B experiment frameworks for improving product features, conceptualized funnel analysis for understanding user interactions and identifying the friction points within a product, and designed statistically robust metrics and visual dashboards. On the predictive side, he developed intelligent chatbots which understand human-like interactions, customer segmentation models, recommendation systems, identified medical specialization from a patient query for telemedicine, and other projects.

He actively participates in analytics-related thought leadership, authoring blogs and books, public speaking, meet-ups, and training and mentoring for data science.

Karthik completed his M.Sc. in Theoretical Computer Science at PSG College of Technology, India, where he pioneered the application of machine learning, data mining, and fuzzy logic in his research work on the computer and network security.

 
Shrey Shivam
../images/478492_1_En_BookFrontmatter_Figd_HTML.jpg
has extensive experience in leading the design, development, and delivery of solutions in the field of data engineering, stream analytics, machine learning, graph databases, and natural language processing. In his seven years of experience, he has worked with various conglomerates, startups, and big corporations, and has gained relevant exposure to digital media, e-commerce, investment banking, insurance, and a suite of transaction-led marketplaces across the music, food, lifestyle, news, legal, and travel domains.

He is a keen learner and is actively engaged in designing the next generation of systems powered by artificial intelligence-based analytical and predictive models. He has taken up various roles in product management, data analytics, digital growth, system architecture, and full stack engineering. In this era of rapid acceptance and adoption of new and emerging technologies, he believes in strong technical fundamentals and advocates continuous improvement through self-learning.

Shrey is currently leading a team of machine learning and big data engineers across the U.S., Europe, and India to build robust and scalable big data pipelines to implement various statistical and predictive models.

Shrey completed his BTech in Information Technology from Cochin University of Science and Technology, India.

 

About the Technical Reviewer

Santanu Pattanayak
../images/478492_1_En_BookFrontmatter_Fige_HTML.jpg
currently works at GE, Digital as a Staff Data Scientist and is the author of Pro Deep Learning with TensorFlow - A Mathematical Approach to Advanced Artificial Intelligence in Python . He has 12 years of overall work experience with 8 years of experience in the data analytics/data science field. He also has a background in development and database technologies. Prior to joining GE, Santanu worked at companies such as RBS, Capgemini, and IBM. He graduated with a degree in Electrical Engineering from Jadavpur University, Kolkata and is an avid math enthusiast. Santanu is currently pursuing a master’s degree in Data Science from Indian Institute of Technology (IIT), Hyderabad. He also devotes time to data science hackathons and Kaggle competitions where he ranks within the top 500 across the globe. Santanu was born and brought up in West Bengal, India and currently resides in Bangalore, India with his wife.
 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset