Find answers from the community

Updated 3 months ago

is there distances_from_embeddings

is there distances_from_embeddings calculator in llamaindex like openai. the openai one is removed.
a
k
7 comments
are you trying to get cosine similarity of 2 embeddings?
So, if you're using a query_engine, the source nodes that come back in the response have a field called score that is the cosine similarity (Default setting) of your query embedding and the node's doc embedding.
Not sure if that fits your use case. Can you elaborate perhaps on what you'd like to do with the such scores?
use if rag fails to get an answer. use a distance approach
Oh maybe I am misunderstanding. Can you kindly elaborate on what you mean by "if rag fails". The RAG system uses cosine similarity by default to find the most relevant documents to the query.
In other words, it uses a distance approach already.
Add a reply
Sign up and join the conversation on Discord