feat: 修改意图识别提示词
This commit is contained in:
@@ -10,7 +10,8 @@ def build_intent_question() -> ChoiceDecision:
|
|||||||
"Classify the user's primary intent. "
|
"Classify the user's primary intent. "
|
||||||
"Read `prompt` together with `clarification_history`; later answers clarify or correct earlier requests. "
|
"Read `prompt` together with `clarification_history`; later answers clarify or correct earlier requests. "
|
||||||
"Choose modify_screen only when the user explicitly requests an actual edit. "
|
"Choose modify_screen only when the user explicitly requests an actual edit. "
|
||||||
"Choose qa only for an explicit request for information, explanation, diagnosis, or advice. "
|
"Choose qa for clear requests for a textual answer or general conversation, including information, explanation, diagnosis, advice, and assistant identity or capabilities. "
|
||||||
|
"Requests need not be phrased as questions; being unrelated to screens does not make an intent unclear. "
|
||||||
"A vague complaint or evaluation without a requested next step is unclear, not automatically qa. "
|
"A vague complaint or evaluation without a requested next step is unclear, not automatically qa. "
|
||||||
"An explicit edit request remains modify_screen even when edit details are missing. "
|
"An explicit edit request remains modify_screen even when edit details are missing. "
|
||||||
"Do not infer intent solely from selected nodes or an empty screen."
|
"Do not infer intent solely from selected nodes or an empty screen."
|
||||||
@@ -20,9 +21,9 @@ def build_intent_question() -> ChoiceDecision:
|
|||||||
"create_screen": "Create a new screen",
|
"create_screen": "Create a new screen",
|
||||||
# 明确要求修改、增加、删除或重新设计已有大屏
|
# 明确要求修改、增加、删除或重新设计已有大屏
|
||||||
"modify_screen": "Explicitly request modifying, adding, deleting, or redesigning an existing screen, including requests lacking details such as 帮我修改这个图",
|
"modify_screen": "Explicitly request modifying, adding, deleting, or redesigning an existing screen, including requests lacking details such as 帮我修改这个图",
|
||||||
# 询问知识、原因、建议或如何修改,但没有要求实际执行
|
# 明确的文字回答或交流请求,包括助手身份和能力,但没有要求实际操作大屏
|
||||||
"qa": "Explicitly ask for information, reasons, diagnosis, or suggestions without requesting an actual edit, e.g. 这个图为什么没有数据 or 这个图怎么优化",
|
"qa": "Clearly request a textual answer or general conversation without requesting screen creation or an actual edit; includes assistant identity and capabilities, information, reasons, diagnosis, and suggestions, e.g. 这个图为什么没有数据 or 这个图怎么优化",
|
||||||
# 语义上没有明确表达要问什么或做什么,不等同于模型分数低
|
# 语义上没有明确表达要问什么或做什么,不等同于模型分数低
|
||||||
"unclear": "The requested intent is not expressed clearly: vague feedback, references, or an unspecified request to look, e.g. 这个图不太对, 这个有点问题, 帮我看看这个; no explicit question or edit request",
|
"unclear": "The user's desired response or action cannot be determined from the request and clarification history, so clarification is needed to decide what to do; includes vague feedback, references, or an unspecified request to look, e.g. 这个图不太对, 这个有点问题, 帮我看看这个",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
QA_SYSTEM_PROMPT = """## 任务
|
QA_SYSTEM_PROMPT = """## 任务
|
||||||
回答用户关于大屏的问题,或提供具体可操作的改进建议
|
回答用户关于大屏的问题,或提供具体可操作的改进建议
|
||||||
|
也可回答助手身份、能力等一般交流请求;介绍自己时以大屏助手的职责和已知能力为依据,不编造模型身份或未提供的能力
|
||||||
|
|
||||||
## 回答依据
|
## 回答依据
|
||||||
结合当前问题、大屏快照和 clarification_history,以用户后续明确补充或纠正为准
|
结合当前问题、大屏快照和 clarification_history,以用户后续明确补充或纠正为准
|
||||||
|
仅在与请求相关时使用大屏快照;一般交流无需强行关联大屏或要求用户补充大屏信息
|
||||||
区分快照事实与待验证的推测,证据不足时说明缺少的信息,不编造故障原因
|
区分快照事实与待验证的推测,证据不足时说明缺少的信息,不编造故障原因
|
||||||
|
|
||||||
## 输出与边界
|
## 输出与边界
|
||||||
|
|||||||
Reference in New Issue
Block a user