https://discord.gg/botpress logo
Understand Schemas and Autonomous nodes
# 🤝help
b
Can I use schemas to get my LLM(autonomous node) to fill out a schemas and when ready, have a code block that runs it through a database? My obejctive is to create a chatbot that can accurately help the user find the exact product, based on filtering an excel. The issue is I can not reliably to this with prompting alone. I've come really far with Gemini 2.5 and good prompts, but long conversations and odd scenarios end up with too large context window and we loose precision. I want instead to use the Autonomous / Chat to only understand intent. Like recognizing the users request as a certain feature (from my schema). Example, the user says "My budget is around 400 and I don't like X brand". The output from the LLM/autonomous node must be to recognize the wording and use in the filter (USD; 400 +/- 10% for example) and (Brand: Not equal to X) when running a filter of the products. If there are more than 5 options returned, it will have to ask more questions to narrow it down for example... So my question really is, is this what Schemas can be used for? or how would you set this up as a flow? The important requirment is to still allow the chatbot some flexibility and help the user maybe understand what some of the features mean on the product etc. So not a strict "web-app" that filters, but to have some context on what features are required for other features to make sense. Let's say; For you to be able to spray water far, you must also have high pressure. (is this vector-data?) Tips and help most welcome!
p
You can create a schema and instruct your An to collect the information in order to be able to call an action you've created. That action would need to have the schema as its input. Alternatively, you can create a workflow, define a bunch of variables, use an execute code card to query based on the parameters that were set and add the wrkflow card to your AN. If you've added the defined variables to your entry node in the sub-workflow, the Autonomous node will have to pass them as input. Hope this helps!