Chatbot AI - table database retool interaction

I would like to build a chat-based app that offers questions and answers contained in a table in the database retool that I called "questions". The table has the following fields: ID,QUESTION,ANSWER,CATEGORY,TRUEFALSE. I would like the user to be able to specify the category via chat text input so as to receive the questions and answers of that category randomly from the assistant. The user will then answer with true or false and the assistant will have to check in the table whether the answer to the question is true or false. If it is true, proceed with the next question. If it is false, you will access a PDF document contained in the retool vectors database to provide explanations on the question. Could I have a step by step explanation on how to proceed?