How to get list of all user questions from Bot Ontology automatically.

chatbots

(Himanshu Goel) #1

Is there any way by which I can provide all list of User Questions from Bot Ontology. Suppose User types a query “What are your capabilities?” or “Which questions you can answer?”. As a response from bot I want to list down all the question I have defined in Bot Ontology as User Question.

The bot should fetch and show the list of all the questions automatically, so that next time if I update or add new questions in Bot Ontology then Bot automatically list down those updated User Questions.

By this user can go through that list of questions which Bot can answer and user can directly select either its number or copy paste the question itself to know its answer.


(Subrahmanyam Donepudi) #2

@himanshu.goel.mca Knowledge base usually have huge list of questions (May be in hundreds) and I guess it might not be appropriate listing all the FAQs .

However, to achieve your usecase I have followed the below steps:

  1. Exported the Knowledge to JSON file

  1. Created a dialog as list of faqs

  2. Added a script node in the dialog in which I have created a context variable to store the JSON of Knowledge graph.

  1. Added the entity node of type - List of values (enumerated) with reference to the context data for fetching the question and enabled channel specific formatting.

  1. Trained the dialog list of faqs with the utterances like “FAQ list”, “Frequently asked questions”.

So now, when user utters “Frequently asked questions”, the dialog “list of faqs” will be invoked and it list all the questions.

Hope this could be of some help :slight_smile:


(Himanshu Goel) #3

Thanks @Subrahmanyam for you reply, you have explained the solution very well. The only thing issue which I found is that everytime we make changes in knowledge based, we need to again export that data and make it updated in the list of context.

Is there any way by which we can avoid it, means if this list of faq can be updated automatically based on the data present in knowledge collection?


(Subrahmanyam Donepudi) #4

@himanshu.goel.mca Thank you.

I will check if we have a public API which fetches the list of tasks or FAQs or will take this up with the product management team and proceed with their inputs accordingly.

Will keep you posted.


(Subrahmanyam Donepudi) #5

@himanshu.goel.mca We currently do not have public APIs for fetching list of tasks or FAQs. I will check with Product Management team if we would need to create some and make them available in future releases.

Thus said, as mentioned earlier, FAQs of system wouldn’t change quite often. So maybe, we should be good with using the KG JSON at a dialog . Developer could even add these sort of questions in the KG at the Root node or a nodes having term usage as organizer and could present all FAQs or FAQs of a category to the user using advanced JS editor.

Please refer to below link related to term usage options at Knowledge Graph for more details:


(Himanshu Goel) #6

Thanks @Subrahmanyam. Using the KG at the root node also requires to update the all FAQs list in JS editor every time whenever we add some new FAQ in the system.

So for now we will refer the approach you suggested, and maybe in future you product development team can take this as a new feature accordingly.