Browse Source

Return the top k results with the highest similarity.

zhiguo.qiao 4 months ago
parent
commit
91f22a8a8d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      backend/open_webui/retrieval/utils.py

+ 1 - 1
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(