From b1798bafb0f84e9f7b544bcde67c6518c5064ad0 Mon Sep 17 00:00:00 2001 From: Stephen Hu Date: Fri, 18 Apr 2025 14:24:36 +0800 Subject: [PATCH] Fix: handle sometimes graph index will miss explanation (#7127) ### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/7053 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- graphrag/general/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphrag/general/index.py b/graphrag/general/index.py index c9f654a8a..1e300f55f 100644 --- a/graphrag/general/index.py +++ b/graphrag/general/index.py @@ -277,7 +277,7 @@ async def extract_community( for stru, rep in zip(community_structure, community_reports): obj = { "report": rep, - "evidences": "\n".join([f["explanation"] for f in stru["findings"]]), + "evidences": "\n".join([f.get("explanation", "") for f in stru["findings"]]), } chunk = { "id": get_uuid(),