diff --git a/scripts/custom_retriever.py b/scripts/custom_retriever.py index fce0a99..31e425e 100644 --- a/scripts/custom_retriever.py +++ b/scripts/custom_retriever.py @@ -72,7 +72,7 @@ def filter_nodes_by_unique_doc_id(nodes): else: nodes_context.append(node) - reranker = CohereRerank(top_n=5, model="rerank-english-v3.0") + reranker = CohereRerank(top_n=8, model="rerank-english-v3.0") nodes_context = reranker.postprocess_nodes(nodes_context, query_bundle) logfire.info(f"Cohere raranking to {len(nodes_context)} nodes")