6 Building an intelligent chatbot
This chapter covers
- Training an ML model to see similarities between two statements
- Using deep learning for text classification
- Integrating a text classification model with a chatbot
- Training a model to recognize entities in a sentence
Natural language processing (NLP) is a major field in machine learning. Without it, the popular AI chatbots, such as ChatGPT and Copilot would not be possible. While we won’t be building a fully-fledged ChatGPT clone in this chapter, as such a task would be way too vast for us to cover in a single chapter, we will add some intelligent chatbot capabilities to the virtual assistant we’ve built previously.
We will start by introducing a new task to the virtual assistant that will allow the user to see if two sentences have a similar meaning. Then, we will do something to make our whole virtual assistant smarter. The user will no longer have to type very specific words into the console. They will be able to describe the task they want to perform in their own words.
Then we will briefly cover how machine learning models can be trained to recognize specific entities in a sentence. For example, in a sentence such as “Microsoft announced the release of new AI”, a model can be taught to recognize that “Microsoft” is an organization, “AI” is a type of product, and so on.