Skip to content

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

Don't split and strip input in retrieval component. (#6662)

Song Fuchangad4e59edb268
diff --git a/agent/component/retrieval.py b/agent/component/retrieval.py
index 6a3f89b74d..40d16ce8ff 100644
--- a/agent/component/retrieval.py
+++ b/agent/component/retrieval.py
@@ -56,8 +56,6 @@ class Retrieval(ComponentBase, ABC):
def _run(self, history, **kwargs):
query = self.get_input()
query = str(query["content"][0]) if "content" in query else ""
- lines = query.split('\n')
- query = lines[-1] if lines else ""
kbs = KnowledgebaseService.get_by_ids(self._param.kb_ids)
if not kbs:
return Retrieval.be_output("")