Following are the high level steps to build an AI chatbot
- Define the business use case and end goal for building the chatbot.
- Define Conversation interfaces
- Define what kind of questions needs to be answered
- Define conversation/dialog flow on how various interaction would happen with the user. For instance, booking a flight is one dialog flow, booking a hotel is another dialog flow, etc. Within a dialog flow, what would be interaction flow with the user.
- Define how to capture the feedback from the user regarding the answers provided. Feedback can be explicit, like the user rating the answer or implicit on how much time a user spends looking at the answer and follow up activity after that.
- Question / Answer exploration
- Identify existing sources (if any) for questions, like website FAQ, call center logs etc.
- Create representation of Questions that would be asked.
- Create variations of questions for training the chatbot to understand the language and be able to generalize well.
- Identify source of answers – whether it would be programmed response or coming from internal knowledge sources and documents (like available technical manuals for troubleshooting device related queries)
- Pick up a Technology approach
In this step, you will decide how to implement the chatbot. There are 2 approaches – building your own chatbot implementation using available frameworks (like TensorFlow, NLP implementations like NLPTK) and custom components or using an existing platform service like Google NLP, Amazon Lex or Azure Bot service.
In both the approaches, you would need the train the chatbot implementation to recognize the question intent, domain and the language. Existing platform services have simplified this process by providing required utilities that makes it easier to create chatbots. For more details, kindly refer to “How do you build chatbot using chatbot platforms”.
- Pick up a delivery channel
In this step, you will decide how to expose the chatbot to end users through the required channel. The channel can be web, mobiles or voice enabled devices.
Your chat implementation would typically expose an API (to ask questions and get responses) which can be called by a channel implementation. You can also release your chatbot implementation over third party services like Facebook Messenger or voice enabled services like Amazon Alexa. For more details, kindly refer to “How do you Integrate chatbots with third party services”.
- Release, Monitoring and Feedback
Once the chatbot is released, you would typically store all the user interactions to help you analyze the user behavior and their preferences better. The user and behavior data in turn would be used to provide a more personalized service. How would you use this new user information, depends on your use case. For instance, if a travel chatbot is recommending a new holiday trip, it can suggest options based on your last trip interaction. You need a build a recommendation system that looks at the history of the user interaction in the past and suggest options. For details on how to build recommendation systems, kindly refer to Recommendations Chapter of Real AI book.
Another important point is to capture feedback from the user at regular intervals to understand if chatbot is providing the right information. The feedback captured will be used to improve the chatbot implementation, which can lead to training the chatbot implementation with new information. For instance, your chatbot may not be trained on recognizing certain entities and concepts and as a result the responses would not be proper. You need to plan for building and releasing incremental models based on the feedback.