https://discord.gg/botpress logo
How to make Botpress AI to briefly describe a docu...
# 🤝help
f
I'm really new with Botpress so is that really possible? I had a document about a Prenatal Mental Health attached to my Knowledge Base and I want The AI to describe it briefly in Bahasa Indonesia. I've been trying using AI Task card for this but it never work as I wish. I've attached 2 screenshots to make it more clear... https://cdn.discordapp.com/attachments/1263063606547976242/1263063606874865685/image.png?ex=6698df26&is=66978da6&hm=46a70a4adc9561a1f11e81191b1636e5ef057c9c8679b6ea3db6711867c9cb93& https://cdn.discordapp.com/attachments/1263063606547976242/1263063607336501298/image.png?ex=6698df26&is=66978da6&hm=19b87a2ef84621d030ba05d6b0f8e89fdabf6ec7e5ca95996422bd37d6300117&
w
Hi ! The AI tasks (AI text gen or AI task) don't have direct access to KB
So you could use a Query KB card, and use the result in an AI task for example ( to reformulate ?)
f
It worked! Thank you. 😊 But I'm not sure if I did it correctly. So all I did was adding 2 variables for results for both query and AI task card. Is that correct or I only need one in AI Task card? https://cdn.discordapp.com/attachments/1263063606547976242/1263073397685096448/image.png?ex=6698e844&is=669796c4&hm=755fbc45de1bb398de87a9cb4b4ed3ba24994a338456220523d6d3485468a6c6&
w
nice!
you need to store the result of the KB query in a variable (or use {{turn.KnowledgeAgent.answer}}) and one for the result of your AI task if you want the KB answer to be reformulated
w
nope
turn.KnowledgeAgent.answer gives the answer generated by the KB search, so you cannot pass this in the search query
(in theroy yes but it's weird)
so for example if you want your KB query to answer the user question, you will have to put either {{event.preview}} or the name of your variable in the query field
then the only goal of the AI task here is to reformulate the KB answer, so you can give it the KB answer and ask to rewrite, or summarize, or anything you want
b
Hi @future-scientist-99784 see if this video can help you.

https://www.youtube.com/watch?v=lWihOWJRMaM▾

Have a great day!