这里由于我们在创建AutoMergingRetriever时设置了verbose=True因此检索器在检索相关文档时会显示检索过程的中间结果,从这些中间结果中我们看到其中有一个父节点中的3个叶子节点被检索到了,因为一个父节点包含最多4个叶子节点(由文档层次结构确定),那么如果父节点中有3个叶子节点被检索到,那么该父节点将会作为context被返...
base_retriever = automerging_index.as_retriever(similarity_top_k=similarity_top_k) retriever = AutoMergingRetriever( base_retriever, automerging_index.storage_context, verbose=True ) rerank = SentenceTransformerRerank( top_n=rerank_top_n, model="BAAI/bge-reranker-base" ) auto_merging_engine ...
The retriever uses FAISS to find the most relevant documents for a query, and the generator then utilises the contextual information from these documents to generate a sentiment-annotated response. To control the relevance and specificity of generated responses, we set the LLMs’ decoding parameters...