blogs icon indicating copy to clipboard operation
blogs copied to clipboard

Issue with ms_graphrag_retriever.ipynb - local search

Open khang-nguyen2907 opened this issue 1 year ago • 4 comments

Hi, thank you for your amazing implementation. While running the notebook, I get into a trouble that after I run the cell:

docs = lc_vector.similarity_search(
    "What do you know about Cratchitt family?",
    k=topEntities,
    params={
        "topChunks": topChunks,
        "topCommunities": topCommunities,
        "topOutsideRels": topOutsideRels,
        "topInsideRels": topInsideRels,
    },
)
print(docs)

It results in

[Document(page_content='Entities:\nReports:\nChunks:\nRelationships:\n')]

I did not change anything in the notebook, the previous codes are fine but I do not know what happen to the query. I am new to Cypher and Neo4j. Could anyone help me to solve it? Thank you in advanced

khang-nguyen2907 avatar Sep 05 '24 08:09 khang-nguyen2907

Did you import the data?

tomasonjo avatar Sep 12 '24 13:09 tomasonjo

I encountered the same issue. I suggest you to debug the execution in the Neo4j console, by executing those two commands.

The first is done by adding the following cypher instruction at the beginning of the lc_retrieval_query string.

MATCH (node)
WITH collect(node) as nodes
// the rest is the same

The second is by querying the index in this way.

CALL db.index.vector.queryNodes($index, $k, $embedding)
YIELD node, score
WITH collect(node) as nodes
// the rest is the same

magni5 avatar Oct 11 '24 22:10 magni5

@khang-nguyen2907 Did you solve this problem?

SpikeYangRc avatar Oct 15 '24 07:10 SpikeYangRc

lets fix it?

Sandy4321 avatar Jan 03 '25 18:01 Sandy4321