Expressions Help
# 🤝help
a
Hey guys! I am currently experiencing some problems with my expressions which I can't seem to fix. So I have created a fallback to 2 nodes that are dedicated to answering questions. The first node is just a basic node and the second one is a loop where the user can continue asking questions. Each node is made up using a raw input card where the user can ask their question, a query knowledge agent card, an AI-task card which is used to modify the answer from the KB, and a text card where the bot posts the modified message from the AI. However, this makes it quite difficult to set up a fallback. I have set up 2 expressions, one for the fallback and one for proceeding to the loop. However my problem is that when I manage to set up an expression that goes to the fallback (like !turn.KnowledgeAgent.responded), every message, even if an answer is found, goes to the fallback. And if I select something else as my expression, it just proceeds to the loop. Any ideas on how I can solve this problem? Also, I have done something similar on a previous node where I set up an expression with this condition "event.kb.results.length > 0", and it did work (succesfully gathered info from KB and rest was sent to "fallback") but that don't seem to work in this case.
b
can you try
!turn.KnowledgeAgent.answer
as your negative condition for the fallback?
a
I have but it doesn’t work
If I used that, it went to the fallback if the answer was successful as well
b
you need to place the expression immediately after the capture card
so it checks at the moment the request is made