Building an End-to-End Customer Service Assistant

Building an End-to-End Customer Service Assistant

In this video, we will put together everything we have learned in the previous videos to create an end-to-end example of a customer service assistant. We will go through the following steps:

  1. Check the input to see if it flags the moderation API.
  2. Extract the list of products.
  3. Look up the products.
  4. Answer the user’s question with the model.
  5. Put the answer through the moderation API.

To set up our

assistant, we will use a Python package for a chatbot UI. We will paste in a function called 'process user message' and run an example.

The function ‘process user message’ takes in the user input and the conversation history. It checks if the input is flagged by the moderation API. If it is not flagged, it extracts the list of products and looks them up. Then, it answers the user’s question with the relevant product information. The response is run through the moderation API again to ensure it is safe to show to the user.

We also have a function to display the chatbot UI and have a conversation with the customer service assistant. We can ask questions about the products and get responses based on the steps we defined.

By monitoring the quality of the system and evaluating a larger number of inputs, we can make improvements to the steps and overall performance of the system. We can refine the prompts, eliminate unnecessary steps, and find better retrieval methods.

In the next video, we will discuss these improvements in more detail.

Evaluating the Outputs of an LM
Older post

Evaluating the Outputs of an LM

Newer post

Checking Outputs Generated by the System

Checking Outputs Generated by the System