Find answers from the community

Updated last year

Hi, happy Black Friday! Quick question

Hi, happy Black Friday! Quick question about using SupabaseVectorStore for indexing: I've noticed that when I retrieve nodes, the node that appears to be the most relevant consistently has the lowest score. Does this mean that in SupabaseVectorStore, lower scores indicate higher relevance? Just trying to understand the scoring system better. Thanks!
L
M
4 comments
ah yea, It's probably scored by distance (i.e. lower the better)
(only a guess though, without looking at supabase docs)
Ah, I see. So, it depends on them, not llamaindex. Will check supabase doc and update it here! Thanks!
Plain Text
language sql stable
as $$
  select
    documents.id,
    documents.content,
    1 - (documents.embedding <=> query_embedding) as similarity
  from documents
  where documents.embedding <=> query_embedding < 1 - match_threshold
  order by documents.embedding <=> query_embedding
  limit match_count;
$$;

https://supabase.com/blog/openai-embeddings-postgres-vector
Yep, they use 'lower the better.' Thanks
Add a reply
Sign up and join the conversation on Discord