You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where `<builderParameters>` must have `dimension` and either `driver` or `withBasicAuth` parameters,
57
+
besides other optional ones.
58
+
59
+
Here is the complete builder list:
60
+
61
+
[options="header",cols="m,m,a"]
62
+
|===
63
+
| Key | Default Value | Description
64
+
| driver | <required if withBasicAuth is not set> | the https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/Driver.html[Java Driver instance]
65
+
| withBasicAuth | <required if withBasicAuth is not set> | Creates an instance of Neo4jEmbeddingStore defining a https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/Driver.html[Java Driver instance], starting from `uri`, `user` and `password`
66
+
| dimension | <required> | the vector's dimension
67
+
| config | org.neo4j.driver.SessionConfig.forDatabase(`<databaseName>`) | the https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/SessionConfig.html[SessionConfig instance]
68
+
| label | "Document" | the label name
69
+
| embeddingProperty | "embedding" | the embedding property name
70
+
| idProperty | "id" | the id property name
71
+
| metadataPrefix | "" | the metadata prefix
72
+
| textProperty | "text" | the text property name
73
+
| indexName | "vector" | the vector index name
74
+
| databaseName | "neo4j" | the database name
75
+
| retrievalQuery | "RETURN properties(node) AS metadata, node.`idProperty` AS `idProperty`, node.`textProperty` AS `textProperty`, node.`embeddingProperty` AS `embeddingProperty`, score" | the retrieval query
76
+
|===
77
+
78
+
=== Usage Examples
79
+
80
+
LangChain4j provides the following classes for Neo4j integration:
81
+
- `Neo4jEmbeddingStore`: Implements the EmbeddingStore interface, enabling storing and querying vector embeddings in a Neo4j database.
82
+
- `Neo4jText2CypherRetriever`: Supports retrieving original content associated with stored embeddings.
83
+
84
+
==== Neo4jEmbeddingStore
85
+
86
+
We can define an `Neo4jEmbeddingStore` with the required Java Driver instance and dimension and an optional label name in this way:
0 commit comments