Clustering for RAG QnA ChatBot

I am doing embeding search with my embeding data , and return most similar content with the user query , I have a data for 9 different banks.

Right now , what happening is , when user query with my chatbot , similarity search is happening with all the data , so what i am thinking is to cluster my data “Bank” wise , so when user ask about “X” bank , this query should do the vector search with only “X” bank cluster

Will this approach speed-up my searching process or not

One possible way worth of trying is to define two parameters for the API call. One is for the question itself, another one is for which bank. You need provide a very clear bank name list and if the user does not provide the bank name, you need let GPT to clarify and then continue the call after getting the right bank name. Hope this may be helpful.

1 Like