retriever = VectorIndexRetriever( index=index, similarity_top_k=10, response_mode="tree_summarize" ) retriever_results = retriever.retrieve( CRITERION_PERIOD_OF_PERFORMANCE_LLM_RETRIEVE_PROMPT ) response_synthesizer = get_response_synthesizer( structured_answer_filtering=True ) response_synthesizer_results = response_synthesizer.synthesize( CRITERION_PERIOD_OF_PERFORMANCE_LLM_QUESTION, retriever_results )
pip install llama-index-postprocessor-colbert-rerank
from llama_index.postprocessor.colbert_rerank import ColbertRerank reranker = ColbertRerank(top_n=2) ... retriever_results = reranker.postprocess_nodes(retriever_results) ...