https://discord.gg/botpress logo
#🤝help
kb and AI task issue
# 🤝help
f

future-airport-33386

01/04/2024, 11:30 PM
Hi everyone. I am trying to incorporate AI task to see if I can improve accuracy on my bots answers. Instead of getting an answer,the code snippet is showing on a emulator and not giving any answer at all. This bot was built for an e commerce with over 100 products. I get very inaccurate answers and can't never get continuity to a conversation.Any suggestions anyone can give me? And why am I seeing a codes snippet on the emulator instead of an answer? I would be VERY greatful to any input.Thanks
b

best-cricket-48770

01/05/2024, 1:48 AM
Hey @future-airport-33386 based on what I see it seems to me that you don't actually want to use an AI task after the raw input step, instead you probably want to use an Execute Code step to set a variable, and that variable can be fed into an AI step. Now since you have the KB enabled on the raw input, I'll assume your KB settings are correct, but if you are still having issues it would be good if you can show the KB settings because that can cause issues as well.
You can also add a text output step after the execute code step for debug purposes to make sure the execute code is behaving as you expect.
f

future-airport-33386

01/05/2024, 8:40 AM
@best-cricket-48770 thank you for your reply.please explain what you mean by kb settings. They are set to manual, is that you are referring to? Also, I have products with similar names and they sometimes are used together or some are a component of another. I can't separate the inquiries into choices. I get a lot mix up as answers and even using event.preview, the bot can not answer price correctly if the question says, how much is "it". Thank you for taking the time to assist me🙏
f

fresh-fireman-491

01/06/2024, 6:45 AM
What is your KB format? Are all of the products set up well in a table or in a document?
f

future-airport-33386

01/07/2024, 12:50 AM
@fresh-fireman-491 they are mostly word docs and PDF. I cleaned up the pds from pictures etc. and created Q&A s for each product. I still haven't put any tables. I tried to import a CSV but got an error.
j

jolly-policeman-82775

01/07/2024, 8:22 AM
could you sahre your bot with us please.
f

fresh-fireman-491

01/07/2024, 8:46 AM
I think that the answers from the KB would be so much better if they were in a table instead.

https://youtu.be/rescPrnpVRc?si=1mB9EHtXxr0B4AIH

f

future-airport-33386

01/08/2024, 10:24 AM
@jolly-policeman-82775 I am redoing my bot. I was using intent to minimize mistakes on my answers but that also didn't work well.I have products with similar names and 3 tier price.I thought about creating separate workflows for each category but these products can be used and purchase together although they belong to different categories.So I am thinking how to restructure the whole bot.
j

jolly-policeman-82775

01/11/2024, 6:20 AM
hey man
can you give me that text
the AI Task Input text
j

jolly-policeman-82775

01/11/2024, 9:43 AM
thx