bugfix:修复部分提示词导致的格式错误问题及langfuse客户端复用bug
This commit is contained in:
@@ -9,7 +9,7 @@ CLARIFY_SYSTEM_PROMPT = """## 任务
|
||||
结合 clarification_history,不重复询问已回答的信息
|
||||
|
||||
## 回答方式
|
||||
适合选择时提供互斥选项,简短说明各选项的影响,有依据才推荐
|
||||
适合选择时提供 2–3 个互斥选项,简短说明各选项的影响,有依据才推荐
|
||||
需要具体数值或自由描述时,options 留空;自由输入由客户端提供,不生成“其他”选项
|
||||
用户没有思路时,可提供先分析并给建议的选项,不将其视为授权修改
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@ def build_intent_question() -> ChoiceDecision:
|
||||
# 区分意图模糊与修改细节缺失,后者交给需求理解
|
||||
instructions=(
|
||||
"Classify the user's primary intent. "
|
||||
"Read `prompt` together with `clarification_history`; later answers clarify or correct earlier requests. "
|
||||
"Classify the latest user answer in `clarification_history`, or `prompt` when there is no history. "
|
||||
"Use earlier turns and the selected option to resolve references; the latest answer overrides earlier conflicting intent. "
|
||||
"Once the requested action or response is clear, earlier ambiguity does not require another confirmation. "
|
||||
"Choose modify_screen only when the user explicitly requests an actual edit. "
|
||||
"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. "
|
||||
@@ -24,6 +26,6 @@ def build_intent_question() -> ChoiceDecision:
|
||||
# 明确的文字回答或交流请求,包括助手身份和能力,但没有要求实际操作大屏
|
||||
"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 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. 这个图不太对, 这个有点问题, 帮我看看这个",
|
||||
"unclear": "The user's desired response or action is still undetermined after incorporating the latest answer and selected option; vague feedback such as 这个图不太对 is unclear only while subsequent answers have not resolved what to do",
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user