How to answer according to user attachment question and look vector db?

Hello, I want to build a bot with GPT, but I ran into some issues. What I want is: when a user asks a question, the bot should search in the vector database and answer based on that. I’ve already implemented this part.

However, when the user uploads a document and asks a question, I also want the bot to check my vector database (where my sources are stored) and analyze the uploaded document in that context. How can I achieve this?

I am using assistants, how should i use prompt and assistants