I'm building a chatbot for my educational institution as an assistant for a intern process. I'm attempting to return a list of projects based on the career the user is currently majoring in. The projects are stored in knowledge bases depending on its category. Each project is uploaded as a PDF with a technical form format. They specify, the project name, code, objectives, required majors, etc.
I built a workflow were the user is able to select if they want a list of the available projects, that takes them to a node with a raw input that will wait for the user to type something by throwing the next question: "What's your major" and I save that in a variable.
Then I prompted an AI task specifying to generate a list with the projects found that match with the introduced major. If nothing is found then tell the user there is no information matching the result. I'm constantly getting back a 400 error or a nothing found response even if I do type in an existing major with a bunch of available projects.
I also prompted to "Generate a response to the following question: What are the available projects that require the major introduced by the user?, if nothing is found tell the user you couldn't find a matching response." (That's the prompt in the picture added)
But, if I specifically type in the question in the flow saying "What are the available projects for X major?" it will answer correctly (sometimes). I'm trying to make it a separated node to ensure the answer since I'm not certain of how the users will make this specific question.
Any advice? (I'll add pictures, but the flow is in spanish)
Thank you in advance!