https://discord.gg/botpress logo
#🤝help
How can I determine the next node based on the answer to an AI task?
# 🤝help
i

incalculable-carpenter-26528

10/24/2023, 6:22 AM
My goal is: If there is no answer for the AI ​​Task, I would like to respond to the user with "No Answer". I'm thinking of using Workflow to achieve this, but the transition conditions haven't been set yet. 「turn.KnowledgeAgent.answer ==""」 didn't work.
If can't do it with Workflow, tell other methods ,please.
b

bitter-magazine-8114

10/24/2023, 9:10 AM
Not clear what you are trying to do.
Are you using AI and KB to answer at the same time?
i

incalculable-carpenter-26528

10/24/2023, 9:14 AM
Like it.
Yes
b

bitter-magazine-8114

10/24/2023, 9:15 AM
Why are you using the AI card? The Knowledge Base Agent will answer from the KB

https://youtu.be/Q2VMitD6DMU?feature=shared

i

incalculable-carpenter-26528

10/24/2023, 9:18 AM
Now I did like this.
I'll check the video tomorrow. thank you
b

bitter-magazine-8114

10/24/2023, 9:21 AM
What prompt is in the AI task?
i

incalculable-carpenter-26528

10/24/2023, 9:22 AM
b

bitter-magazine-8114

10/24/2023, 9:26 AM
Okay, that's where you go wrong. The Knowledge Base Agent will answer the question automatically. The AI card is unnecessary.
Remove the Ai task and switch it with an Expression Card with "!turn.KnowledgeAgent.answer" and connect that to a new Node with a Text Card "No answer" and test again.
It's in the video... good luck!
i

incalculable-carpenter-26528

10/26/2023, 9:37 AM
Help! But no answer . I want to get the pic3's Answer.
b

bitter-magazine-8114

10/26/2023, 9:40 AM

https://www.youtube.com/watch?v=Q2VMitD6DMU&ab_channel=Botpress

i

incalculable-carpenter-26528

10/30/2023, 1:56 AM
I did it as per the video, but the answer is not displayed automatically.
b

bitter-magazine-8114

10/30/2023, 10:47 AM
Then you probably need to check your Knowledge Base Agent's settings.
i

incalculable-carpenter-26528

01/11/2024, 9:08 AM
@bitter-magazine-8114 Now I am back to work on botpress, let me continue with my questions. I would like to search and display the results from the KB's table, but I was unable to do so. Have there been any changes to the specifications?