Package com.tnsai.intelligence.rag.graph
Class Neo4jGraphStore
java.lang.Object
com.tnsai.intelligence.rag.graph.Neo4jGraphStore
- All Implemented Interfaces:
GraphStore
GraphStore over a Neo4j property graph.
The driver is never imported here: Neo4jGraphStore.CypherSession is the only
I/O seam so tnsai-intelligence can compile and run without Neo4j
on the classpath. Production code uses the reflective session in
Neo4jGraphStoreProvider.
- Since:
- 0.14.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceMinimal Cypher execution seam.Nested classes/interfaces inherited from interface com.tnsai.intelligence.rag.graph.GraphStore
GraphStore.Edge, GraphStore.Neighbor, GraphStore.Node, GraphStore.Seed -
Constructor Summary
ConstructorsConstructorDescriptionNeo4jGraphStore(Neo4jGraphStore.CypherSession session, String defaultSource) -
Method Summary
Modifier and TypeMethodDescriptionFinds graph nodes that can seed traversal for a query.voidingest(List<FileGraphCorpus.Document> documents) Writes FILE-extracted entities and relations through the Cypher seam.Returns the outgoing edges and destination nodes for a node.
-
Constructor Details
-
Neo4jGraphStore
- Parameters:
session- Cypher execution seamdefaultSource- source stamp when a node omitssource
-
-
Method Details
-
findSeeds
Description copied from interface:GraphStoreFinds graph nodes that can seed traversal for a query.- Specified by:
findSeedsin interfaceGraphStore- Parameters:
query- query text, nevernulllimit- maximum number of seeds requested- Returns:
- seeds, never
null
-
neighbors
Description copied from interface:GraphStoreReturns the outgoing edges and destination nodes for a node.- Specified by:
neighborsin interfaceGraphStore- Parameters:
nodeId- expanded node identifier- Returns:
- neighbors, never
null
-
ingest
Writes FILE-extracted entities and relations through the Cypher seam.- Parameters:
documents- ingested FILE chunks
-