Find answers from the community

Home
Members
alexandrecorlet
a
alexandrecorlet
Offline, last seen 2 months ago
Joined December 5, 2024
[QUESTION]

Hey, guys. Good evening!

So I'm building a GraphRAG pipeline with LlamaIndex and Neo4J. I'm trying to load an existing graph to my index (to avoid rebuilding it, etc.), and it's working. However, I get the following error when I try to do a query:

AttributeError: 'GraphRAGStore' object has no attribute 'entity_info'

Here's my code:

Plain Text
def load_graphrag():
  graphrag_index = PropertyGraphIndex.from_existing(
        property_graph_store=graph_store, 
        embed_kg_nodes=True
    )

    graphrag_query_engine = GraphRAGQueryEngine(
        graph_store=graph_store,
        llm=llm,
        index=graphrag_index,
        similarity_top_k=20,
    )
  return graphrag_query_engine

def main():
    graphrag = load_graphrag()
    response = graphrag.query(query_str)


It only works if I build the communities before with graphrag_index.property_graph.build_communities()

but running this function is very expensive. Does anybody knows how to solve it? Thx!!
2 comments
L
a