diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index c95367e6c..7e7abaf93 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -199,7 +199,7 @@ def query_collection( else: pass - return merge_and_sort_query_results(results, k=k) + return merge_and_sort_query_results(results, k=k, reverse=True) def query_collection_with_hybrid_search(