Skip to main content

GraphQueryEngine

An abstract base class that represents a graph query engine on top of a underlying graph database.
This interface defines the basic methods for graph-based RAG.
Parameters:

Instance Methods

add_records

Add new records to the underlying database and add to the graph if required. Parameters:

init_db

This method initializes graph database with the input documents or records.
Usually, it takes the following steps,
  1. connecting to a graph database.
    2. extract graph nodes, edges based on input data, graph schema and etc.
    3. build indexes etc.
Parameters:

query

This method transform a string format question into database query and return the result. Parameters: