Created
February 17, 2025 20:53
-
-
Save davidmezzetti/108204a682a19a817af877ed972f1e0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from txtai import Embeddings | |
embeddings = Embeddings(content=True, graph=True) | |
embeddings.index(...) | |
# Standard Vector Search | |
embeddings.search("vector search query") | |
# Vector SQL query | |
embeddings.search(""" | |
SELECT id, text, score FROM txtai | |
WHERE similar('vector search query') | |
""") | |
# Vector openCypher query | |
embeddings.search(""" | |
MATCH P=(A)-[]->(B) | |
WHERE SIMILAR(A, "vector search query") | |
RETURN P | |
""", graph=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment