KB check option
# 🤝help
b
Sorry kinda new to using botpress so apologies if I don't make any sense 😦 Hello, was wondering if anyone knows how to ask if information is available/ not available on the knowledge base? I know I can ask to see if an answer is available (turn.KnowledgeAgent?.answer?.length) but it seems to only work if I tell it to answer from the KB (ie it will add some information from the KB and I actually want to control the answer). I'm trying to set a condition that if the information is not available on the KB (like a product name) I can continue with an order and if not say I don't have that product her are some I do have.
a
Hey @breezy-memory-48490 welcome to Botpress 🙌 The best way to tell if something is in the knowledge base or not is to query the KB and check the answer like you mentioned.
I've seen bots that use an AI task to categorize the user's message and use the KB sources as categories, but this is a bit slower and more work because if the message fits a category, you still have to search the KB anyways