You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and this bug is not already filed.
My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
I believe this is a legitimate bug, not just a question. If this is a question, please use the Discussions area.
Describe the bug
I’ve been exploring the codebase for GraphRAG and recently noticed that the community reports used for query augmentation in local search appear empty.
Below is an image of intermediate debug information using pdb, where you can see the selected community is empty:
from graphrag/query/structured_search/local_search/mixed_context.py:249
In consequnce, we see the community_context_data is empty.
For the final response we see the lack of reports info.
This leads to missing community structure information in local search, which seems to degrade GraphRAG's performance and creates a discrepancy between the code implementation and the paper.
Steps to reproduce
Initialize the environment and create index as official getting-started-guide
Create debug python file under your_path_to_graphrag/graphrag/graphrag/graphrag/cli/
cd ./graphrag/cli
touch debug_query.py
add the codes below to debug_query.py, it will launch a local search according to your query.
fromqueryimportrun_local_searchfrompathlibimportPathrun_local_search(
config_filepath=None,
data_dir=Path("your_path_to_graphrag/graphrag/graphrag/ragtest/output"),# modify to your pathroot_dir=Path("your_path_to_graphrag/graphrag/graphrag/ragtest"),# modify to your pathcommunity_level=2,
response_type="text",
streaming=False,
query="Any query here you want to ask"#place it to your desired query
)
Add import pdb;pdb.set_trace() to graphrag/query/structured_search/local_search/mixed_context.py:254
run the code and print debug info
python3 -m pdb debug_query.py
run the code and it will stop at mixed_context.py:254, print the community information and you'll see it's empty.
p selected_communities
Expected Behavior
1.The selected_communities should not be empty.
2.Accordingly, community context should not be empty.
3.For the local search response, it should show the data source with entity, relationship, report (now report is missing).
GraphRAG Config Used
# Default config in getting-starting-guidellm = "gpt-4o-mini"embedding_model = "text-embedding-3-small"
Logs and screenshots
See images provided.
Additional Information
GraphRAG Version: v0.4.1
Operating System: macOS 15.0
Computer: MacBook Air m2, 2022
Python Version: 3.10.15
Related Issues: None
The text was updated successfully, but these errors were encountered:
LevickCG
added
bug
Something isn't working
triage
Default label assignment, indicates new issue needs reviewed by a maintainer
labels
Nov 10, 2024
LevickCG
changed the title
[Bug]: EMPTY community report in local search
[Bug]: EMPTY community report in local search leads to no-use of community information
Nov 10, 2024
After further investigation, I identified that the root cause of this issue is due to the mismatch of uuid to human readable id in the search process.
I plan to work on a fix and submit a pull request. I’d appreciate any feedback or guidance from the maintainers to ensure my approach aligns with the project’s design principles.
Do you need to file an issue?
Describe the bug
I’ve been exploring the codebase for GraphRAG and recently noticed that the community reports used for query augmentation in local search appear empty.
In consequnce, we see the
community_context_data
is empty.For the final response we see the lack of reports info.
This leads to missing community structure information in local search, which seems to degrade GraphRAG's performance and creates a discrepancy between the code implementation and the paper.
Steps to reproduce
You can specify the raw text on your own.
your_path_to_graphrag/graphrag/graphrag/graphrag/cli/
add the codes below to debug_query.py, it will launch a local search according to your query.
Add
import pdb;pdb.set_trace()
tographrag/query/structured_search/local_search/mixed_context.py:254
run the code and print debug info
run the code and it will stop at
mixed_context.py:254
, print the community information and you'll see it's empty.Expected Behavior
1.The selected_communities should not be empty.
2.Accordingly, community context should not be empty.
3.For the local search response, it should show the data source with
entity
,relationship
,report
(nowreport
is missing).GraphRAG Config Used
Logs and screenshots
See images provided.
Additional Information
The text was updated successfully, but these errors were encountered: