|
COMMUNITY_REPORT_SUMMARIZATION_PROMPT = """ |
|
{persona} |
|
|
|
# Goal |
|
Write a comprehensive assessment report of a community taking on the role of a {role}. The content of this report includes an overview of the community's key entities and relationships. |
|
|
|
# Report Structure |
|
The report should include the following sections: |
|
- TITLE: community's name that represents its key entities - title should be short but specific. When possible, include representative named entities in the title. |
|
- SUMMARY: An executive summary of the community's overall structure, how its entities are related to each other, and significant information associated with its entities. |
|
- REPORT RATING: {report_rating_description} |
|
- RATING EXPLANATION: Give a single sentence explanation of the rating. |
|
- DETAILED FINDINGS: A list of 5-10 key insights about the community. Each insight should have a short summary followed by multiple paragraphs of explanatory text grounded according to the grounding rules below. Be comprehensive. |
|
|
|
Return output as a well-formed JSON-formatted string with the following format. Don't use any unnecessary escape sequences. The output should be a single JSON object that can be parsed by json.loads. |
|
{{ |
|
"title": <report_title>, |
|
"summary": <executive_summary>, |
|
"rating": <impact_severity_rating>, |
|
"rating_explanation": <rating_explanation>, |
|
"findings": [ |
|
{{ |
|
"summary":<insight_1_summary>, |
|
"explanation": <insight_1_explanation> |
|
}}, |
|
{{ |
|
"summary":<insight_2_summary>, |
|
"explanation": <insight_2_explanation> |
|
}} |
|
] |
|
}} |
|
|
|
# Grounding Rules |
|
Points supported by data should list their data references as follows: |
|
|
|
"This is an example sentence supported by multiple data references [Data: <dataset name> (record ids); <dataset name> (record ids)]." |
|
|
|
Do not list more than 5 record ids in a single reference. Instead, list the top 5 most relevant record ids and add "+more" to indicate that there are more. |
|
|
|
For example: |
|
"Person X is the owner of Company Y and subject to many allegations of wrongdoing [Data: Reports (1), Entities (5, 7); Relationships (23); Claims (7, 2, 34, 64, 46, +more)]." |
|
|
|
where 1, 5, 7, 23, 2, 34, 46, and 64 represent the id (not the index) of the relevant data record. |
|
|
|
Do not include information where the supporting evidence for it is not provided. |
|
|
|
# Example Input |
|
----------- |
|
Text: |
|
|
|
Entities |
|
|
|
id,entity,description |
|
5,VERDANT OASIS PLAZA,Verdant Oasis Plaza is the location of the Unity March |
|
6,HARMONY ASSEMBLY,Harmony Assembly is an organization that is holding a march at Verdant Oasis Plaza |
|
|
|
Relationships |
|
|
|
id,source,target,description |
|
37,VERDANT OASIS PLAZA,UNITY MARCH,Verdant Oasis Plaza is the location of the Unity March |
|
38,VERDANT OASIS PLAZA,HARMONY ASSEMBLY,Harmony Assembly is holding a march at Verdant Oasis Plaza |
|
39,VERDANT OASIS PLAZA,UNITY MARCH,The Unity March is taking place at Verdant Oasis Plaza |
|
40,VERDANT OASIS PLAZA,TRIBUNE SPOTLIGHT,Tribune Spotlight is reporting on the Unity march taking place at Verdant Oasis Plaza |
|
41,VERDANT OASIS PLAZA,BAILEY ASADI,Bailey Asadi is speaking at Verdant Oasis Plaza about the march |
|
43,HARMONY ASSEMBLY,UNITY MARCH,Harmony Assembly is organizing the Unity March |
|
|
|
Output: |
|
{{ |
|
"title": "Verdant Oasis Plaza and Unity March", |
|
"summary": "The community revolves around the Verdant Oasis Plaza, which is the location of the Unity March. The plaza has relationships with the Harmony Assembly, Unity March, and Tribune Spotlight, all of which are associated with the march event.", |
|
"rating": 5.0, |
|
"rating_explanation": "The impact severity rating is moderate due to the potential for unrest or conflict during the Unity March.", |
|
"findings": [ |
|
{{ |
|
"summary": "Verdant Oasis Plaza as the central location", |
|
"explanation": "Verdant Oasis Plaza is the central entity in this community, serving as the location for the Unity March. This plaza is the common link between all other entities, suggesting its significance in the community. The plaza's association with the march could potentially lead to issues such as public disorder or conflict, depending on the nature of the march and the reactions it provokes. [Data: Entities (5), Relationships (37, 38, 39, 40, 41,+more)]" |
|
}}, |
|
{{ |
|
"summary": "Harmony Assembly's role in the community", |
|
"explanation": "Harmony Assembly is another key entity in this community, being the organizer of the march at Verdant Oasis Plaza. The nature of Harmony Assembly and its march could be a potential source of threat, depending on their objectives and the reactions they provoke. The relationship between Harmony Assembly and the plaza is crucial in understanding the dynamics of this community. [Data: Entities(6), Relationships (38, 43)]" |
|
}}, |
|
{{ |
|
"summary": "Unity March as a significant event", |
|
"explanation": "The Unity March is a significant event taking place at Verdant Oasis Plaza. This event is a key factor in the community's dynamics and could be a potential source of threat, depending on the nature of the march and the reactions it provokes. The relationship between the march and the plaza is crucial in understanding the dynamics of this community. [Data: Relationships (39)]" |
|
}}, |
|
{{ |
|
"summary": "Role of Tribune Spotlight", |
|
"explanation": "Tribune Spotlight is reporting on the Unity March taking place in Verdant Oasis Plaza. This suggests that the event has attracted media attention, which could amplify its impact on the community. The role of Tribune Spotlight could be significant in shaping public perception of the event and the entities involved. [Data: Relationships (40)]" |
|
}} |
|
] |
|
}} |
|
|
|
# Real Data |
|
|
|
Use the following text for your answer. Do not make anything up in your answer. |
|
|
|
Text: |
|
{{input_text}} |
|
Output:""" |
Do you need to file an issue?
Describe the bug
The content of the community report in the GraphRAG index is always in English.
In GraphRAG 1.1.1, the community report was generated in the specified language by setting the language in the prompt tune.
However, in version 1.2, the language setting is ignored and the report is always output in English.
The issue seems to be caused by the prompt used for generating the community report via prompt tuning.
In GraphRAG 1.1.1, the template for this prompt included the instruction "Everything should be in {language}." to enforce language-specific output.
graphrag/graphrag/prompt_tune/template/community_report_summarization.py
Lines 6 to 95 in 2682c71
In version 1.2, however, this instruction has been removed.
graphrag/graphrag/prompt_tune/template/community_report_summarization.py
Lines 6 to 104 in 0d363e6
Steps to reproduce
settings.yaml.indexroot\output\community_reports.parquet. Content of the fields "title", "summary", "full_content" are in English.Expected Behavior
No response
GraphRAG Config Used
Logs and screenshots
No response
Additional Information