Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Has FalkorDB created an index for the embedding attribute on all nodes? #823

Open
qiankunli opened this issue Nov 7, 2024 · 1 comment
Assignees

Comments

@qiankunli
Copy link

The Cypher query implemented in llamaindex FalkorDBPropertyGraphStore.vector_query seems to calculate the similarity directly against all nodes, which, if there are many nodes, may have poor performance.

MATCH (e:`__Entity__`)
WHERE e.embedding IS NOT NULL AND ({filters})
WITH e, vec.euclideanDistance(e.embedding, vecf32($embedding)) AS score
ORDER BY score LIMIT $limit
RETURN e.id AS name,
   [l in labels(e) WHERE l <> '__Entity__' | l][0] AS type,
   e{{.* , embedding: Null, name: Null, id: Null}} AS properties,
   score
@gkorland
Copy link
Contributor

gkorland commented Nov 7, 2024

@qiankunli we have a pending PR to Llamaindex to use vector indexing
run-llama/llama_index#16047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants