diff --git a/packages/core/src/storage/vectorStore/PGVectorStore.ts b/packages/core/src/storage/vectorStore/PGVectorStore.ts index b48848577c..3109d9d37c 100644 --- a/packages/core/src/storage/vectorStore/PGVectorStore.ts +++ b/packages/core/src/storage/vectorStore/PGVectorStore.ts @@ -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), };