Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Update docs

davidmezzetti9bb4917c0e0e
diff --git a/docs/embeddings/query.md b/docs/embeddings/query.md
index 0ce88025..6b5e2caa 100644
--- a/docs/embeddings/query.md
+++ b/docs/embeddings/query.md
@@ -228,11 +228,20 @@ Additionally, standard embeddings searches can be returned as graphs.
```python
# Find all paths between id: 0 and id: 5 between 1 and 3 hops away
-embeddings.graph.search("""
+embeddings.search("""
MATCH P=({id: 0})-[*1..3]->({id: 5})
RETURN P
""")
+# Find related nodes for query matches
+embeddings.search("""
+ MATCH P=(A)-[]->(B)
+ WHERE SIMILAR(A, "query")
+ RETURN B
+ ORDER BY A.score DESC
+ LIMIT 10
+""")
+
# Standard embeddings search as graph
embeddings.search("query", graph=True)
```