graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

[Bug]: wrong key when reading community report configuration from settiing.yaml

Open ronchengang opened this issue 1 year ago • 3 comments

Describe the bug

the configuration of community_report was never read because in create_graphrag_config.py, it refers to a wrong key: community_reports

community_report_config = values.get("community_reports") or {}   <-- it should be comminity_report

Steps to reproduce

change some config values for community_report section in settings.ymal, it never tasks effect.

Expected Behavior

No response

GraphRAG Config Used

No response

Logs and screenshots

No response

Additional Information

  • GraphRAG Version:
  • Operating System:
  • Python Version:
  • Related Issues:

ronchengang avatar Jul 14 '24 03:07 ronchengang

And, the default prompt of community_report is strange. Duplicated TWO long parts of instructions aggravate financial burden of toiling masses.

And, the json part should use single '{' and '}', since they are using str.replace instead of str.format, which may lead to wrong json format generated by some stupid models.

So many bugs!

l544301590 avatar Jul 15 '24 07:07 l544301590

And, the default prompt of community_report is strange. Duplicated TWO long parts of instructions aggravate financial burden of toiling masses.

And, the json part should use single '{' and '}', since they are using str.replace instead of str.format, which may lead to wrong json format generated by some stupid models.

So many bugs!

The prompt will work with the GPT-4 model as reported in the paper. For some open-source models, it really needs prompt tuning. I am trying to edit it to get the best results with a local LLM model.

ngoanpv avatar Jul 15 '24 18:07 ngoanpv

community_report

It was fixed at https://github.com/microsoft/graphrag/pull/405 , you should update the latest version of graphrag

ngoanpv avatar Jul 15 '24 18:07 ngoanpv

I can see they have changed the key name from 'community_report' to 'community_reports' in init_content.py, this also works. This bug can be closed.

ronchengang avatar Jul 19 '24 13:07 ronchengang