We actually wrote a dedicated blog article about how to build a chatbot with generative models, feel free to read it!
Chatbot/Conversational AI with GPT
What are Chatbots and Conversational AI and Why Use GPT?
Conversational AI is a central sub-field of Natural Language Processing that makes it possible for a human to have a conversation with a machine. Everytime the human says or asks something to the AI, the whole conversation history is sent too, so the AI can have the context in memory and make relevant responses. Modern chabots leverage conversational AI and can do more than simply having a conversation. For example they can detect customer intents, search documents, understand the customer tone and adapt their own tone (anger, joy, sarcasm...).
Until recently, chatbots have been very limited. But with the creation of huge modern models like GPT-3, GPT-J, and GPT-NeoX, it is now possible to easily create advanced chatbots that are both fluent and relevant.
GPT-J and GPT-NeoX are the most advanced open-source NLP models as of this writing, and they are the best GPT-3 alternatives. These models are so big that they can adapt to many situations, and perfectly sounds like a human. For advanced use cases, it is possible to fine-tune GPT-J and GPT-NeoX (train them with your own data), which is a great way to get a chatbot that is perfectly tailored to your company/product/industry.
GPT-J, GPT-NeoX, and GPT-3 have no "memory". So you should help them by re-sending the conversation history in every request you're making. We actually wrote a dedicated blog article about how to build a chatbot with GPT, feel free to read it!
Why Use Chatbots and Conversational AI?
More and more companies want to leverage chatbots, either to build an advanced product based on AI, or improve their internal productivity. Here are a couple of examples:
The most popular chatbot application is to automatically help customers without having to rely on a support person. It dramatically improves reactivity, and it alleviates the support team so they can focus on very advanced questions only. A good support chatbot is able to search documents for customers, answer contract or technical questions, detect customer tone and intent...
Some video games now include conversational AI capabilities, so players can naturally discuss with the machine. It makes modern games much more interactive, especially because modern conversational AIs can adapt their tone to the situation (anger, joy, sarcasm...).
It's sometimes hard for a user to find what he's looking for, especially if there're a lot of products or if the products are complex. In that case, building a chatbot to help customers and point them to the right product is a very good solution.
The healthcare industry leverages chatbots in order to discuss with patients and automatically make a diagnostic.
The context gives additional general details like the mood of the characters, facts about the persons involved, historical details, etc. In order for the context to work correctly, the model should be called "AI" and the user should be called "human". Here is an example: "This is a discussion between a human and an AI. The human is sad but the AI is empathetic and reassuring. The AI is called Patrick.".
The history of your previous exchanges with the chatbot. The order of the array is important: the last elements in the array should be the more recent discussions with the model.
Control whether you want to use the model on a GPU. Machine learning models run much faster on GPUs.
AI models don't always work well with non-English languages.
We do our best to add non-English models when it's possible. See for example Fine-tuned GPT-NeoX 20B, Dolphin, ChatDolphin, XLM Roberta Large XNLI, Paraphrase Multilingual Mpnet Base V2, or spaCy. Unfortunately not all the models are good at handling non-English languages.
In order to solve this challenge, we developed a multilingual module that automatically translates your input into English, performs the actual NLP operation, and then translates the result back to your original language. It makes your requests a bit slower but often returns very good results.
Even for models that natively understand non-English languages, they actually sometimes work even better with the multilingual addon.
Simply select your language in the list, and from now on you can write the input text in your own language!
This multilingual add-on is a free feature.