How to make an agent bot that identifies the right sub-agent bot

I’ve hundreds of chatbots catering to different service lines. Users can directly converse with these chatbots and get the required info. Now I want to have a main agent chatbot that can invoke the appropriate chatbot based on what the user is asking.

For this main agent, initially we tried with semantic search on the descriptions of chatbots and then using LLM to identify the chatbot. However, this had huge limitations in terms of covering all the aspects of each chatbots. Then we used another approach wherein we generated large number of possible questions pertaining to each chatbot. When user asks a question, it’s searched against this vector database for semantic similarity. The topmost match was identified as the relevant chatbot. Later we considered majority of top 5 search results.

What could be improved? Are there any better approaches? Current approach feels very crude and not “intelligent”. The main agent should plan a course of action, if required. It could potentially invoke multiple chatbots sequentially or in-parallel. Looking forward to your thoughts.

1 Like

Here’s the thought process:

Let’s assume that you have 20 service lines with approx 15 chatbots per service line (~300 chat bots in total).

So you want to first identify the sevice line. Then identify that chatbot within the service line.

As your users begin to interact with the chatbots, the chatbots will have multiple threads associated with each of the users. The feedback from the user about their interaction can be stored in the message that they read. Periodically you can update that chatbots instructions and then the service line; so that both the service line and chatbots improve overtime.

All of this is completely doable within the current framework of AssistantApi.