Implemented 1 - cosine distance to convert distance metric into similarity.
Higher similarity scores now allow for descending order sorting of results.
The above approach was chosen based on the https://github.com/pgvector/pgvector readme.md file
ex: SELECT 1 - (embedding <=> '[3,1,2]') AS cosine_similarity FROM items;
The above approach was chosen based on the https://github.com/pgvector/pgvector readme.md file ex: SELECT 1 - (embedding <=> '[3,1,2]') AS cosine_similarity FROM items;