anyone know how to make it so when the knowledge b...
# 🌎general
s
anyone know how to make it so when the knowledge base can't answer a question, it comes up with an error or a message telling them to rephrase their question?
e
Hey @steep-architect-15, you could check if the KB has responded with the expression
turn.KnowledgeAgent.responded === true
. Then you can transition to another node that let's them know there is no answer. Finally, in that node add a "always" transition to have make the bot go back to the capture
s
Hi @early-train-33247 , thanks for the reply. Very much appreciated. Your guys support team is🔥 I've attached a coupe images to try to explain my problem here. If the KB is able to answer, the message from the 'no answer' node also appears. However when the KB can't answer it, only the 'no answer' message appears (which is good). Do you know how to make it so when the KB can answer, the 'no answer' message doesn't appear. Hopefully that makes sense
e
Can you show me what is the code for the first transition?
It seems that it always returns true and the transition is triggered
s
It's weird as it only happens when it can answer the question from the KB
e
Hey @steep-architect-15 that is happening because that transition is always returning true
Please update it to
turn.KnowledgeAgent.answer === null
, and let me know if that helps
s
Works like a charm
Appreciate that a lot @early-train-33247
e
Good to know @steep-architect-15! Happy building! 🚀