In the automerging notebook of the RAG short course, when constructing the automerging engine I noticed that the base automerging_retirever
was passed to the RetrieverQueryEngine.from_args
function. First, I ran the cell as is and noted the results. Then I changed it to pass the retriever
to the RetrieverQueryEngine.from_args
function and ran the cell again. The results were identical. So I started wondering whether there was any difference between the two or are the two the same and the only thing to be had with using the retriever
was the versbose
logging.
Code snippet to support my comment:
automerging_retriever = automerging_index.as_retriever(
similarity_top_k=12
)
retriever = AutoMergingRetriever(
automerging_retriever,
automerging_index.storage_context,
verbose=True
)
rerank = SentenceTransformerRerank(top_n=6, model=“BAAI/bge-reranker-base”)
auto_merging_engine = RetrieverQueryEngine.from_args(
automerging_retriever, node_postprocessors=[rerank]
)