Thanks @Logan M
I am experimenting vector store recent days, I'm not sure what I'm doing is correct, would you kindly help me take a look what I am doing is correct or not?
I'm using
QDrant
as vector store, this is what I am currently doing
1) Load in documents, and build index. This step will also save index to
QDrant
documents = SimpleDirectoryReader('data').load_data()
index = GPTQdrantIndex.from_documents(documents, collection_name=collection_name, client=client)
2) Query the documents I saved to
QDrant
earlier, to prevent creating index again
reader = QdrantReader(host="host", https=True, api_key="key")
documents = reader.load_data(collection_name=collection_name, query_vector=vector)
index = GPTQdrantIndex.from_documents(documents, collection_name=collection_name, client=client)
response = index.query("What did the author do growing up?")
Where
query_vector
is the query's embedding, what I do is transform my query to embedding using OpenAI's
embedding
API
Then build the
GPTQdrantIndex
from the documents I just loaded, then perform
index.query()
to get results.
Question:
1) The query string of
index.query()
method, should be as same as the
query_vector
when calling
load_data
method, is this correct?
2) Am I doing the whole process in the correct way?
Thank you so much for taking time to answer my question!