Ingesting JSON Data into into Neo4j and vector indexing

Hello All,
I am new to Neo4J.
I have a json containing Source, Target and Relations. There are many metadata properties for nodes and relations. Sample of JSON object below.
{
"sourcenode": {
"name": "Loan for business purpose",
"type": "Transaction"
},
"relation": {
"name": "does not amount to",
"type": "Tax Classification",
"details": {
"sourceid": "17277",
"relationtext"" "..."
"fullcontentchunk": " ... ",
"extracted_from": "ABC.pdf"
}
},
"targetnode": {
"name": "Deemed dividend",
"type": "Tax Category"
}
}
I want to create a graph in Neo4j to represent this JSON such that I want to have vectors for nodes, relations and for metadata like "relationtext" and "fullcontenttext".

I want to run Hybrid search with Cypher query and vector retrieval from the Graph.

How can I create the Graph, ingest and retrieve? Using Langchain and python the achieve this.
Please guide and help.

1 Like

If you want to use python, you can read and parse the file in python and use the driver to create the nodes and relationships.

If you want to create the graph entirely in cypher, you can use apoc.load.json procedure to load and parse the json and then create the nodes and relationships.

Would you like some help with the cypher?

1 Like