How do you customize knowledge base actions?
The default knowledge base action has several disadvantages. First, the message returned to the user is not very user-friendly, the reply format is fixed, and it does not have any personality. Second, the built-in memory-based knowledge base is limited by the size of the memory and cannot support a very large-scale knowledge base. Additionally, there is no way to modify the content of the knowledge base externally in real time. In the following sections, we will solve these problems one by one.
Modifying ActionQueryKnowledgeBase to customize the behavior
Here, we introduce how to customize the output message from ActionQueryKnowledgeBase
. This is especially important for Rasa developers who use multiple languages, as the default return message is always English.
Custom ways to express the object list
When a user requests the bot system to return the list of objects, utter_objects()
will be called. The function of utter_objects...