Problems with AI task and KB -
# 🤝help
f
I have a very simple ai task back and forth chat which is linked to my KB. If the question can not be answered by the KB it moves to the ai task and answers it there. Things have been working perfectly for some time, however i am running in to a fair few issues within the last few days. The AI task sometimes does not answer the question and just spits out the variable the answer is stored in. and then sometimes the ai task does not run (well in studio it doesnt show that its running in the chat window) and answers a random question that has zero to do with my KB. For example for testing purposes i asked "what is pizza hut" and you can see it says "answer found in knowledge". Screen shot attached. it also sometimes just spits our the variable the ai response is stored. @acceptable-kangaroo-64719 @rich-battery-69172

https://cdn.discordapp.com/attachments/1131904601524797480/1131904601931653130/Screenshot_2023-07-21_at_12.03.35.png

https://cdn.discordapp.com/attachments/1131904601524797480/1131904602250432602/Screenshot_2023-07-21_at_12.03.23.png

https://cdn.discordapp.com/attachments/1131904601524797480/1131904602544013353/Screenshot_2023-07-21_at_12.03.13.png

https://cdn.discordapp.com/attachments/1131904601524797480/1131904602816651304/Screenshot_2023-07-21_at_11.57.42.png

a
Hey @freezing-carpenter-9818 could we get some more info about you bot please? Like * What does you flow look like? * What AI task prompt are you using? * How is your knowledge base structured?
f
sure thing!
this the part of the flow that seems to be having issues. I must stress again that this is only been happening within the last few days, it has been working perfectly before.

https://cdn.discordapp.com/attachments/1131904601524797480/1131907095139201054/Screenshot_2023-07-21_at_12.12.38.png

here is the ai task, its just a basic ai task to answer random questions and have a conversation with gpt.

https://cdn.discordapp.com/attachments/1131904601524797480/1131907281169162261/Screenshot_2023-07-21_at_12.13.11.png

as for the KB, we have 4 different knowledge bases all in the same workflow. Each KB is a faq on the services X offers. its all formatted correctly with the correct titles and kb names. its simple raw text format of question and answer.
The reason i was asking such random questions was to test, we have not a single word in the KB's that say for example "mcdonalds"
here are a couple of random examples i just did, you can see that one asks gpt and the other finds it from a kb

https://cdn.discordapp.com/attachments/1131904601524797480/1131909220929896599/Screenshot_2023-07-21_at_12.22.53.png

https://cdn.discordapp.com/attachments/1131904601524797480/1131909221236084826/Screenshot_2023-07-21_at_12.22.44.png

p.s im currently on a keto low carb diet hench the addiction to the food questions 🤣
a
From the examples you showed, it looks like the bot is working as intended, right? * If there is a match in the knowledge base, the KB answer is given * else GPT makes something up and shares it with the user You might also want to try testing the published version in webchat. AI Tasks in the emulator function a bit differently than AI Tasks triggered from webchat, with the webchat version being the one that is meant for end users. If there are no errors when you test on webchat, I would call that a success
f
Sorry i may not have been clear in my previous message. I do not have any knowledge base that has a description of mcdonalds or even a mention of mcodnalds, YET in the chat its pulling mcodnalds from a kb...
a
what kind of knowledge base sources are you using?
f
here is another example: in my flow (attached) at the start an ai task is given, but there seems be an added message before the ai task which is found from the kb

https://cdn.discordapp.com/attachments/1131904601524797480/1131927140900810922/Screenshot_2023-07-21_at_13.34.05.png

plain text
a
are you including the chat history when you do a KB search? Perhaps the AI Task's answer is contaminating the data
f
here is the start of the workflow

https://cdn.discordapp.com/attachments/1131904601524797480/1131927481411194930/Screenshot_2023-07-21_at_13.35.22.png

the knowledge base is turned of for this node, no capture is present, just the hello to start the conversation
a
There's a setting in the knowledge agent to answer (or not answer) on the start node
f
as easy as that! thanks @acceptable-kangaroo-64719 that wasn't there before was it?
a
it has been there for about 2 weeks? It's recent for sure
f
strange how its only just activated only just today ill keep testing with the other issue of it finiding random things like mcdonalds in the KB, maybe its just a ui bug where it says found in KB but really it was the ai task
f
Hi, I'm having a problem with AI Task. If I use the standard knowledgebase query function (not AI Task) I get the answers I want from the kb but I'd like to use AI Task so that I can manipulate the answer using a prompt. I've watched Robert's YT vid on AI Task (search entire web, question ="what is a burrito") and it works perfectly well. The problem starts when I Want to set the KB to search on a specific web site not the entire web. At this point the AI answer gets random, often displaying just a raw list of citations - as if it has found the raw data to the question but hasn't yet processed it into the answer. Help! please
a
Have you tried working through this tutorial on passing KB information into an AI task? https://discord.com/channels/1108396290624213082/1134222261134577765/1134222261134577765
f
Hi @acceptable-kangaroo-64719 thanks for forwarding the Loom meesage. I've watched it a couple of times and unfortunately because I'm a no-coder it doesn't make much sense to me. I think what I understand is that I've got the "AI Task Input" wrong. In my case I'm using the one Robert used in his YT video (search all web, what is a burrito) - which can see in the pic. In my specific kb I've got a single specific web site. Hence I'm not getting the expected answer back. Any help would be greatly appreciated.

https://cdn.discordapp.com/attachments/1131904601524797480/1142095886344781864/image.png

a
so in your AI task you're prompting the AI to summarize user input, but you're giving the AI knowledge base results- not the user input. The variable for the last thing the user said is
event.preview
, you can pass that in instead.
7 Views