Skip to content

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

Fix: empty description (#5747)

Kevin Hu06b29d7da4a8
diff --git a/graphrag/search.py b/graphrag/search.py
index 66e36bf7e2..aa65fc6f5c 100644
--- a/graphrag/search.py
+++ b/graphrag/search.py
@@ -228,7 +228,7 @@ class KGSearch(Dealer):
ents.append({
"Entity": n,
"Score": "%.2f" % (ent["sim"] * ent["pagerank"]),
- "Description": json.loads(ent["description"]).get("description", "")
+ "Description": json.loads(ent["description"]).get("description", "") if ent["description"] else ""
})
max_token -= num_tokens_from_string(str(ents[-1]))
if max_token <= 0: