The community member is asking why the response from using VectorStoreIndex.from_documents(documents, service_context=service_context).as_query_engine is more different from using RetrieverQueryEngine(retriever=vector_retriever, response_synthesizer=response_synthesizer). They find that when using RetrieverQueryEngine with get_response_synthesizer, the response is more accurate and compact, even when running it multiple times.
Another community member responds that the two approaches are not directly comparable. They suggest the community member meant to compare as_query_engine() and RetrieverQueryEngine.from_args(). They explain that the two will be the same when using default settings, but if modifying things like the response mode, response synthesizer, or top k, they will be different.
Hi everyone, why is the response of using VectorStoreIndex.from_documents(documents, service_context=service_context).as_query_engine much more different from RetrieverQueryEngine( retriever=vector_retriever, response_synthesizer=response_synthesizer)? I mean when i use RetrieverQueryEngine with get_response_synthesizer, the information in the response is more accurate and compact, even when I tried to run it 3 times to see if the response between two ways could be the same
Those two things aren't comparable? I think you meant to compare as_query_engine() and RetrieverQueryEngine.from_args() ?
The two will be the same when you use default settings. But if you modify things like the response mode or response synthesizer, the top k, etc, they will be different