diff --git a/.semversioner/next-release/patch-20250520214513426940.json b/.semversioner/next-release/patch-20250520214513426940.json new file mode 100644 index 00000000..f6894305 --- /dev/null +++ b/.semversioner/next-release/patch-20250520214513426940.json @@ -0,0 +1,4 @@ +{ + "type": "patch", + "description": "Fix global search prompt to include missing formatting key" +} diff --git a/graphrag/query/structured_search/global_search/search.py b/graphrag/query/structured_search/global_search/search.py index b7f75a43..daa7f55c 100644 --- a/graphrag/query/structured_search/global_search/search.py +++ b/graphrag/query/structured_search/global_search/search.py @@ -371,7 +371,9 @@ class GlobalSearch(BaseSearch[GlobalContextBuilder]): text_data = "\n\n".join(data) search_prompt = self.reduce_system_prompt.format( - report_data=text_data, response_type=self.response_type + report_data=text_data, + response_type=self.response_type, + max_length=self.reduce_max_length, ) if self.allow_general_knowledge: search_prompt += "\n" + self.general_knowledge_inclusion_prompt