Hello. I am trying to use
PropertyGraphIndex
with
SimplePropertyGraphStore
to store data from netwokx graph. The nodes and edges from the
networkx
graph are upserted into the graph store as
EntityNode
and
Relation
instances. I can get data from the store using methods like
graph_store.get
using
properties
or
ids
. But I don't understand how to query the index. The index is created using
index = PropertyGraphIndex.from_existing(property_graph_store=graph_store)
.
Then, the query engine is created as
llm_synonym_retriever = LLMSynonymRetriever(
index.property_graph_store,
llm=llm,
include_text=False,
)
vector_context_retriever = VectorContextRetriever(
index.property_graph_store,
embed_model=HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5"),
include_text=False,
)
query_engine = index.as_query_engine(
sub_retrievers=[
vector_context_retriever,
llm_synonym_retriever,
],
llm=llm,
)
# llm is Ollama(model="llama3")
The problem is that
query_engine.query()
always returns empty response.
response = query_engine.query("What is the email address of user Fname Lname?")