query_str="", custom_embedding_strs=[ "whatever" ]
in the QueryBundle
that is passed to a VectorIndexRetriever.retrieve
result in 0 nodes being found but giving query_str=""
a value suddenly result in nodes found? Based on the docs, I thought that query_str
isn't used for embedding-based queries?retrieve(QueryBundle("query_str", custom_embedding_strs=["whatever"]))
will use the custom strs for embeddingsretrieve(QueryBundle("query_str"))
will use the query_str for embeddingsretrieve(QueryBundle("query_str", custom_embedding_strs=[]))
will actually cause issues I thinkquery_str
param is required (if you omit it, it gets mad about trying to split None
) but if I want to use custom_embedding_strs
I was just setting query_str=""
. In the past, I've seen that work, but now I'm noticing it makes a difference which is confusing me.service_context = make_service_context(embedding_model=OpenAIEmbeddingModelType.DAVINCI, embedding_mode=OpenAIEmbeddingMode.TEXT_SEARCH_MODE) vector_store = WeaviateVectorStore(weaviate_client=self.weaviate_client, index_name=index_name) index = VectorStoreIndex.from_vector_store(vector_store, service_context=service_context) retriever = VectorIndexRetriever( index=index, similarity_top_k=2, vector_store_query_mode='hybrid' ) found_nodes = retriever.retrieve(QueryBundle(query_str= "", custom_embedding_strs=[ query ])) print(found_nodes)
hybrid
search... I think I'm just unfamiliar with how it works. Does hybrid mean it uses both the query str and the embedding strs?