[FEATURE] Add community level as additional parameter for global search
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.
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?
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.