From d2f3e0165a579b9ffa8b37012675f69270e5a1ab Mon Sep 17 00:00:00 2001 From: Weves Date: Mon, 30 Oct 2023 16:04:58 -0700 Subject: [PATCH] Adjust num to retrieve --- .../document_index/vespa/app_config/schemas/danswer_chunk.sd | 2 +- backend/danswer/document_index/vespa/index.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/danswer/document_index/vespa/app_config/schemas/danswer_chunk.sd b/backend/danswer/document_index/vespa/app_config/schemas/danswer_chunk.sd index 76986a33e..49cf938f6 100644 --- a/backend/danswer/document_index/vespa/app_config/schemas/danswer_chunk.sd +++ b/backend/danswer/document_index/vespa/app_config/schemas/danswer_chunk.sd @@ -151,7 +151,7 @@ schema danswer_chunk { global-phase { expression: (normalize_linear(closeness(field, embeddings)) + normalize_linear(bm25(content))) / 2 * document_boost * recency_bias - rerank-count: 1000 + rerank-count: 250 } # Cannot pass normalize_linear features in match-features diff --git a/backend/danswer/document_index/vespa/index.py b/backend/danswer/document_index/vespa/index.py index 1c36d6436..ac1c655ea 100644 --- a/backend/danswer/document_index/vespa/index.py +++ b/backend/danswer/document_index/vespa/index.py @@ -674,7 +674,7 @@ class VespaIndex(DocumentIndex): decay_multiplier = FAVOR_RECENT_DECAY_MULTIPLIER if favor_recent else 1 vespa_where_clauses = _build_vespa_filters(filters) # Needs to be at least as much as the value set in Vespa schema config - target_hits = max(10 * num_to_retrieve, 1000) + target_hits = max(10 * num_to_retrieve, 250) yql = ( VespaIndex.yql_base + vespa_where_clauses