-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
base: main
Are you sure you want to change the base?
Conversation
…d to human readable id
…d to human readable id
@microsoft-github-policy-service agree |
Please check that
Why does When Is it possible for max_tokens to be such a small value, you also ask? Yes, especially during local search, because of the default values in settings: 12 000 * 0.1 = 1200
|
If I get it right about the code you mentioned, it's For this case:What you mean (from my perspective): Empty community may be caused by Well If that's the case, the answer (see the"before" and "after" images in the "Proposed Changes ") wouldn't have changed even if I change the code. If it exceeds the token limit, the afterwards answer wouldn't have shown For overall project:What if we just ended up getting an empty community context due to For For this pr, it's a bug-fix , the community context cannot be added into the context even-if it doesn't exceed the max token limit due to community mismatch. |
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:
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:
After:
Checklist
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.