Skip to content

Commit

Permalink
fix: PGVector similarity score (#817)
Browse files Browse the repository at this point in the history
  • Loading branch information
JT-Dev-215 authored May 7, 2024
1 parent ce94780 commit 804c575
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/storage/vectorStore/PGVectorStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export class PGVectorStore implements VectorStore {

const ret = {
nodes: nodes,
similarities: results.rows.map((row) => row.s),
similarities: results.rows.map((row) => 1 - row.s),
ids: results.rows.map((row) => row.id),
};

Expand Down

0 comments on commit 804c575

Please sign in to comment.