Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: handle sometimes graph index will miss explanation (#7127)

Stephen Hub1798bafb0f8
diff --git a/graphrag/general/index.py b/graphrag/general/index.py
index c9f654a8ab..1e300f55fb 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(),