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

[FEATURE] Add community level as additional parameter for global search #172

Open
stefan-1997 opened this issue Sep 17, 2024 · 2 comments
Open
Assignees

Comments

@stefan-1997
Copy link

In the file backend/src/api/query.py, the community level, which is used behind the scences for the global search, is hardcoded to 1 (same for query_streaming.py):

# current investigations show that community level 1 is the most useful for global search
COMMUNITY_LEVEL = 1

I think it would be of great benefit if one could parse the desired community level for global search as additional parameter in the API (i.e. the global_search function from the notebooks respectively). Acknowledging that a community level of 1 might be the most promising level for many applications, I think this feature could really increase my understanding of how the community summarization works and also potentially increase the power of the global search for my given application.

@stefan-1997
Copy link
Author

Interesting enough, so far it is also not possible to pass a claim extraction prompt to the API; or at least the build_index function in the starter notebooks does not provide any functionality here.
Is this done deliberately and if so, why? Is claim extraction prompting more vulnerable than the others perhaps?

@stefan-1997
Copy link
Author

Also note that the claim extraction prompt from the graphrag library uses some default parameters entity_specs which evaluates to ['organization', 'person', 'geo', 'event'] in this repo.
Extract from the claim extraction cache:

The company is owned by Person C who was suspected of engaging in corruption activities in 2015)\n<|COMPLETE|>\n\n-Real Data-\nUse the following input for your answer.\nEntity specification: ['organization', 'person', 'geo', 'event']\nClaim description: Any claims or facts that could be relevant to information discovery.\nText:

Am I right in assuming that I can only configure this parameter in the initial deployment? This would limit of course its applicability since different indexes might aim at different entity types.

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

No branches or pull requests

2 participants