I added a little more: I am using BGE-M3 embedding:
model_kwargs = {"device": "cpu"}
from langchain_community.embeddings import HuggingFaceBgeEmbeddings
bge_m3_embedding = HuggingFaceBgeEmbeddings( model_name="BAAI/bge-m3", encode_kwargs=model_kwargs)
As said, this works if the building of vectorstore and query in the same flow. However, it reports the error if I do querying only:
db = WeaviateVectorStore.from_documents([], embedding_model, client=weaviate_client, index_name='test')
On the other hand, if I use OpenAI ‘text-embedding-ada-002’ embedding, it has no issue in both cases. Does it have something to do with embedding method?
Hope this additional info helps