Skip to main content

Neo4jNativeGraphQueryEngine

A graph query engine implemented using the Neo4j GraphRAG SDK.
Provides functionality to initialize a knowledge graph, create a vector index, and query the graph using Neo4j and LLM.
Initialize a Neo4j graph query engine.
Parameters:

Instance Methods

add_records

Add new records to the Neo4j database.
Parameters: Returns:

init_db

Initialize the Neo4j graph database using the provided input doc.
Currently this method only supports single document input (only reads the first doc).
This method supports both text and PDF documents. It performs the following steps:
1. Clears the existing database.
2. Extracts graph nodes and relationships from the input data to build a knowledge graph.
3. Creates a vector index for efficient retrieval.
Parameters:

query

Query the Neo4j database using a natural language question.
Parameters: Returns: