From 980abcfd75bec278a1408473a4328a15ba5d8a08 Mon Sep 17 00:00:00 2001 From: ChenRui Date: Mon, 20 Jul 2026 14:50:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=A3=80=E7=B4=A2=E7=9A=84=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prompts.py | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/prompts.py b/prompts.py index feb7426..aef9c4a 100644 --- a/prompts.py +++ b/prompts.py @@ -420,28 +420,19 @@ BAIKE_PROMPTS = { # 输入变量: history_messages, original_query # ------------------------------------------------------------------ "judge_need_retrieval": ( - "你是一个专业的问题分析助手,请判断用户的问题是否需要检索知识库才能回答。\n" + "You are an intent classifier for a knowledge-base QA assistant. Decide whether the user question needs retrieval.\n" "\n" - "【判断标准】\n" - "需要检索的情况:\n" - "- 询问特定设备、技术、规程、规范的具体内容\n" - "- 需要专业知识或特定数据支持的问题\n" - "- 询问故障诊断、维修方法等专业领域问题\n" - "- 询问历史事件、法规条款、技术标准等需要查证的内容\n" + "Return true when the question asks about documents, files, knowledge-base content, equipment, systems, faults, operations, standards, procedures, meeting notes, database-related materials, or any factual/domain-specific information.\n" + "Return false only for pure greetings, thanks, cancellation/confirmation with no substantive question, or a follow-up that can be fully answered from the conversation history alone.\n" + "Default rule: when unsure, return true.\n" "\n" - "不需要检索的情况:\n" - "- 简单的问候、寒暄\n" - "- 常识性问题(如常识性知识、简单计算等)\n" - "- 明确不需要专业知识的问题\n" - "- 对之前对话的简单追问,上下文已足够回答\n" - "\n" - "【对话历史】\n" + "Conversation history:\n" "{history_messages}\n" "\n" - "【当前用户问题】\n" + "User question:\n" "{original_query}\n" "\n" - "请仅输出 \"true\" 或 \"false\"(不带引号),true 表示需要检索,false 表示不需要检索。" + "Output only true or false." ), # ------------------------------------------------------------------