Skip to content

Commit c00e805

Browse files
committed
removed sorting merged list
Signed-off-by: Anxhela Coba <acoba@redhat.com>
1 parent 62251cf commit c00e805

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/utils/vector_search.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,11 +667,8 @@ async def build_rag_context( # pylint: disable=too-many-locals,too-many-branche
667667
byok_chunks_task, solr_chunks_task
668668
)
669669

670-
# Merge: combine and sort by score
670+
# Merge chunks
671671
merged = byok_chunks + solr_chunks
672-
merged.sort(
673-
key=lambda c: c.score if c.score is not None else float("-inf"), reverse=True
674-
)
675672

676673
# Rerank full pool with cross-encoder if enabled; then take top_k
677674
if configuration.reranker.enabled:

0 commit comments

Comments
 (0)