when making calls to openai api, my last question was, how does it use the index to help with results or tuning, I'm trying to understand if sensitive data is stored in the index, is that references by the api
Right so, when you put files into an index (lets say you are using a vector index), they are broken into chunks and sent to openAI to generate embeddings.
Then at query time, the query text is sent to openAI and embedded, and the top_k chunks in the index are chosen using cosine similarity.
Then, the answer is refined across all top_k chunks by sending the text, along with the query, to openai
So largely, you are at the whim of openais security policies.
If you have the ability to run LLMs and embeddings locally, llama index also provides support for this