https://discord.gg/botpress logo
#🌎general
Title
# 🌎general
g

glamorous-eye-55031

07/01/2023, 4:24 PM
Hi all, was just playing around with botpress and wanted to make an ai bot that would construct a fitness meal plan for the user based on their fitness goal (e.g. losing weight). The problem is that to search the knowledge base for meals the prompt would almost always be too long for the ai to comprehend, since there are too many things to search for at once. I cannot do multiple searches through KB, since it can only be called when the user is on a listening card, so it would have to be a one prompt request.. Maybe my problem is a bit more complex than what I typed, so if anyone would be willing to hop on a call for a minute and chat it'd be awesome! Thanks
e

early-train-33247

07/02/2023, 12:49 AM
Hey @glamorous-eye-55031, what do you mean by " the prompt would almost always be too long for the ai to comprehend"?
Whatever you ask, the bot will try to answer from the knowledge base. You just have to use well defined questions and answers in the Plain Text source
g

glamorous-eye-55031

07/02/2023, 9:51 AM
Thanks for the response! To further explain, the knowledge base is, in this case, some websites containing fitness meal recipes, and i want to make a meal plan for a week. Meaning I need 21 meal recipes, including the ingredients, and for each day breakfast, lunch and dinner. It also needs to avoid recipes containing allergens that the user inputs and are saved in a variable. I tried simplyfing the prompt, but when there is more than one recipe returning, it does not return it in full (doesn’t return the ingredients) and when it is prompted to return only one, it returns with ingredients. I could solve this if I had the ability to call the knowledge base from some code, since i know javascript well, but have not thought of a different workaround. Maybe i am looking at this wrong.
I’ll keep trying, though. From my experience, everything that revolves around coding always has a solution 😀
e

early-train-33247

07/05/2023, 12:31 AM
Hey @glamorous-eye-55031, sorry for the late reply
I think a better way to achieve what you want would be to use the websites APIs if they have any. Or use some web scrapping service to get the data from the websites in a structured manner. Then you would be able to query that data at any moment. Some people are also using Stack AI a lot for knowledge base management, maybe it can help you!
Let me know if that helps