graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

[Bug]: print(result.context_data["relationships"].head()) error when 'result = await search_engine.asearch(question)'

Open arthurjinhui opened this issue 1 year ago • 2 comments

Describe the bug

question = "Tell me about Agent Mercer"
result = await search_engine.asearch(question)
print(result.response)

###
print(result.context_data["entities"].head())
print(result.context_data["relationships"].head())
print(result.context_data["reports"].head())

......

check entities is ok, but

print(result.context_data["relationships"].head())
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^

KeyError: 'relationships'

Steps to reproduce

No response

Expected Behavior

No response

GraphRAG Config Used

claim_extraction:

llm: override the global llm settings for this task

parallelization: override the global parallelization settings for this task

async_mode: override the global async_mode settings for this task

enabled: true prompt: "prompts/claim_extraction.txt" description: "Any claims or facts that could be relevant to information discovery." max_gleanings: 0

Logs and screenshots

File "/Users/xxxxxx/Library/MSGraphRAG/GraphRAGRAG.main01.py", line 180, in main print(result.context_data["relationships"].head()) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ KeyError: 'relationships'

Additional Information

  • GraphRAG Version: 0.1.1
  • Operating System: MacOS
  • Python Version: 3.12
  • Related Issues:

arthurjinhui avatar Jul 13 '24 07:07 arthurjinhui

the code working fine LocalSearch search_engine but not for GlobalSearch search_engine

giriprasad51 avatar Jul 17 '24 07:07 giriprasad51

This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.

github-actions[bot] avatar Jul 26 '24 01:07 github-actions[bot]