diff options
author | Anthony Wang | 2024-07-27 16:46:43 +0000 |
---|---|---|
committer | Anthony Wang | 2024-07-27 16:46:43 +0000 |
commit | cd89259c8db0bf233c50f8807ae27455cb9af856 (patch) | |
tree | 05dddd62dc8b081431622d57b5568c4c8be04c25 | |
parent | cd5f01368954d1e1295f9b4f477d9d586e6903b0 (diff) |
Use cosine similarity instead of l2
-rw-r--r-- | server.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -23,7 +23,7 @@ cur.execute( "CREATE TABLE IF NOT EXISTS idx (id INTEGER PRIMARY KEY, parent INTEGER, time INTEGER, path TEXT)" ) cur.execute( - "CREATE VIRTUAL TABLE IF NOT EXISTS emb USING vec0(id INTEGER PRIMARY KEY, embedding float[1024])" + "CREATE VIRTUAL TABLE IF NOT EXISTS emb USING vec0(id INTEGER PRIMARY KEY, embedding float[1024] distance_metric=cosine)" ) con.commit() |