We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ed2f82 commit 267aa44Copy full SHA for 267aa44
1 file changed
context_chat_backend/vectordb/pgvector.py
@@ -560,6 +560,7 @@ def _similarity_search(
560
self.client.CollectionStore,
561
self.client.EmbeddingStore.collection_id == self.client.CollectionStore.uuid,
562
)
563
+ .order_by(sa.asc('distance'))
564
.limit(k) # Get up to k results from the batch
565
566
0 commit comments