RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Refa: add meta data to retrieval. (#6676)
Kevin Hu60b9c027c86b
diff --git a/agent/component/retrieval.py b/agent/component/retrieval.pyindex 40d16ce8ff..90cb8c9eb9 100644--- a/agent/component/retrieval.py+++ b/agent/component/retrieval.py@@ -24,6 +24,7 @@ from api.db.services.llm_service import LLMBundlefrom api import settingsfrom agent.component.base import ComponentBase, ComponentParamBasefrom rag.app.tag import label_question+from rag.prompts import kb_promptfrom rag.utils.tavily_conn import Tavily@@ -102,9 +103,7 @@ class Retrieval(ComponentBase, ABC):df["empty_response"] = self._param.empty_responsereturn df- df = pd.DataFrame(kbinfos["chunks"])- df["content"] = df["content_with_weight"]- del df["content_with_weight"]+ df = pd.DataFrame({"content": kb_prompt(kbinfos, 200000)})logging.debug("{} {}".format(query, df))return df.dropna()