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
fix(api): add missing comma delimiter between question and extracted keywords (#19661)
ming1523c5a932ffb042
diff --git a/api/apps/restful_apis/bot_api.py b/api/apps/restful_apis/bot_api.pyindex 3da6ae6a2a..9703b58c57 100644--- a/api/apps/restful_apis/bot_api.py+++ b/api/apps/restful_apis/bot_api.py@@ -448,7 +448,7 @@ async def retrieval_test_embedded(tenant_id=None):if req.get("keyword", False):default_chat_model = await thread_pool_exec(get_tenant_default_model_by_type, kb.tenant_id, LLMType.CHAT)chat_mdl = LLMBundle(kb.tenant_id, default_chat_model)- _question += await keyword_extraction(chat_mdl, _question)+ _question += "," + await keyword_extraction(chat_mdl, _question)labels = label_question(_question, [kb])ranks = await settings.retriever.retrieval(diff --git a/api/apps/restful_apis/chunk_api.py b/api/apps/restful_apis/chunk_api.pyindex 68983a8b29..8bb23d5306 100644--- a/api/apps/restful_apis/chunk_api.py+++ b/api/apps/restful_apis/chunk_api.py@@ -521,7 +521,7 @@ async def retrieval_test(tenant_id, dataset_id=None):question = await cross_languages(kb.tenant_id, None, question, langs)if req.get("keyword", False):chat_model_config = get_tenant_default_model_by_type(kb.tenant_id, LLMType.CHAT)- question += await keyword_extraction(LLMBundle(kb.tenant_id, chat_model_config), question)+ question += "," + await keyword_extraction(LLMBundle(kb.tenant_id, chat_model_config), question)ranks = await settings.retriever.retrieval(question,diff --git a/api/apps/services/dataset_api_service.py b/api/apps/services/dataset_api_service.pyindex 16eb7ffd3e..08cfcfe124 100644--- a/api/apps/services/dataset_api_service.py+++ b/api/apps/services/dataset_api_service.py@@ -1154,7 +1154,7 @@ async def search(dataset_id: str, tenant_id: str, req: dict):if search_config.get("keyword", req.get("keyword", False)):default_chat_model_config = get_tenant_default_model_by_type(kb.tenant_id, LLMType.CHAT)chat_mdl = LLMBundle(kb.tenant_id, default_chat_model_config)- _question += await keyword_extraction(chat_mdl, _question)+ _question += "," + await keyword_extraction(chat_mdl, _question)labels = label_question(_question, [kb])ranks = await settings.retriever.retrieval(@@ -1560,7 +1560,7 @@ async def search_datasets(tenant_id: str, req: dict):if search_config.get("keyword", req.get("keyword", False)):default_chat_model_config = get_tenant_default_model_by_type(kb.tenant_id, LLMType.CHAT)chat_mdl = LLMBundle(kb.tenant_id, default_chat_model_config)- _question += await keyword_extraction(chat_mdl, _question)+ _question += "," + await keyword_extraction(chat_mdl, _question)labels = label_question(_question, kbs)ranks = await settings.retriever.retrieval(