Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty community report due to community id mismatch #1437

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

LevickCG
Copy link

Description

[Provide a brief description of the changes made in this pull request.]
Current local search module fails to integrate community reports because of mismatched community_id, this pr changed the code of graphrag/query/structured_search/local_search/mixed_context.py, so that the community id in mixed_contaext actually matches.

Empty selected community due to previously unmatched community id:
Image

Related Issues

This pull request aims to fix the problem mentioned in following issue.
issue1391

Proposed Changes

Change the mismatched community_id (from uuid and human-readable-id to human-readable-id to human-readable-id) so that the selected community would no be empty, and the structure information of community report will be used.

Here are the different outputs in comparison:

Previous:
Image
After:
image

Checklist

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have updated the documentation (if necessary).
  • I have added appropriate unit tests (if applicable).

Additional Notes

I have checked the code to make sure it won't affect other modules that might use the mix_context, but I'm not fully aware of every detail of all the code given the complexity of the entire project. Please reach out if you notice any interactions or if there are specific areas you'd like me to double-check.

@LevickCG LevickCG requested review from a team as code owners November 24, 2024 07:31
@LevickCG
Copy link
Author

@LevickCG please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant