Skip to content

Commit ad13b01

Browse files
authored
Merge pull request #1999 from Anxhela21/anx/remove-sort
LCORE-2418: Removing sort for merged RAG chunk list
2 parents 62251cf + c00e805 commit ad13b01

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)