Skip to content

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

@art-jin

Description

@art-jin

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleUsed by auto-resolve bot to flag inactive issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions