修改判断是否检索的提示词

This commit is contained in:
ChenRui 2026-07-20 14:50:54 +08:00
parent ba5f23e24c
commit 980abcfd75

View File

@ -420,28 +420,19 @@ BAIKE_PROMPTS = {
# 输入变量: history_messages, original_query # 输入变量: history_messages, original_query
# ------------------------------------------------------------------ # ------------------------------------------------------------------
"judge_need_retrieval": ( "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" "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"
"需要检索的情况:\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"
"- 询问特定设备、技术、规程、规范的具体内容\n" "Default rule: when unsure, return true.\n"
"- 需要专业知识或特定数据支持的问题\n"
"- 询问故障诊断、维修方法等专业领域问题\n"
"- 询问历史事件、法规条款、技术标准等需要查证的内容\n"
"\n" "\n"
"不需要检索的情况:\n" "Conversation history:\n"
"- 简单的问候、寒暄\n"
"- 常识性问题(如常识性知识、简单计算等)\n"
"- 明确不需要专业知识的问题\n"
"- 对之前对话的简单追问,上下文已足够回答\n"
"\n"
"【对话历史】\n"
"{history_messages}\n" "{history_messages}\n"
"\n" "\n"
"【当前用户问题】\n" "User question:\n"
"{original_query}\n" "{original_query}\n"
"\n" "\n"
"请仅输出 \"true\"\"false\"不带引号true 表示需要检索false 表示不需要检索。" "Output only true or false."
), ),
# ------------------------------------------------------------------ # ------------------------------------------------------------------