修改判断是否检索的提示词
This commit is contained in:
parent
ba5f23e24c
commit
980abcfd75
23
prompts.py
23
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."
|
||||
),
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user