Skip to content

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

Fix: Nan issue. (#6242)

Kevin Hu7eb417b24f2b
diff --git a/agent/canvas.py b/agent/canvas.py
index fa78762fb1..d5c0c0513e 100644
--- a/agent/canvas.py
+++ b/agent/canvas.py
@@ -265,7 +265,7 @@ class Canvas:
pid = cpn["parent_id"]
_, o = cpn["obj"].output(allow_partial=False)
_, oo = self.components[pid]["obj"].output(allow_partial=False)
- self.components[pid]["obj"].set_output(pd.concat([oo.dropna(axis=1), o.dropna(axis=1)], ignore_index=True))
+ self.components[pid]["obj"].set_output(pd.concat([oo.dropna(axis=1), o.dropna(axis=1)], ignore_index=True).dropna())
downstream = [pid]
for m in prepare2run(downstream):
diff --git a/agent/component/retrieval.py b/agent/component/retrieval.py
index 5df3335ec8..a6f4048d98 100644
--- a/agent/component/retrieval.py
+++ b/agent/component/retrieval.py
@@ -82,7 +82,7 @@ class Retrieval(ComponentBase, ABC):
rank_feature=label_question(query, kbs))
else:
kbinfos = {"chunks": [], "doc_aggs": []}
-
+
if self._param.use_kg and kbs:
ck = settings.kg_retrievaler.retrieval(query,
[kbs[0].tenant_id],