problem with KB and AI TASK
# 🤝help
b
Hello, I am having a problem with my knowledge base and AI TASK. My knowledge base is very simple, there are 5 areas of Buenos Aires and each one contains 3 restaurants. The AI ​​TASK has to see which area the user chooses and then recommend those 3 restaurants in the chosen area. The problem is that of the 3 restaurants it lists only one is in the knowledge base, the other two are invented. In some cases it adds restaurants, for example instead of putting 3 restaurants that are in the knowledge base it puts 5 and only one is in the knowledge base. I don't understand what could be happening. EXAMPLES: https://cdn.discordapp.com/attachments/1232437015161737278/1232437015325311037/image.png?ex=662973ea&is=6628226a&hm=b88d3955949940ff14dd52c4cb4baa22ddfc1c2055313d778130c60a72190dbd& https://cdn.discordapp.com/attachments/1232437015161737278/1232437015614591047/image.png?ex=662973ea&is=6628226a&hm=26c01e678c48e79eb954707a935f169a46cf5f2862f179b9d4b9b7cd82668890&
g
Mind if I ask how you use AI task? What is your AI task input?
Because the Ai task can't search the knowledge base so it's normal if it doesn't give the answers you want
b
oh got it, What could I use to give me an answer from the knowledge base but with AI?
I am new to botpress, I was working with voiceflow and the AI ​​could connect with the knowledge base, that's why my doubt
g
Make a query knowledge card with the query being location in {{workflow.location}} note that you must create a variable like the workflow.location and use it to store the answer from the user (saying for which place they are searching a restaurant) Then save the query knowledge base's answer in workflow.output Send directly the message or transform it with the Ai task (so in the Ai task input section : @workflow.output) As of the prompt, say what you want
And then store the output in workflow.AiAnswer Make a text card with @workflow.AiAnswer
b
omg! thank you so much!!
could you help me with this too? I am making a bot with Instagram integrated , I need that when the user talks to me on Instagram, the bot reads the username and saves it in a variable and then sends it to an airtable, I only need the part that the bot reads the username, I already have the rest.