Knowledge base answer on all nodes
# 🤝help
j
I have a fustrating problem. I want my bot to be ready to answer any question at any time using the knowledge base. I am having two problems... 1) I have one node which is a choice card. When a user asks a question on this node, it is answered by the knowledge base but then decides by itself to transition to the "I have a question" choice when I want it to stay on the current node and just repeat the choices. How do I prevent this happening? 2) When no answer is found in the kb how do I generate a generic reply of "Sorry I cannot answer that question, please contact us" while allowing it to stay on the current card and repeat it's intended action? I would really apprecaite some help here!!!! Many thanks, Jack
f
Could you elaborate on problem 1 so I can understand it a bit better. Maybe include a picture if you find it relevant. If you are trying to create a loop try what I did in the picture. If that doesn't work for you share a picture of your workflow and I can see how we can implement it for you.
a
@jolly-airline-35614 Adding on to @fresh-fireman-491 's answer.. If you want KB answering on all nodes where there is choice card you need to do 3 things. 1) turn on "Answer Qns from Kbs" in the choice card. 2) set "Retries" to 0 so it can move on if none of the buttons are clicked 3) add the no answer from KB option after the choice card and redirect it out for a response and loop it back. i personally use an expression card with the following code but as long as it works, its good. > !turn.KnowledgeAgent.answer
j
@Decay @JoshZ Thank you both for the replies. Heres the problem I am facing with having knowledge base answering enabled on a choice node. When a question is asked and the bot answers it automatically, it selects the "I have a question pathway" after , when I want it to just repeat the node. The node acts correctly when a question is asked and no answer is found in the knowledge base. Struggling to find a way around it, a lot of trial and error. Any more suggestions ?
@fresh-fireman-491 @able-rocket-15603
f
Connect the little dot to the start of your node
Open op your settings and set the Node Repetition limit to 10. If 10 is not enough you can create a duplicate version of that node and then you will have 20 as the maximum amount of question an user can ask.
This is my workflow in one of my simple bots.
j
Unfortunately this isn't working. When I ask the question "are you hiring" it always seems to trigger the I have a question choice and proceeds with that pathway. When I asked the previous question it worked as it should of. Very confused
f
You are using a single choice card. If you want to let the user be able to ask questions use a Raw input card instead.
My guess is that since you asked a question it took it as the option I have a question since you are asking a question
j
Okay I understand what you are saying. I just want my bot to be able to query the knowledge base at any point of the workflow then carry on with it's task but I guess that is a feature that is not available on Botpress. Shame there is no option to turn off force selection. Hopefully botpress will change this! Thanks for the assistance Decay!
f
That sounds like a pretty good idea for a post in #1111026806254993459 no? Maybe you could explain your use case in there and people will agree. I think it would be really nice too
51 Views