Repository navigation
Build Knowledge Graph out of initial output file which was created during indexing #2178
Replies: 2 comments
|
If your goal is to reuse the knowledge graph generated during the indexing phase, I would avoid rebuilding it from the raw documents. The indexing output already contains the extracted graph-related artifacts (entities, relationships, communities, etc.). You can use those outputs as the source for loading the graph into a remote graph database. A possible approach would be:
The important part is that simply copying the output files to another location won't make GraphRAG automatically treat that system as a remote knowledge graph—you need an adapter/integration between GraphRAG's retrieval layer and the graph database. If you're considering a specific graph database (Neo4j, Neptune, Cosmos DB, etc.), the integration approach would depend on which one you're using. |
|
Great breakdown by Juyel. To add to that, if you are looking to operationalize this for a remote graph store (like Neo4j or Cosmos DB), writing a lightweight ingestion script over the Parquet/CSV outputs (create_final_entities.parquet and create_final_relationships.parquet) is usually the most efficient path. A quick Python pattern using pandas and neo4j driver looks like this: Python Load GraphRAG indexing outputsentities_df = pd.read_parquet("output/create_final_entities.parquet") Connect to your remote graph databasedriver = GraphDatabase.driver("bolt://your-remote-db:7687", auth=("neo4j", "password")) def load_graph(tx): with driver.session() as session: driver.close() |
Uh oh!
There was an error while loading. Please reload this page.
HI Team,
I'm checking for the proper way of recreating the knowledge graph out of the output files of the "indexing phase"
And I'll be checking the feasibility on using that remote knowledge graph for Graph RAG
Highly appreciate your suggestions on this.
Thank you,
Sachith
All reactions