Skip to content

Commit

Permalink
Change Elasticsearch to dot_product similarity
Browse files Browse the repository at this point in the history
With our normalized vectors, the score should be exactly the same as "cosine", but we don't force Elasticsearch to normalize vectors at query time. Which is similar to what our prenormalized-angular does: effectively orders by cosine similarity, assuming vectors are normalized.
  • Loading branch information
radu-gheorghe authored Sep 3, 2024
1 parent b9e6787 commit 1054bec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "dense_vector",
"dims": 384,
"index": true,
"similarity": "cosine",
"similarity": "dot_product",
"index_options": {"type": "hnsw", "ef_construction": 200, "m": 16}
}
}
Expand Down

0 comments on commit 1054bec

Please sign in to comment.