Is there a benefit to using either of these
response
variables?
response = engine.query(query)
response = engine.query(QueryBundle(query_str=query, embedding=embedded_query))
def query_index(self, query_engines: List[BaseQueryEngine], queries: List[str]):
for query in queries:
embedded_query = Settings.embed_model.get_text_embedding(query)
for engine in query_engines:
response = engine.query(query)
<...or...>
response = engine.query(QueryBundle(query_str=query,
embedding=embedded_query))
vector_index = VectorStoreIndex.from_vector_store(vector_store=rag.vector_store,
embed_model=Settings.embed_model)
query_engine0 = vector_index.as_query_engine(llm=Settings.llm,
similarity_top_k=15,
node_postprocessors=[
SimilarityPostprocessor(similarity_cutoff=0.60),
cohere_rerank
]
)