Teacher Gavin's Transformer Live Lessons - Rasa Dialogue Robot Debugging Project Actual E-commerce Retail Dialogue Robot Operation Process Debugging Full Demonstration (78)

   This article continues to focus on the industrial-level business dialogue platform and framework Rasa, analyzes the operation process of the Rasa project's actual e-commerce retail Customer Service intelligent business dialogue robot, and uses the Rasa shell debug mode to demonstrate the dialogue process and debug problems.

1. The operation process of the Rasa project's e-commerce retail Customer Service intelligent business dialogue robot and the whole process demonstration of project bug debugging

  1. Function analysis of intelligent business dialogue robot for e-commerce retail Customer Service

Some core functions will be implemented in this project:

- Check order status

- Cancellation of purchased items

- Return the purchased item

- Search for items you want to buy

-Commodity information subscription function

Through this project, the framework provided by Rasa can be extended to any intelligent business dialogue robot in the retail industry or e-commerce industry. There are several key points that need to be paid attention to in the development. One is whether it is possible to understand the data of the retail or e-commerce industry in a more detailed manner, and to judge the intentions expressed by users and what they want to do. The second is how the decision-making system or dialogue management system is. Design, the third is the exception handling and version iteration of the dialogue robot. This is because any dialogue robot will face the uncertainty of human language, and it is necessary to consider how to better handle this situation, especially in the previous version, theoretically not. It is possible to cover all situations of users, so from this perspective, it is a process of continuous improvement.

  2. The operation process of the intelligent business dialogue robot of the e-commerce retail Customer Service

Run the command rasa visualize to get a visualization of the dialog flow:

After the execution is completed, a web page will automatically pop up to display a visual flowchart, and you can see that the entire process is complex.

Below is the flow chart of the left part:

As can be seen from the figure, the following forms are mainly used:

-cancel_form: order cancellation form

-return_form: product return form

-product_updates_form: Product update form

-product_stock_form: stock information form

-order_status_form: order status form

There are corresponding actions under each form, and these actions will trigger the form "survey_form" to collect feedback from customers.

The flow chart of the middle part:

The flowchart on the right part:

An error message appears when running the command rasa train for training:

According to the prompt information, you need to add version information to the domain file:

For another error message: Can't load class for name 'DucklingHTTPExtractor', find the relevant configuration information in config.yml:

At this time, you can update the name to "DucklingEntityExtractor":

Rerun the command rasa train for training, and you can see that there is no error message:

Each component is trained in turn. The following figure only shows the training of the relevant policies components:

-MemoizationPolicy

-RulePolicy

-TEDPolicy

    After the training is completed, the model will be saved as a file through the serialization operation:

Run the command to start duckling: docker run -p 8000:8000 rasa/duckling

  3. Use Rase shell --debug mode to test e-commerce retail Customer Service projects and think about bugs

Run the command rasa shell --debug to start the Rasa server in debug mode:

Run the command rasa run actions –debug to start the action server:

Input information: Hi, the dialogue robot responds as follows:

Enter information to check order status:

Dialogue robot output information:

Enter email information:

Output information, you can see that the order status information is returned:

Enter the information after selecting according to the above options:

According to the feedback information entered by the user, the dialogue robot responds as follows:

Continue to enter the query order status information:

Output order status information:

At this time, the chatbot does not request email again, because the value of the previously entered email has been saved in the session:

The database used is defined in the action:

Restart a new dialog session and enter the query order status information:

The dialogue bot returns the output information:

Enter email, here deliberately enter an email that does not exist in the database:

Since the email entered above does not exist in the database, the chatbot returns a message indicating that the order corresponding to this email is not found, and asks the user to provide feedback:

Provide feedback:

Then the dialogue process ends:

Guess you like

Origin blog.csdn.net/m0_49380401/article/details/123648902