Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix keyword search top-k not initial (#21202)
Jyong9a18a98b58b1
diff --git a/api/services/dataset_service.py b/api/services/dataset_service.pyindex e98b47921ff..747c3d6fe6e 100644--- a/api/services/dataset_service.py+++ b/api/services/dataset_service.py@@ -1402,16 +1402,16 @@ class DocumentService:knowledge_config.embedding_model, # type: ignore)dataset_collection_binding_id = dataset_collection_binding.id- if knowledge_config.retrieval_model:- retrieval_model = knowledge_config.retrieval_model- else:- retrieval_model = RetrievalModel(- search_method=RetrievalMethod.SEMANTIC_SEARCH.value,- reranking_enable=False,- reranking_model=RerankingModel(reranking_provider_name="", reranking_model_name=""),- top_k=2,- score_threshold_enabled=False,- )+ if knowledge_config.retrieval_model:+ retrieval_model = knowledge_config.retrieval_model+ else:+ retrieval_model = RetrievalModel(+ search_method=RetrievalMethod.SEMANTIC_SEARCH.value,+ reranking_enable=False,+ reranking_model=RerankingModel(reranking_provider_name="", reranking_model_name=""),+ top_k=2,+ score_threshold_enabled=False,+ )# save datasetdataset = Dataset(tenant_id=tenant_id,diff --git a/api/services/entities/knowledge_entities/knowledge_entities.py b/api/services/entities/knowledge_entities/knowledge_entities.pyindex bb3be61f850..603064ca077 100644--- a/api/services/entities/knowledge_entities/knowledge_entities.py+++ b/api/services/entities/knowledge_entities/knowledge_entities.py@@ -101,7 +101,7 @@ class WeightModel(BaseModel):class RetrievalModel(BaseModel):- search_method: Literal["hybrid_search", "semantic_search", "full_text_search"]+ search_method: Literal["hybrid_search", "semantic_search", "full_text_search", "keyword_search"]reranking_enable: boolreranking_model: Optional[RerankingModel] = Nonereranking_mode: Optional[str] = None