From 332e6ffbd48d646a569bfb3318931bb45ae97e64 Mon Sep 17 00:00:00 2001 From: hfrt456 <719565790@QQ.com> Date: Fri, 9 May 2025 10:17:24 +0800 Subject: [PATCH] Fix:local_es_tag (#7534) Two Case when local Es tag search has result which is filtered by score 1: Doc has empty tag,and not visi LLM 2: Code may use empty examples in Prompt for LLM search tag Co-authored-by: huangfuqunze --- rag/svr/task_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/svr/task_executor.py b/rag/svr/task_executor.py index cf4028f1b..14ce6fc53 100644 --- a/rag/svr/task_executor.py +++ b/rag/svr/task_executor.py @@ -368,7 +368,7 @@ async def build_chunks(task, progress_callback): docs_to_tag = [] for d in docs: - if settings.retrievaler.tag_content(tenant_id, kb_ids, d, all_tags, topn_tags=topn_tags, S=S): + if settings.retrievaler.tag_content(tenant_id, kb_ids, d, all_tags, topn_tags=topn_tags, S=S) and len(d[TAG_FLD]) > 0: examples.append({"content": d["content_with_weight"], TAG_FLD: d[TAG_FLD]}) else: docs_to_tag.append(d)