Error with !turn.KnowledgeAgent.responded
# 🤝help
c
Not really sure why both knowledge base and AI answered the question even though I specifically stated "!turn.KnowledgeAgent.responded" (see image below)
a
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
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
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
@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
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
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
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
168 Views