neo4j / neo4j-graphrag-python

Neo4j GraphRAG for Python
https://neo4j.com/docs/neo4j-graphrag-python/current/
Other
231 stars 37 forks source link

SimpleKGPipeline does not generate ‘__Entity__’ #215

Open wonik opened 10 hours ago

wonik commented 10 hours ago

Hello,

While following a wonderful example to construct Knowledge Graph using Neo4j (https://neo4j.com/blog/graphrag-python-package/), I used a local model, llama-3.1-70B (downloaded it manually) and wrapped the model LLMInterface. And I did the same procedure to embedding model, e5-large-v2.

However, when I applied the SimpleKGPipeline to a pdf, it generates Documents and chunks, but not Entity just as described in the blog. I tried 2 different ways 1) without providing values to entities, relations, and potential schema of SimpleKGPipeline -> It only gives Documents and Chunks in Neo4j Database, but I figured out “nodes” and “relationships” in JSON format when I printed the llm output. Why SimpleKGPipeline cannot turn the extracted Graph information into Graph Database?

2) I manually set potential node_labels, edge_labels and potential schema and gives them to the entities, relations, and potential schema of SimpleKGPipeline. It generates partial nodes and edges in Graph database, meaning it generates some ‘Entity’, but not all nodes/edges as desired. And It generate ‘Entity’ for the 0th chunk only.

Here are questions. 1) Do I have to manually set potential entities, relations, and potential schema? 2) Why 0th chunk only generate ‘Entity’? How to debug in this case?

Thank you in advance.