A computer-implemented method dynamically routes and processes user queries in a bot-builder
system. The method involves receiving a user query and routing the user query to a Personal Info Retrieval Module, a
Document Retrieval Module, and a Tool Manager. The Personal Info Retrieval Module retrieves and updates personal information in real time through API calls. The
Document Retrieval Module and Tool Manager retrieve document and tool embeddings from corresponding vector stores. An AI model processes the user query to generate query embeddings, performing similarity searches against the document and tool embeddings. The retrieved information is combined with the user query and chat history to form a comprehensive input, which the AI model processes to determine an appropriate response. The response is generated using existing knowledge or by invoking an external tool. The
system includes real-time updates, leveraging historical interaction records and external services and integration of external tools.