That's a great question. The LLM does not interact with the vector database. The query is more contextualize before going to the LLM.
The original query gets augmented/changed but appending the additional context BEFORE it gets to the LLM.
Here's a quick example:
Original query:
"what is my sick leave policy?"
RAG query:
"using the provided context, answer the question.
Question: what is my sick leave policy?
Context: <TEXT RETRIEVED FROM DOCUMENTS IN RAG>"
Then this RAG query is sent to the LLM.
Hope that helps! Let me know if you have any other questions.