Skip to content

[Issue]: <title> ❌ create_base_entity_graph solution | 按照graphrag最后一步create_base_entity_graph失败的解决方案 #951

Closed as not planned
@Mxk-1

Description

@Mxk-1

Is there an existing issue for this?

  • I have searched the existing issues
  • I have checked #657 to validate if my issue is covered by community support

Describe the issue

Many people, including myself, have encountered the ❌ create_base_entity_graph issue. After trying various methods, I finally found a solution. It turns out that this isn't a bug, but rather a matter of balancing model capabilities with the supported max tokens.

很多人遇到了❌ create_base_entity_graph这个问题,包括我在内,尝试了很多方法后,最终得到了解决方案,或者说这并不是一个bug,而是有关模型能力和支持max_token的平衡。

Steps to reproduce

The chunk splitting in the original setting.yaml provided may not be suitable for the model launched with Ollama, as it could be either too large or too small, leading to errors in the model's responses. The original paper mentioned using the GPT-4o model, while the model I deployed locally is Gemma2:9b via Ollama. These two models differ in size and performance.

Additionally, since the pipeline relies on prompt-based Q&A with the text, the prompt itself takes up some of the model's processing length. By adjusting the chunk_size, I was able to successfully run the experiment. If you encounter this issue, try increasing or decreasing the chunk_size. If you have a better solution, feel free to discuss it with me.


原始提供的setting.yaml中chunk的拆分可能并不适合ollama启动的模型,可能过大过小,造成模型回答问题的错误。在原始的paper中提到了使用的模型为gpt4o,我本地部署的模型才用的是ollama方式的gemma2:9b,两个模型大小不同,性能也是不同的。

再结合pipeline过程中依赖于prompt结合text进行问答,prompt会占用模型处理的文本长度,所以我通过调整chunk_size达到了跑通实验的效果。遇到此问题的小伙伴可以尝试,调大或者调小。或者有更好的解决方案,一起讨论。

GraphRAG Config Used

chunks:
  size: 600
  overlap: 150

Logs and screenshots

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    community_supportIssue handled by community members

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions