Double Answers with AI Task and Conversational Mem...
# 🤝help
p
My issue is a double output for the first response when using AI Task and Conversational Memory and then Skipping KB for additional responses in the conversation. I primarily used this video from @bumpy-butcher-41910 -

https://www.youtube.com/watch?v=LpUIYC7uw94

The issue is the bot returning two answers and based on the logs it appears that is because the answer is being sent twice - once by the Knowledge Agent and again by the Dialog Manager. Then on the second question the bot skips the Knowledge base all together while formulating the response. I tried setting the knowledge agent to Manual and adding the code as noted in the "Integrate AI Task and Knowledge Base" video (

https://www.youtube.com/watch?v=z4dLcUfF8d0

) but that only helped with the first question not being doubled. I image that is because the bot is skipping the KB for the other questions. It shows "Skipping KB: disabled for the current turn" in the logs. I'm trying to get the knowledge base queried first for an answer on each question before being sent to Openai. How do I avoid the initial double answer when the KB is queried and how do I get it to be queried every time? Logs and screenshots attached https://cdn.discordapp.com/attachments/1238909669884297217/1238909671020953640/2024-05-11_12-35-30.png?ex=6641000b&is=663fae8b&hm=c32d505836a584307d62e96cddf8f51debcdafba597757b3356b0bb414678c8e& https://cdn.discordapp.com/attachments/1238909669884297217/1238909671431999628/2024-05-11_12-35-49.png?ex=6641000b&is=663fae8b&hm=f2beb434f5e951cd8bfc01fd8099e2532ac88edd9f3d3d74f533c87357bf88b5& https://cdn.discordapp.com/attachments/1238909669884297217/1238909671851425892/2024-05-11_12-36-07.png?ex=6641000b&is=663fae8b&hm=bb31b8c6a823a271cf7993dc75aefc374b76c0c85cc4be4352502d8f0f04d0d4& https://cdn.discordapp.com/attachments/1238909669884297217/1238909672111603762/AI_Loop_Log_5.11.24.rtf?ex=6641000b&is=663fae8b&hm=dacf4a82a6ee8d2904ce76517727b48f3073cf881a8baed2cd7861df559448fb&
b
is knowledge answering enabled on your start node?
b
so you'll want to go ahead and disable that
so instead of search all KBs, just select the option to disable search on that node
p
I'm not sure I am following, I don't see a way to disable or enable search per node (Chat_Loop in screenshot) so I tried disabling from Start node and that just makes it skip checking the KBs all together. To clarify, I'm trying to have the KB searched every time and not skipped. Thanks again. https://cdn.discordapp.com/attachments/1238909669884297217/1238941518530609282/2024-05-11_15-47-17.png?ex=66411db4&is=663fcc34&hm=0b4440dc8450c9d50ed8802f3bc6ff50a4d9e89427c8944a40d1ad8b0f1bf55a& https://cdn.discordapp.com/attachments/1238909669884297217/1238941518757367891/2024-05-11_15-45-54.png?ex=66411db4&is=663fcc34&hm=b8438f81ab4ed4c3478b8c0bc16be0e41326a5e863cf36ea256216ecab55cebc&
b
ah I see
are you sure you have manual answering enabled?
I set this up as follows: 1. user asks question to start conversation 2. ai task rewrites, sends answer 3. bot waits for a further question 4. the loop repeats https://cdn.discordapp.com/attachments/1238909669884297217/1238972436977025125/Screenshot_2024-05-11_at_5.53.29_PM.png?ex=66413a7f&is=663fe8ff&hm=c512534bdb98ab7808b6cc9f54e7b8aa439f9c9f95b15db2b8dd06d64426e7eb&
the problem is that original video wasn't meant to be looped so I've tweaked it a bit here - lmk if it works!
p
@bumpy-butcher-41910 that worked great for the using the KBs! My issues appears to have been using the Always transition instead of Wait for user input. Thank you! The issue now is now it doesn't gracefully drop out of the KB and into OpenAI when the answer is not found in the KB. It just restates answers it has already given. For example if I ask it on the third question "How is peanut butter jelly made?" (something not in a KB) it repeats the 1st answer and on the 4th question "what about jelly?" it repeats the second answer. Maybe I have something wrong in my task instructions or Task Input would you mind sharing a screenshot of what you have? Logs attached for reference. https://cdn.discordapp.com/attachments/1238909669884297217/1238987601214701620/No_AI_Logs.rtf?ex=6641489f&is=663ff71f&hm=2f7865bda61c0c33d151ea5245ac0f3c02a2ded0e966324dbdf2a3cfae432df4&
b
like so:
I'm not sure how you're handling the transition but we want to explicitly state that if there's no answer, the bot should do something
which results in:
the transition is, or flow logic card, simply uses the condition !turn.knowledgeagent.answer
p
Thanks @bumpy-butcher-41910, I'm not sure I am following exactly what I need to be doing, I'll hack around for a bit to see what I can figure out. I appreciate the weekend help. 🙂 https://cdn.discordapp.com/attachments/1238909669884297217/1239030955574820894/2024-05-11_21-45-16.png?ex=664170ff&is=66401f7f&hm=8f7d84b1d31c4d4ff2c93893537fe15670c6d70417903c3cdc417b87837b2680&
b
Robert_Workflow hahaha
essentially you're just telling the bot what to do if it doesnt find an answer
92 Views