Question Validation
Question
It's not entirely clear to me if a RetrieverQueryEngine() supports batch queries. I'm not using an LLM and just want to retrieve semantically similar results.
My query engine for my chromdb index is defined as follows:
index = VectorStoreIndex.from_vector_store(vector_store=vector_store,storage_context=storage_context, service_context=service_context,)
retriever = VectorIndexRetriever( index=index, similarity_top_k=cfg.semantic_search.query.similarity_top_k, vector_store_query_mode="text_search", )
response_synthesizer = get_response_synthesizer( response_mode="no_text", service_context=service_context )
rerank = SentenceTransformerRerank( model=cfg.semantic_search.query.rerank.cross_encoder.model_name, top_n=cfg.semantic_search.query.rerank.cross_encoder.top_n, )
query_engine = RetrieverQueryEngine( retriever=retriever, response_synthesizer=response_synthesizer, node_postprocessors=[DummyNodePostprocessor(), rerank], )
My hope was that I could pass a list of query strings as follows:
results_q = query_engine.query(queries)
OR
results_r = query_engine.retriev(queries)
Do async methods apply at all?
Question Validation
Question
It's not entirely clear to me if a RetrieverQueryEngine() supports batch queries. I'm not using an LLM and just want to retrieve semantically similar results.
My query engine for my chromdb index is defined as follows:
index = VectorStoreIndex.from_vector_store(vector_store=vector_store,storage_context=storage_context, service_context=service_context,)retriever = VectorIndexRetriever( index=index, similarity_top_k=cfg.semantic_search.query.similarity_top_k, vector_store_query_mode="text_search", )response_synthesizer = get_response_synthesizer( response_mode="no_text", service_context=service_context )rerank = SentenceTransformerRerank( model=cfg.semantic_search.query.rerank.cross_encoder.model_name, top_n=cfg.semantic_search.query.rerank.cross_encoder.top_n, )query_engine = RetrieverQueryEngine( retriever=retriever, response_synthesizer=response_synthesizer, node_postprocessors=[DummyNodePostprocessor(), rerank], )My hope was that I could pass a list of query strings as follows:
results_q = query_engine.query(queries)OR
results_r = query_engine.retriev(queries)Do async methods apply at all?