https://discord.gg/botpress logo
#🤝help
Error with !turn.KnowledgeAgent.responded
# 🤝help
c

careful-keyboard-68830

07/11/2023, 3:39 PM
Not really sure why both knowledge base and AI answered the question even though I specifically stated "!turn.KnowledgeAgent.responded" (see image below)
a

acoustic-hair-60678

07/13/2023, 2:55 AM
Hi @careful-keyboard-68830 can you walk through what the expected workflow is supposed to be and what's happening instead? I see the messages and the workflow but not able to do the mapping of one onto the other
c

careful-keyboard-68830

07/13/2023, 4:54 PM
The user first asks a question (1st card on the left node) > knowledge agent outputs and answer if there is (2nd card on left node) > if no answer from knowledge agent (3rd card on left node) then GPT will take over and help to answer (node on the right). However, as you see from my test, even when the knowledge agent answers, GPT still takes over and answers the question which is not needed.
a

acoustic-hair-60678

07/13/2023, 10:13 PM
Thanks for the clarification. @acceptable-kangaroo-64719 @acceptable-gold-88171 any idea of what could be going wrong here? @careful-keyboard-68830 if you put the third card (no answer transition) before the second card {{turn.KnowledgeAgent.answer}} does that improve the behavior?
f

full-helmet-73535

07/14/2023, 12:05 AM
@careful-keyboard-68830 did you change the settings of the knowledge agent? It needs to be set to only “manually” respond. Go to the agents tab in the left side of the studio and select the knowledge agent, a window will pop up and it has “answer on first node” on by default. You need to unclick that, and then click on manual answer only
c

careful-keyboard-68830

07/14/2023, 9:25 AM
Tried shifting it above the {{turn.KnowledgeAgent.answer}} but the !turn.KnowledgeAgent.responded triggered first and skipped that card totally

https://cdn.discordapp.com/attachments/1128349741479112715/1129342888111788112/image.png

https://cdn.discordapp.com/attachments/1128349741479112715/1129342888346660864/image.png

yep i switched it to manually answer

https://cdn.discordapp.com/attachments/1128349741479112715/1129343011814391899/image.png

a

acceptable-kangaroo-64719

07/14/2023, 11:06 AM
Yep like David said, you should have manual answering turned on, otherwise the Knowledge agent will interrupt whatever node you're in and give you an answer. You should also put the transition for no knowledge answer before you use a text card to say the answer, otherwise that text card will be a blank bubble when there's no answer.
c

careful-keyboard-68830

07/14/2023, 1:54 PM
I realised !turn.KnowledgeAgent.responded didn't work but !turn.KnowledgeAgent.answer did and actually works like how "...responded" was supposed to. When the KA didn't know anything, "...answer" was triggered.
Yep I had answer manually turned on
93 Views