12 Getting chatty with dialog engines

 

This chapter covers

  • Exploring popular chatbot applications
  • Understanding the advantages and disadvantages of generative chatbots
  • Augmenting generative chatbots with information retrieval
  • Designing conversational interfaces for improved user experience
  • Monitoring, evaluating, and optimizing your chatbot

You finally have all the NLP tools you will need to create software that can talk back. In this chapter, you will learn how to add semi-intelligent dialog to your software projects, whether you are building a website, a mobile app, or an internal tool for your business or personal life. Hopefully, you will come up with chatbot ideas that are smarter and more helpful than what you’ve seen so far on storefront web pages. For example, Amazon Alexa was created with the explicit purpose of making Amazon shopping an effortless experience, to increase Amazon’s bottom line. One of the main objectives of this book is to help you harness the power of AI for yourself, instead of letting corporations harness you for their benefit. You may even be able to build chatbots to be your information bodyguard. The chatbots you build in this chapter can protect you from dark patterns and, perhaps, give you back that time and attention to create something awesome. In this chapter, you will learn how to build your very own chatbot!

12.1 Chatbots are everywhere

12.1.1 Different chatbots, same tools

12.1.2 Conversation design

12.1.3 Your first conversation diagram

12.1.4 What makes a good conversation?

12.1.5 Making your chatbot a good listener: Implicit and explicit confirmations

12.1.6 Using GUI elements

12.2 Making sense of the user’s input: Natural language understanding

12.2.1 Intent recognition

12.2.2 Multi-label classification

12.3 Generating a response

12.3.1 Template-based approach

12.3.2 Conversation graphs

12.3.3 Storing your graph in a relational database

12.3.4 Scaling up the content: The search-based approach

12.3.5 Designing more complex logic: The programmatic approach

12.4 The generative approach

12.5 Chatbot frameworks

12.5.1 Building an intent-based chatbot with Rasa

12.5.2 Adding LLMs to your chatbot with LangChain

Summary